我用這個查詢關閉到SQL Server(Windows身份驗證)我關閉SQL連接和最多
alter database YourDb set single_user with rollback immediate
所有的連接不能打開它回來,現在我得到我的web應用程序此錯誤
Cannot open database "DataCleanup" requested by the login. The login failed.
Login failed for user 'BIVAR\DEV_WEB_VM$'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database "DataCleanup" requested by the login. The login failed.
Login failed for user 'BIVAR\DEV_WEB_VM$'.
源錯誤:
Line 91:
Line 92: {
Line 93: sqlCon2.Open();
Line 94: {
Line 95: //PM3-PM5-PR
我不知道如何再次打開每個人的連接?
並關閉連接... – Hitsugaya
你的DBA說什麼? –
此帖可能有幫助 - http://stackoverflow.com/questions/14652923/set-database-from-single-user-mode-to-multi-user。 – bsivel