Change the user name and password for SA in SQL Server 2005

Source: Internet
Author: User
Tags microsoft sql server 2005 management studio microsoft sql server management studio sql server management sql server management studio

The code for modifying the database SA account name is as follows: ALTER LOGIN SA DISABLE ALTER login SA with name = [Systemaccount] "Systemaccount" is the new name of SA, refresh right after execution is done Side login name to see the name of the account that was successfully modified. SQL Server 2005 modifies the method for the SA user password by drawing up Method 1 of modifying the SA user password in SQL Server 2005. Click "Start-All Programs-Microsoft SQL Server 2005-configuration tools-SQL Server Configuration Manager" to open the SQL Server Configuration Manager window 。 As shown in: SQL Server Configuration Manager dialog box 2. Open SQL Server 2005 Network Configuration, click on the "SQL2005 protocol (here, use our installed instance name)" Entry as shown in: Click on "SQL2005 Protocol" entry 3. Right-click on the "Named Pipes" button on the right and click "Enable" in the Popup submenu to bring up the "Warning" dialog box. As shown in: Warning dialog box 4. Click the "OK" button. 5. Open "SQL Native Client Configuration" and click on the "Client Protocol" entry. As shown: Click on "Client Protocols" item 6. Right-click on the "Named Pipes" button on the right and click on the "Enable" command in the Popup submenu. Close the SQL Server Configuration Manager window. 7. Click "Start-All Programs-Microsoft SQL server 2005-sql server Management Studio" and select "Windows Authentication" in the "Connect to Server" window. As shown in: Select Windows authentication 8. Click the "Connect" button to sign in to "Microsoft SQL Server Management Studio". 9. Right-click on the instance name \ (SQL Server 9.0.5000) in the Object Explorer window and select the Properties command from the Popup submenu. As shown: Select Properties Command 10. Open the Server Properties window. As shown in: Server Properties Window 11. Select the security item in the Select a page, and in Server Authentication select the SQL ServER and Windows authentication mode item, and then click the OK button. 12. In the Object Explorer window, open the security entry, open the login name entry, right-click the SA, and select Properties from the Popup submenu. As shown: Select Properties Command 13. Open the Login Properties window. As shown in: "Login Properties" window 14. After changing the password, remove the tick (√) in front of "Enforce Password Policy" and click the "OK" button. At this point, the password modification of the SA user in SQL Server 2005 succeeds! 15. Start SQL Server Management Studio, and in the Connect to Server dialog box, select SQL Server Authentication. As shown in: Select SQL Server authentication 16. Start SQL Server Management Studio successfully by entering "sa" in the "Login name" box, entering the modified password, and then tapping the "Connect" button! Second, use the SQL statement to modify the password preference of the SA user in SQL Server 2005, start SQL Server Management Studio using Windows Authentication, and second, in the Server Properties window, select SQL Server and Windows authentication Mode item, and then cancels the "Enforce password Policy" entry. Finally, execute one of the following code in new query: code one: ALTER LOGIN sa ENABLE; GO ALTER LOGIN sa with PASSWORD = ' PASSWORD '; Go code two: Alter login SA with PASSWORD = N ' new password '-can be used this way: with PASSWORD = N ' 123456 ' old_password = n ' old password ' code three: ALTER login [SA] With Password=n ' newpassword '--can not provide old password--alter login [sa] with password=n ' 123456 '

Change the user name and password for the SA in SQL Server 2005

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.