How to enable and disable advance options and Ole Automation Procedures in SQL Server 2005

The system stored procedures in SQL Server are very useful. You can find a system stored procedure to do almost any task. However, in order to use these stored procedures, you need to enable Ole Automation Procedures.

In SQL Server 2005, the option is disabled by default.

You might recieve an error similar to the following

SQL Server blocked access to procedure 'sys.sp_OACreate of component 'Ole Automation Procedures

if you are trying to use the Ole Automation Procedures and the option is turned off.

You will need to enable advance options before enabling Ole Automation Procedures.





1. Use the following code to show the current status of advance option and Ole Automation procedure status.

-- Show Advance Options, 0 = disabled, 1 = enabled
EXEC sp_configure 'show advanced options';
GO

-- Show Ole Automation Procedures, 0 = disabled, 1 = enabled
EXEC sp_configure 'Ole Automation Procedures';
GO

2. Use the following code to enable the advance option and Ole Automation Procedures.

-- Enable the Advance options if they are not already turned on
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO

-- Enable the Ole Automation Procedures
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO

3. Use the following code to disable the advance option and Ole Automation Procedures.

-- Disable the Advance options
sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO

-- Disable the Ole Automation Procedures
sp_configure 'Ole Automation Procedures', 0;
GO
RECONFIGURE;
GO

Hiç yorum yok:

Visual Studio 2017'de Devexpress 17.2.5 Toolbox görünmüyor

Visual Studio 2017 Toolbox'ı üzerinde Developer Express componentlerini göremiyorsanız aşağıdaki komutu çalıştırmak işini görecektir. (...