MSSQL installed by default is the SA user, most users will always use SA this user, so the database has a great security problem, if we can change the SA user name, so that the security level is a layer higher oh, let's look at the way to modify the SA user name.
The simplest code is as follows
The code is as follows |
Copy Code |
Alter LOGIN SA DISABLE Alter LOGIN sa with NAME = [Systemaccount] |
Leveraging Enterprise Manager
First, run the following code in the Query Analyzer for Enterprise Manager (note that the role of the user name that goes into Query Analyzer is System administrator and is the DB owner for each database):
The code is as follows |
Copy Code |
sp_configure ' allow updates ', 1 Go RECONFIGURE with OVERRIDE Go And then run the following code Update sysxlogins set name= ' You want to change the name ' where sid=0x01 Update sysxlogins set sid=0xe765555bd44f054f89cd0076a06ea823 where name= ' you want to change the name ' Then: sp_configure ' allow updates ', 0 Go RECONFIGURE with OVERRIDE Go |
Then, if you look at the role of SQL Server, you will find the username of the SA, which has been changed to your new name.
Here's a graphic description
Step one, log on to SQL Server 2005 with Windows authentication
After successful login, go to the following screen:
We select the current server,
Select the current server and right-click its properties:
After you right-click its properties, it appears, and then, click Security
In security, select SQL Server and Windows Authentication mode
Just click "OK".
The second step, modify the user sa password:
Click Security--Login name-->sa Then, right-click the SA and click its properties
After you right-click the SA and click its properties, the following picture appears:
In the login properties of the user SA, click General, select SQL Server authentication, and set the login password.
Then, we click the status
In "Status", we select "Enable" in "sign in", i.e. "sign in"---> "Enable". Finally, click OK to finish.
Source: http://www.111cn.net/database/mssqlserver/42245.htm
Multiple ways to change the user name of SA in Mssql Server2005