代码如下:
use master
exec sp_dboption 'Era','offline','true'
restore .....
exec sp_dboption 'Era','offline','false'
执行:
use master
exec SP_DBOPTION 'Era','offline','true'
出现提示错误:
Server: Msg 5160, Level 16, State 1, Procedure sp_dboption, Line 435
Cannot take 'Era' offline because the database is in use.
Server: Msg 15245, Level 16, State 1, Procedure sp_dboption, Line 438
DBCC DBCONTROL error. Database was not placed offline.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
use master
exec sp_dboption 'Era','offline','true'
restore .....
exec sp_dboption 'Era','offline','false'
执行:
use master
exec SP_DBOPTION 'Era','offline','true'
出现提示错误:
Server: Msg 5160, Level 16, State 1, Procedure sp_dboption, Line 435
Cannot take 'Era' offline because the database is in use.
Server: Msg 15245, Level 16, State 1, Procedure sp_dboption, Line 438
DBCC DBCONTROL error. Database was not placed offline.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
解决方案 »
- vc++2008下用哪种方法实现串行通信?
- VC6.0里编译的windows代码在VS2005里面不能够编译怎么办?
- 写好代码后怎么生成可发布的程序(详细步骤谢谢)
- 如何在初始化时使CListBox的第一项得到焦点
- MFC中的宏的问题
- 请教大虾:在VC++中有没有好看的控件 第三方的也行 比如像Delphi里的DevExpress
- DAO不支持多线程,是不支持对数据库操作多线程,还是整个用DAO的软件都不能用多线程了?
- 我想知道win32编程和mfc编程的不同之处以及win32编程的注意事项
- 把JPG图片转换成BMP格式用PICTURE 控件显示出来的问题,急
- 类与类间的相互访问
- 关于socket关闭后的错误,有人碰见过吗?
- 使用List Control时,如何把选中的Item的LV_ITEM结构取出来?大虾帮忙,谢谢!!!
我试过:
exec master.dbo.sp_dboption 'Era','single user','true'
结果:
Server: Msg 15089, Level 11, State 1, Procedure sp_dboption, Line 400
Cannot change the 'single user' option of a database while another user is in the database.