The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Sql Server 2005: xp_cmdshell is turned off? what?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Raymond Lewallen

Posts: 312
Nickname: rlewallen
Registered: Apr, 2005

Raymond Lewallen is a .Net developer and Sql Server DBA
Sql Server 2005: xp_cmdshell is turned off? what? Posted: May 10, 2005 9:09 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Raymond Lewallen.
Original Post: Sql Server 2005: xp_cmdshell is turned off? what?
Feed Title: Raymond Lewallen
Feed URL: /error.htm?aspxerrorpath=/blogs/raymond.lewallen/rss.aspx
Feed Description: Patterns and Practices, OOP, .Net and Sql
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Raymond Lewallen
Latest Posts From Raymond Lewallen

Advertisement

So if you have played around much with Sql Server 2005, you may have noticed something peculiar.  Ok, several things that are peculiar, but I’m only going to mention one.  Have you tried to execute xp_cmdshell?  When you do, you’ll get the following message from the server:

Msg: I don't think so you fool

Msg 15501, Level 16, State 1, Procedure xp_cmdshell, Line 1
This module has been marked OFF. Turn on 'xp_cmdshell' in order to be able to access the module."

Whoa...never seen that one before.  Interesting.  I suppose I’ll just turn it ON, but it took me a little bit of searching to figure that one out too.  To turn it on, there is a “Surface Area Configuration” tool (sounds geometryish) in Microsoft Sql Server programs group that will let you configure this.  You can also execute the following code, which is easier.  I didn’t use the GUI tool, so I don’t have any screenshots or anything, but I read that is where you can configure it if you’re not t-sql kinda person.

Turn it ON

EXECUTE sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO
EXECUTE sp_configure 'xp_cmdshell', '1'
RECONFIGURE WITH OVERRIDE
GO
EXECUTE sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO

And that will enable xp_cmdshell.  So it appears in order to further their efforts in making their server products more secure, Microsoft has graciously turned off xp_cmdshell by default.  Not a bad idea.  If you never use it, then you’ve got a little bit of added security by default.  I guess if you can figure out how to turn it on, then you know enough about Sql Server to know how to secure it too.

Read: Sql Server 2005: xp_cmdshell is turned off? what?

Topic: SubText - .TEXT Forked! Previous Topic   Next Topic Topic: HTML editors

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use