Làm thế nào để thay đổi mật khẩu SA

How to change your SA password



  1. On the computer that is hosting the instance of MSDE to which you are connecting, open the command prompt window.

  2. Type the following command, and then press ENTER:

    osql -U sa

    At the Password: prompt, press ENTER if your password is blank or type the current password. This connects you to the local, default instance of MSDE by using the sa account. To connect by using Windows authentication, type this command: use osql -E

    Note If you are using SQL Server 2005 Express, avoid using the Osql utility, and plan to modify applications that currently use the Osql feature. Use the Sqlcmd utility instead.

    For more information about the Sqlcmd utility, visit the following Microsoft Developer Network (MSDN) Web site:
    http://msdn2.microsoft.com/en-us/library/ms165702.aspx

  3. Type the following commands, on separate lines, and then press ENTER:




    sp_password @old = null, @new = 'complexpwd',  @loginame ='sa' 
       go



    Note Make sure that you replace "complexpwd" with the new strong password. A strong password includes alpha-numeric and special characters, and a combination of upper and lower case characters.

    You will receive the following informational message, which indicates that your password was changed successfully:




    Password changed.




    ---------------------------------------------------------------------------





  1. Trên máy tính là lưu trữ trường hợp MSDE mà bạn đang kết nối, mở cửa sổ dấu nhắc lệnh.

  2. Gõ lệnh sau, và sau đó nhấn ENTER:osql - U sa

    Tại các mật khẩu: nhắc, nhấn ENTER nếu mật khẩu của bạn là trống hoặc gõ mật khẩu hiện thời. Điều này kết nối bạn cho trường hợp mặc định địa phương, MSDE bằng cách sử dụng tài khoản sa . Để kết nối bằng cách sử dụng xác thực của Windows, hãy gõ lệnh này: sử dụng osql e 

    Lưu ý Nếu bạn đang sử dụng SQL Server 2005 Express, tránh sử dụng các tiện ích Osql, và kế hoạch để sửa đổi các ứng dụng hiện đang sử dụng các tính năng Osql. Thay vì sử dụng các tiện ích Sqlcmd.

    Để biết thêm chi tiết về các tiện ích Sqlcmd, ghé thăm Web site sau của Microsoft phát triển mạng (MSDN):
    http://msdn2.Microsoft.com/en-US/Library/ms165702.aspx

  3. Gõ lệnh sau, trên đường riêng biệt, và sau đó nhấn ENTER:




    sp_password @old = null, @new = 'complexpwd',  @loginame ='sa' 
       go



    Lưu ý Hãy chắc chắn rằng bạn thay thế "complexpwd" với mật khẩu mới mạnh mẽ. Một mật khẩu mạnh bao gồm alpha-số và đặc biệt nhân vật, và một sự kết hợp của Thượng và ký tự trường hợp thấp hơn.

    Bạn sẽ nhận được thông báo thông tin sau đó chỉ ra rằng mật khẩu của bạn đã được thay đổi thành công:




    Thay đổi mật khẩu.



    support.microsoft.com

Post a Comment

Previous Post Next Post