If you don't enable xp_cmdshell and you issue a command such as the following to get a directory listing of the C: drive:
xp_cmdshell 'dir c:\'
you get the following error message:
Msg 15281, Level 16, State 1, Procedure xp_cmdshell, Line 1
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', see "Surface Area Configuration" in SQL Server Books Online.
Solution
So in order to use xp_cmdshell whether you are a sysadmin or a regular user you need to first enable the use of xp_cmdshell. Doing this is similar to what was done when enabling the dedicated administrator connection. This can be done by using sp_configure:
or by using the SQL Server Surface Area Configuration as follows:
- launch the SQL Server Surface Area Configuration.tool which can be found under SQL Server 2005 Configuration Tools in the SQL Server 2005 menus
- select "Surface Configuration Area for Features".
- check the box for "xp_cmdshell"
- select "Apply"
Next Steps
- Check whether or not you are using xp_cmdshell for previous versions of SQL Server and enable it if it is still needed when you make the upgrade to SQL 2005
- With a new installation of SQL Server 2005 check to see if you really need this option enabled. From a security perspective it is best to minimize any risks, so keep this option disabled makes the most sense unless there is a real need.
分享到:
相关推荐
——《Microsoft SQL Server 2005 技术内幕:T-SQL程序设计》、《Microsoft SQL Server 2005 技术内幕:T-SQL查询》、《Microsoft SQL Server 2005 技术内幕:查询、调整和优化》、《Microsoft SQL Server 2005 技术...
These interfaces support the amount of DBMSfunctionality appropriate to the data store, enabling the data storeto share its data.Using BDE in SQL Server oriented client/server applications has ...
For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online. 这时怎么办? EXEC sp_configure 'show advanced options', 1 EXEC sp_...
将以下内容保存为 openSql.bat 双击运行即可 代码如下: @echo ========= SQL Server Ports =================== @echo Enabling SQLServer default instance port 1433 netsh firewall set portopening TCP 1433 ...
DAEE supports multiple database sources including ACCESS/ SQLSERVER2000/ SQLSERVER2005/ ODBC/ ORACLE/ EXCEL etc. You can configure connection strings in WEB.CONFIG/ APP.CONFIG through Microsoft ...
Enabling ABAP in Eclipse
OpenFlow-Enabling-Innovation-in-Campus-Network以及中文翻译.docx
There’s also more information about server internals–the way PL/SQL programs are run–than before, better enabling readers to optimize their code for fast and safe execution. Steven Feuerstein ...
Enabling Interactive Jobs in Virtualized Data Centers
Enabling Green Networking with a Power Down Approach in LEO Satellite Constellations
While first concentrating on enabling the transport of relational data via XML with the SQL Server 2000 release, SQL Server 2005 now additionally provides native XML storage and query support....
Enabling Confidential Computing in Cloud with Intel SGX and Library OSes
These interfaces support the amount of DBMSfunctionality appropriate to the data store, enabling the data storeto share its data.Using BDE in SQL Server oriented client/server applications has ...
藏经阁-RISELab_ Enabling Intelligent.pdf
Agile Application Security Enabling Security in a Continuous Delivery Pipeline 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
信息安全_数据安全_Enabling and Reducing the Barrie 漏洞分析 安全工作 区块链 安全架构安全芯片
Agile Application Security Enabling Security in a Continuous Delivery Pipeline 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或...
Agile Application Security Enabling Security in a Continuous Delivery Pipeline 英文azw3 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
一片很好的OPENFLOW论文,了解OPENFLOW的系统,是综述类
PAPER_07_Enabling 6.4-Gbps pin LPDDR5 using bandwidth Improvement Techniques.pdf