"The log for database 'DB_NAME' is not available" error while deleting MS SQL database from Plesk Panel. Print

  • 0

Sometimes you may face an error stating "The log for database 'DB_NAME' is not available" while trying to delete a MS SQL database from the server. This happens when the owner is missing in the database. Following are the steps to enable owner to the database.

1. Open SQL Server Management Studio via Start --> Program Files --> Microsoft SQL Server 2008 R2 --> SQL Server Management Studio.
2. Login using sa credentials
3. Open Query window from File --> New --> Query with current connection. Alternatively, you can also click on the New Query option displayed below the file menu.
4. Run the query "sp_helpdb DB_Name" (without the double quotes) to check the database properties. Here, DB_Name is the name of the database. The query will show the owner as UNKNOWN.
5. Now, we will assign the owner to the database. For this, first set the desired database as the current database by running the query "Use DB_NAME" where DB_NAME is the name of the database.
6. Run the query "sp_changedbowner sa" (without the double quotes). This query will set 'sa' as the owner of the database.
7. Now, you will be able to access the database and all the tables.


Was this answer helpful?

« Back