Error:
SQL Server blocks access to 'sys. sp_oacreate' In The 'ole Automation Procedures 'process because this component has been disabled as part of the Server's security configuration. The system administrator can enable 'ole Automation Procedures 'by using sp_configure '. For more information about enabling 'ole Automation Procedures ', see "peripheral application configurator" in SQL Server books online ". The statement has been terminated.
OLE Automation procedures options
You can use the OLE Automation procedures option to specify whether an OLE Automation object can be instantiated in a Transact-SQL batch. You can also use the peripheral application configurator to configure this option. For more information, see the peripheral application configurator.
You can set the OLE Automation procedures option to the following values.
-
0
-
Disable OLE Automation Procedures. The default value of the new SQL Server 2005 instance.
-
1
-
Enable OLE Automation Procedures.
When OLE Automation procedures is enabled, calling 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.
The following example shows how to view the current settings of OLE Automation procedures.
The following example shows how to enable OLE Automation procedures.
Sp_configure 'show advanced options', 1;
Go
Reconfigure;
Go
Sp_configure 'ole automation procedures ', 1;
Go
Reconfigure;
Go from msdn: http://msdn2.microsoft.com/zh-cn/library/ms191188.aspx
EXEC sp_configure 'ole Automation Procedures ';
GO