使用management studio登录后,c#app无法登录sqlexpress [英] c# app can't login into sqlexpress after login with management studio

查看:95
本文介绍了使用management studio登录后,c#app无法登录sqlexpress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个使用本地sqlexpress 2012数据库的VS c#app。如果我登录到SQL Server Management Studio,然后断开连接或注销,则在我重新启动SQL Server(sqlexpress)服务之前,该应用程序将无法运行。如果我使用sqlcmd访问数据库,也会出现同样的情况。显然整个数据库都被锁定并且不会释放。



我将编写一个ServiceControl方法来通过重新启动sqlexpress服务来解决这个问题。我不喜欢使用sp_attach_db / sp_detach_db。



VS和sqlExpress的这种通信问题不正常。有人有解决方案吗?



sqlexpress中是否存在我缺少哪些应用程序可以很好地共享的配置?



谢谢,



Rick

解决方案

< blockquote>我认为问题是Management Studio没有断开连接,Express只支持一个用户。所以你必须让它注销,所以其他人可以登录。我不知道你是怎么做的。


Hi,
I have a VS c# app using a local sqlexpress 2012 database. If I login to SQL Server Management Studio, then disconnect or logout, the app won''t work until I restart the SQL Server(sqlexpress) Services. This same scenario also occurs if I access the database using sqlcmd. Apparently the whole database gets locked and doesn''t release.

I am about to write a ServiceControl method to handle this problem by restarting the sqlexpress Service. And I don''t like using sp_attach_db/sp_detach_db.

This communication problem with VS and sqlExpress can''t be normal. Does anyone have a solution to this?

Is there a configuration in sqlexpress that I am missing where both applications can share nicely?

Thanks,

Rick

解决方案

I think the issue is that Management Studio does not disconnect and Express only supports one user. So you have to get it to log out, so someone else can log in. I am not sure how you do that.


这篇关于使用management studio登录后,c#app无法登录sqlexpress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆