The SQL Server Service Broker for the current database is not enabled
2016-10-24 22:17
876 查看
把一个数据恢复至另一个服务器上,出现了一个异常:
Source Code
The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications.
截图如下:DECLARE @DBName SYSNAME SET @DBName = 'Tutorial' --'Your DB Name' DECLARE @spid INT SELECT @spid = MIN(spid) FROM [MASTER].[dbo].[sysprocesses] WHERE dbid = DB_ID(@DBName) WHILE @spid IS NOT NULL BEGIN EXECUTE ('KILL ' + @spid) SELECT @spid = MIN(spid) FROM [MASTER].[dbo].[sysprocesses] WHERE dbid = DB_ID(@DBName) AND spid > @spid END EXECUTE('ALTER DATABASE '+ @DBName +' SET ENABLE_BROKER') --DISABLE_BROKER
Source Code
相关文章推荐
- The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported.
- Service Broker message delivery is not enabled in this database. Use the ALTER DATABASE statement to
- The origin server did not find a current representation for the target resource or is not willing to
- Issue: Server principal is not able to access the database under the current security context
- (SQR 1933) The month (9月 -2012_02:01:36.000000_下午) is not valid for the current locale or database.
- The origin server did not find a current representation for the target resource or is not willing to
- The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.报该错误的一种原因。
- mongo11---Access control is not enabled for the database
- The origin server did not find a current representation for the target resource or is not willing to
- WCF : 修复 Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service 问题
- Understanding the error message: “Login failed for user ''. The user is not associated with a trusted SQL Server connect
- ArcSDE for SQL Server建库提示:Case sensitive database is not supported
- Restore SQL Server 2005 error : "The tail of the log for the database "TEST1" has not been backed up."
- 启动MongoDB提示报警信息:“WARNING: Access control is not enabled for the database.”
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- This article provides a fix for the error: Login failed for user “. The user is not associated with a trusted SQL Server
- 删除sybase一列报错:The 'select into' database option is not enabled for database.....
- The server principal "sa" is not able to access the database "xxxx" under the current security context
- SQL SERVER2008 EXPRESS setup -- the specified credentials for the sql server service are not valid
- SQL Server 2008安装报错:The specified credentials for the sql server service are not valid