The Cmd_shell component of SQL Server 2005 opens the method _mssql2005

Source: Internet
Author: User

The Cmd_shell component in SQL Server is powerful and can be used to implement all of the features of the Windows system, so this component is also the biggest security risk for SQL Server. This component is turned on by default in SQL Server 2000, and this component in SQL Server 2005 is closed as part of this server security configuration by default. Sometimes we need to use this component, and the relevant statements to open this component are as follows:

Copy Code code as follows:

--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


To ensure the security of the database server, it is recommended that the component be closed after use, and the relevant statements for closing the component are as follows:

Copy Code code as follows:

--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 ', 0
Go
--to update the currently configured value for this feature.
Reconfigure
Go

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.