Recently in Plesk database management we had a request regarding the deletion of a database. And as usual, selected the database, clicked the “Remove database” and option and voila! I was welcomed with the generalized error
” The operation you were performing failed.You can retry the operation with or without changing its parameters. You may also want to report this problem to our support so that we could help you as soon as possible”.
I wondered whether the issue was with the database user deletion. Hence I decided to delete the user first and try again. There also the problem exists. Time for handson!! ð
Fired up Microsoft SQL server Management Studio Express and found the requested database and tried deleting those manually. Got the error that one of the table already exists. Why does it alert me that a table exists when I am trying to delete a database itself ? Deleted the table first and then tried deleting the DB itself from plesk and unfortunately that didn’t work either.
So I went ahead with deleting the corresponding database through the Microsoft SQL server Management Studio Express. The database deleted, but the entry in plesk was still there. I couldn’t delete the entry from plesk. Poor plesk rightly pointed out that it couldn’t locate the entry in sysdatabase for the particular database.
Delete database user failed: Could not locate entry in sysdatabases for database ‘db_name_name’. No entry found with that name. Make sure that the name is entered correctly
So in order to overcome this issue, I had to fool around, by manually creating a new database with the same database name of the previously deleted one. This time it was not in a mood to let go of my spirit that easily ð
It showed some error that it couldn’t create the database as the .mdf of the previously deleted database was there in the specified path.
Create failed for Database ‘db_name_name’. (Microsoft.SqlServer.Express.Smo)
CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Cannot create file ‘C:\Program Files\Microsft SQL Server\MSSQL.1\MSSQL\DATA\db_name_name.mdf’ because it already exists. Change the file path or the file name, and retry the operation.
Solution was to move the .mdf file of the previous database which was not deleted from the previous deletion to some other location and tried again, creating the database. This time it worked and created the database with the same name. That enabled me to delete the entry of the particular database from the plesk panel and from the DB itself.
Wohoo that was the end of yet another DB deletion story .