All About Methods to Fix SQL Database Error 1813

Microsoft’s SQL Server is quite a useful server that stores its database in MDF and NDF files that are popularly known as the primary and secondary database files of SQL. Despite being one of the best-rated database servers, it throws one or the other error message at some given point of time and further restricts access to the database’s MDF and NDF files. One of the frequently observed errors is the Microsoft SQL Server database error 1813 message. To understand core information related to this error like its causes and the methods using which you can fix it go through this information packed blog.

SQL server database error 1813 Description              


Error Msg 1813, Level 16, State 2, Line 1

Could not open new database ‘Database_Name’. CREATE DATABASE is aborted.

SQL database error 1813
Figure: Error Message


Before moving to find out the ways using which the SQL error 1813 can be fixed, it is all-important for you to know the causes of the error message.

  • SQL Server error code 1813 occurs when damaged or corrupt database log are attached to the new server.

Manual workaround to fix SQL Server database error 1813

When your SQL Server’s log is in a damaged state, your first and foremost requirement is to rebuild the database so that it becomes healthy and operational. The recovery steps are as follows:

  1. Make a database. The newly made database should have a similar name that you need to recover. For example: “Database_Name”. Further, ensure that name of SQL’s LDF and MDF files remain same as was before.
  2. Stop the running SQL Server.
  3. Transfer original MDF file to a new location by replacing the MDF file that you currently created.
  4. Delete the LDF file of the newly created database in the SQL Server.
  5. Start the SQL Server on doing which the database will be marked as ‘suspect’.
  6. Confirm that the System tables of Master database will allow and assist in upgrading the values.
  1. Alter the mode of the database to emergency mode.
  • The following statement will return the current status of the database.
  • The following statement will update one row of the database.
  1. Restart the SQL Server.

Note: This step is must, else the SQL Server will encounter an error

  1. Execute ‘DBCC command’ in the query window of SQL Server Management Studio. In doing so, a new log file will be created.

Note – The name of this newly created log file should be kept the same as the LDF file that was recently deleted from the new database server.

  1. DBCC REBUILD_LOG has two parameters. The first is ‘database name’ and second is ‘physical path of the log file.’ Here, confirm that the path is physical. This is because a logical name gives rise to an error message.
  2. Reset the status of the database by using the command given below:
  1. Turn/switch off the update to ‘system tables’ of Master database that runs the script displayed below:
  1. Set the status of the database to the previous status.

Note – If while carrying out Steps 11, 12 & 13 there is an error while the database is in use, set the database to the status single user.

  1. After the completion of Steps 11, 12 & 13 if the database is not in multi-user mode run the script stated below.

sp_DBOPTION ‘Database_Name’ , ‘single user’ , ‘false’

Finally, with correct execution of all the steps that have been mentioned above the SQL Server database error 1813 can be fixed. However, if the result is not positive due to one or the other reason that is quite likely to occur, you necessarily need external software to remove it.


  • Zero cost


  • Overlong
  • Time taking
  • Chances of failure
  • Necessitates rich technical knowledge

SQL database repair software to fix error 1813

It has already been stated in of the above sections that if SQL Server database error 1813 is not removed by the execution of the manual method that has been described above in a step-by-step manner, you should opt for a SQL Server repair software. You can go for Stellar Repair for MS SQL. This professional SQL recovery software easily fixes this error.

free download

The SQL server database error 1813 repair process with this software that you are required to follow is described below:

  1. Launch the software on doing which the main interface comes up.
  2. Click the Browse or Search button to select the MDF file depending on the situation.
Select MDF File
  1. After you have chosen the file, click Repair to start the repair process.
  2. A preview of the recoverable objects, such as Tables, Views, Defaults, Data Types, Synonyms, etc. is displayed in a tree-like structure in the left pane of the preview window. You can select either to have a detailed view.
Preview of Database Objects
  1. On the File menu, click Save to save the repaired MDF file with all its recovered objects. The Save Database dialog box appears.
Save Database
  1. Enter the required information and save the database

Finally, the SQL Server database error 1813 is fixed, and the repaired SQL Server database saved.


  • Quick and easy
  • 100% effective
  • Successful
  • User-friendly


  • None


Use none, but Stellar Repair for MS SQL as this software provides multiple benefits outweighing the benefits provided by the manual method, to repair damaged SQL database file, especially when the requirement is to fix Microsoft SQL Server error 1813.

  1. Hiawatha September 25, 2018
    • Eric Simson September 26, 2018
  2. Brent September 28, 2017
    • Priyanka Chauhan September 28, 2017

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.