Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 SQL Server 2005 - Disable Extended Stored Procedur

Author  Topic 

gkelly
Starting Member

2 Posts

Posted - 2009-11-05 : 19:30:49
Hi All,

I had a question regarding disabling extended stored procedures for security purposes in SQL Server 2005. For example, if I want to disable "xp_regread" I tried the following command:

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
exec sp_configure 'xp_regread', 0;
GO
RECONFIGURE;
GO

However, I get the following error message: "Msg 15123, Level 16, State 1, Procedure sp_configure, Line 51
The configuration option 'xp_regread' does not exist, or it may be an advanced option."

Does anyone know why this is happening and is there a different method I should use to disable extended stored procedures? This is the only method that I've been able to find online.

Thanks for any insight in advance,
Gregg

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-11-05 : 20:39:00
DENY EXECUTE ON xp_regread TO PUBLIC

The only XP that has a configuration option is xp_cmdshell.
Go to Top of Page

gkelly
Starting Member

2 Posts

Posted - 2009-11-06 : 10:19:49
quote:
Originally posted by robvolk

DENY EXECUTE ON xp_regread TO PUBLIC

The only XP that has a configuration option is xp_cmdshell.



Thanks for the response, I will certainly try that out.

However I have a question....we scanned our server with a SQL security tool and it said a lot of XP's were set to "1". Would this command you provided disable them and set them to "0"?

Thanks,
Gregg
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-11-06 : 16:12:21
There's no "disabling" of extended procedures, the DENY command specifically denies permission to execute it, it's the closest equivalent of what you're looking for.
Go to Top of Page
   

- Advertisement -