Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database already exists even after deleting the database files

I installed a trading software that uses pair specified and gives me details about it. For initiating the software I have to create a database that it uses to store and retrieve information from. Now I have deleted the database(mdf and ldf file) and now when I create it again it shows that database already exists error. Do I have to delete DSN or something? I can do create database using another sql server instance, but I want to do on the same one. I am clueless. Thanks in advance.

like image 290
Aman Chhabra Avatar asked Feb 14 '14 07:02

Aman Chhabra


1 Answers

The database information is maintained by sql server express. So just deleting the file doesn't remove the database from sql server. You need to detach the database and then your logic should work. Try sql server management studio express 2008. Or try connect to sql server express programmatically and execute sp_detach_db permissions.

Source : MSDN

like image 62
Mogli Avatar answered Dec 07 '22 23:12

Mogli