Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9204705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:46:21+00:00 2026-06-17T23:46:21+00:00

Possible Duplicate: Enable ‘xp_cmdshell’ SQL Server When I run xp_cmdshell command in SQL Server

  • 0

Possible Duplicate:
Enable ‘xp_cmdshell’ SQL Server

When I run xp_cmdshell command in SQL Server 2012, I get the following message:

SQL Server blocked access to procedure ‘sys.xp_cmdshell’ of component ‘xp_cmdshell’
because this component is turned off
as part of the security configuration for this server.
A system administrator can enable the use of ‘xp_cmdshell’
by using sp_configure. For more information about enabling ‘xp_cmdshell’,
search for ‘xp_cmdshell’ in SQL Server Books Online.

But, in SQL Server 2000 this query is executed successfully.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:46:22+00:00Added an answer on June 17, 2026 at 11:46 pm

    This has been disabled out of the box starting with SQL Server 2005, when they introduced the Surface Area Configuration Tool, in an effort to make SQL Server more secure by default. That tool has since been retired, but you can still control the behavior using sp_configure. An example is shown on MSDN:

    -- To allow advanced options to be changed.
    EXEC sp_configure 'show advanced options', 1
    GO
    -- To update the currently configured value for advanced options.
    RECONFIGURE
    GO
    -- To enable the feature.
    EXEC sp_configure 'xp_cmdshell', 1
    GO
    -- To update the currently configured value for this feature.
    RECONFIGURE
    GO
    

    (I also blogged about this many years ago.)

    The reason is that this is a potential security hole. If you allow SQL Server to execute xp_cmdshell, then they can theoretically send any operating system command there, bypassing any and all security you thought you had. This is especially problematic when the SQL Server service account and/or the proxy account have been elevated to sysadmin or other levels because that’s easier than explicitly defining only the exact things they should be able to do.

    Rather than enable it and disable it to support command-line interaction, a popular way to expose operating system functionality while still having some control over security is to implement the OS-level functionality you need using SQL-CLR. Here is a good starting point for accessing the file system with CLR (however if you search around you will find much more modern and exhaustive approaches).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Display Enable JavaScript message only when JavaScript is disabled I have a
Possible Duplicate: Cannot connect to SQL SERVER 2000 I am using php 5.3.1 to
Possible Duplicate: Entity framework 4 not closing connection in sql server 2005 profiler Well,
Possible Duplicate: How can I disable/enable UISearchBar keyboard's Search button? Can we disable the
Possible Duplicate: How to use enable_if to enable member functions based on template parameter
Possible Duplicate: How to enable or disable an anchor using jQuery? I've got an
Possible Duplicate: Ways to circumvent the same-origin policy Is it possible to enable cross-domain
Possible Duplicate: get current latitude and longitude from gps enabled device I use the
Possible Duplicate: Enable GPS programatically like Tasker Anybody know how to enable the GPS
Possible Duplicate: Enable GPS programatically like Tasker Is it possible to programmatically turn on/off

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.