Exforsys
Results 1 to 4 of 4

Change Password for SQL Server User

This is a discussion on Change Password for SQL Server User within the Database forums, part of the Archive category; Change Password for SQL Server User by David Weber Most security experts' recommendations include changing passwords frequently to enhance security. ...

  1. #1
    admin's Avatar
    admin is offline Administrator Array
    Join Date
    Mar 2005
    Answers
    26

    Change Password for SQL Server User

    Change Password for SQL Server User by David Weber






    Most security experts' recommendations include changing passwords frequently to enhance security. It is easy to change the password on a SQL Server Username via Query Analyzer. Changing the password with Query Analyzer makes it easy to coordinate changing the password on the database server at the same time as it is changed in the connection string. This approach provides the flexibility to change the password at the most appropriate time for the application.

    To change the SQL Server Username password, just connect to the database with Query Analyzer using the SQL Server Username that is being updated and the current password. Then run "sp_password" to change the password.

    sp_password [ [ @old = ] 'old_password' , ]
    { [ @new =] 'new_password' }
    [ , [ @loginame = ] 'login' ]

    The Office Microsoft Documentation for sp_password

    Here is a simple example that changes the current password from
    "currentPSWD" to "newPSWD";

    sp_password 'currentPSWD', 'newPSWD'

    Be sure to use a strong password, "newPSWD" is just an example. I always like to test any change like this right away. For a quick test to confirm that the new password is working, close Query Analyzer and then re-connect with the new password. That is all there is to it, except for changing your connections string. It is obvious, but still critical to remember to change the password in your connection string if this SQL Username is used in your code. Once the password has been changed and tested with Query Analyzer, update the connection string with the new password and test that e verything still works correctly, and you're done.

    David Weber is a support specialist with ORCS Web, Inc. - a company that provides managed hosting services for clients who develop and deploy their applications on Microsoft Windows platforms.


    About the Author

    David Weber is a support specialist with ORCS Web, Inc. - a company that provides managed hosting services for clients who develop and deploy their applications on Microsoft Windows platforms.

  2. #2
    bhv
    bhv is offline Junior Member Array
    Join Date
    Mar 2006
    Answers
    4
    hi, i am new to SQL server 2005. whenever i tried to
    create database through SQL sever Management studio, it asked me:

    server type: (here i select Database Engine)
    server Name : ( ??????????)
    Authentication : (Windows Authentiction is by default, another is SQL
    server Authentication, which one should i select?????????)...


    username:


    password:


    username & p/w acivated only when i select SQL server authentication.


    i don't know what to do with server name .


    if i entered Administrator (which is my computer's name), it gives
    following error:


    cannot connect to Administrator


    An error has occured while establishing a connection to the server. When
    conencting to SQL servr 2005, this failure may be caused by the fact
    that under the default settings SQL server does not allow remote
    connections. (provider: Named Pipes Provider, error: 40 - could not
    open a connection to SQL server) (Microsoft SQL server err: 123)


    i had also tried MSSQLSERVER which is default server name, ".", "LOCAL" as suggested, but same error occurs.

    i don't know what to do with server name . plsssssssssssssss help me

  3. #3
    coco is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    3
    just r install the application. i think u need a new copy of sql 2005 a *Genuine copy*.. or down load the express sql 2005 from the microsoft site. 90 mb its free

  4. #4
    yitiana is offline Junior Member Array
    Join Date
    Aug 2010
    Answers
    1
    Change sql sa password by using command prompt
    Open a command prompt (Start -> Run -> cmd)
    Type the follow commands, and press Enter after each line.
    Osql –S yourservername –E
    1>EXEC sp_password NULL, ’yourpassword’, ’sa’
    2>GO
    The yourservername is the name of your server, yourpassword is the new sql sa password.

    •