Friday, December 20, 2013

Msg 15281, Level 16, State 1, Line 1 (The configuration option 'sys.sp_OACreate' does not exist, or it may be an advanced option.)


Scenario:

I was trying to use OLE automation stored procedure "sp_OACreate" for calculating size of the folders and got following error. Use below script to enable "Ole Automation Procedures" using "sp_configure" option. I hope that will help others.


Msg 15281, Level 16, State 1, Line 1

SQL Server blocked access to procedure 'sys.sp_OACreate' of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ole Automation Procedures' by using sp_configure. For more information about enabling 'Ole Automation Procedures', see "Surface Area Configuration" in SQL Server Books Online.


Resolution:

Use master
GO
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
EXEC sp_configure 'Ole Automation Procedures', 1
GO
RECONFIGURE



Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.

Configuration option 'Ole Automation Procedures' changed from 0 to 1. Run the RECONFIGURE statement to install.


No comments:

Post a Comment