[SQL Server] deleting SA users in SQL Server

Source: Internet
Author: User
Tags configuration settings strong password
Delete SA users in SQL Server

Keywords: SQL Server, MSSQL, SQL

As we all know, there is an account SA that is definitely a hidden danger in network security in SQL. By default, it is assigned to the fixed server role SysAdmin and cannot be changed. Generally, this SA cannot change or delete the name. It is a little tasteless. After I installed SQL Server 2000, I was never at ease. I was worried that a password was cracked one day. Maybe you would say that it is feasible to set a strong password, but it is not very secure. The so-called "Hacking" requires root removal. If you delete SA, you don't have to worry about brute force cracking. 
Well, I 've talked about pulling so much nonsense for a long time. Maybe you're impatient with it. Well, that's the question. First, open the Enterprise Manager in SQL, on the "Tools" tab, select "SQL Server Configuration properties" and click "Server Settings". Can you directly modify the front box of the system directory and click "OK. 
Open the query analyzer and log in. (You can use any account, but you must have the db_owner permission in the master database.) Enter: 

Update sysxlogins set name = 'name you want to change to 'where SID = 0x01update sysxlogins set SID = 0xe765555bd44f054f89cd0076a06ea823 where name =' name you want to change'

OK, the execution is successful, good pull, switch to the Enterprise Manager and refresh the login in security to see if SA is changed to xwq pull. Haha, right-click xwq and choose whether to show the option of pulling and deleting, delete. Check if SA has not been pulled. 

The method of deleting SA directly in the query analyzer is similar to that mentioned above, but this time it is not in the Enterprise Manager, instead, SQL provides us with powerful stored procedures to complete this task. The following describes the Stored Procedure sp_configure and sp_configure to be used to display or change the global configuration settings of the current server. 

Its Syntax:

Sp_configure [[@ configname =] 'name'] [, [@ configvalue =] 'value'] instance: sp_configure 'Allow updates', 1 goreconfigure with overridego

Good pull, so that we can update the system table pull. Next we will pull the update sysxlogins set name = 'you want to change to the name 'where SID = 0x01, then Delete "the name you renamed" 
However, note that the execution permission without parameters (or only the first parameter) on sp_configure is granted to all users by default. Execution permission of sp_configure with two parameters (used to change configuration options) is granted to SysAdmin and serveradmin fixed server roles by default. Reconfigure permissions are granted by default to SysAdmin fixed server roles and serveradmin fixed server roles, and cannot be transferred 

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.