Change MSSQL 2005 Express ‘SA’ password From Command Prompt

Written by Mike on October 17, 2008 – 2:20 pm -

SA is the administrative login for the MSSQL. To Change the MSSQL SA password please use following steps:

Step 1. Go to the command prompt of the server ( Start >> Run >> Cmd ) and type in command prompt
osql –L
This command will list all the MSSQL servers near you.

list1 Change MSSQL 2005 Express SA password From Command Prompt

Step 2. Copy full name of required MSSQL server and type
osql -S copied_servername –E
By this command you’ll connect to MSSQL server using Server administrator account (Windows Authentication).

enter Change MSSQL 2005 Express SA password From Command Prompt

Step 3. To change sa password you should execute the following query:
1> sp_password NULL,’new_password’,'sa’
2> go

Here the new_password will be the password which you want to set.

change Change MSSQL 2005 Express SA password From Command Prompt

Now try to login to MSSQL using new password.


Tags: ,
Posted in Windows VPS | 3 Comments »

3 Comments to “Change MSSQL 2005 Express ‘SA’ password From Command Prompt”

  1. Rodney Says:

    Excellent! Thanks heaps.

  2. saleem basha Says:

    Hi..

    as soon as i enter the command
    osql -S copied_servername –E

    i am error message

    [SQL Native Client]TCP provider: No connection could me made because the target machine actively refused it.
    [SQL Native Client]Login timeout expired
    [SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

    Please tell me what to do now to change the sa password..

    Thank you very much in advance

  3. barbara Says:

    Forgot MS SQL Server SA password? SmartKey SQL Password Recovery is a professional MS SQL Server password recovery utility that can easily help to reset lost or forgotten MS SQL Server SA password in minutes without data loss.

Leave a Comment

RSS

  • Subscribe Me

  • Tag Cloud

  • Archives