See also: http://msdn.microsoft.com/zh-cn/library/ms191188 (sql.105). aspx
Ole Automation Procedures Options
[This topic is a pre-published document content that may change in a future release.] Includes blank topics that appear as placeholders. Please note: In order to provide more Chinese content, Microsoft has introduced non-traditional translation methods. In this pre-release version, part of the documentation is translated using non-traditional translations. Microsoft knows that documents translated using non-traditional translations are difficult to perfect, and may have lexical, syntactic, grammatical errors in the content. The official version of this document will be translated using traditional translation, providing the same quality as the previous version of the official version. ]
Use the OLE Automation procedures option to specify whether OLE Automation objects can be instantiated in a Transact-SQL batch. You can also use policy-based management or sp_configure stored procedures to configure this option. For more information, see Understanding surface Area Configurator.
You can set the Ole Automation procedures option to the following values.
-
0
-
Disables OLE Automation procedures. The default value for the new instance of SQL Server.
-
1
-
Enable OLE Automation procedures.
When OLE Automation procedures is enabled, calls to sp_OACreate will start the OLE shared execution environment.
You can use the sp_configure system stored procedure to view and change the current value of the Ole Automation procedures option.
Example
The following example shows how to view the current settings for OLE Automation procedures.
EXEC sp_configure ' Ole Automation procedures '; GO
The following example shows how to enable OLE Automation procedures.
sp_configure ' show advanced options ', 1; Goreconfigure; Gosp_configure ' Ole Automation procedures ', 1; Goreconfigure; GO
SQL Server blocked access to the process ' sys.sp_oacreate ' of the component ' Ole Automation procedures ' because this component was shut down as part of this server's security configuration. System administrators can use the Sp_configur