MS SQL error fixing

SQL Execution Error

Error Message: Execution of user code in the .net Framework is disabled. Enable "clr Enabled" configurartion option.

sp_configure 'clr enabled'1
GO
RECONFIGURE
GO 

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.

--Enable broker for Notification-based Cache
--Notes: must close any connect sessions before runing this

USE master ;
GO
ALTER DATABASE **** SET ENABLE_BROKER;/ Disable_broker
GO
SELECT is_broker_enabled FROM sys.databases WHERE name = '****' 

 Reference from https://msdn.microsoft.com/zh-cn/subscriptions/securedownloads/ms166035(SQL.90).aspx 

如何在数据库中停用 Service Broker 消息传递 (Transact-SQL)

当消息传递处于不活动状态时,消息将保留在传输队列中。若要确定 Service Broker 对于数据库是否处于活动状态,请检查 sys.databases 目录视图的 is_broker_enabled 列。

ms166035.security(zh-cn,SQL.90).gif安全说明:
停用 Service Broker 会阻止消息从数据库发送或传递到数据库。但是,这不会阻止消息到达实例。若要阻止消息到达实例,必须删除或停止 Service Broker 端点。
SELECT TOP 100 PERCENT seems to prevent SQL Server from spending a lot of time sorting through all the possible query plans.
 

 

原文地址:https://www.cnblogs.com/sandy_liao/p/1756852.html