问题描述
我安装了一个交易软件,使用指定的对,并给我详细介绍。对于启动软件,我必须创建一个数据库,它用来存储和检索信息。现在我已经删除了数据库(mdf和ldf文件),现在当我再次创建它显示数据库已经存在错误。我必须删除DSN或什么吗?
我可以使用另一个sql服务器实例创建数据库,但我想在同一个。
我很无能。提前感谢。
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.
推荐答案
数据库信息由sql server express维护。所以只是删除文件不会从sql server中删除数据库。你需要分离数据库,然后你的逻辑应该工作。尝试使用sql server management studio express 2008.或者尝试以程序方式连接到sql server express并执行sp_detach_db权限。
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.
源:MSDN
这篇关于即使删除数据库文件后,数据库也已存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!