Exforsys

Online Training

Change Password for SQL Server User

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


Go Back   Exforsys > Articles and Tutorials > SQL Server 2005 Tutorials

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-09-2005, 06:22 AM
admin's Avatar
Administrator
 
Join Date: Mar 2005
Location: New York, USA
Posts: 302
admin has disabled reputation
Send a message via Yahoo to admin
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-19-2006, 11:58 PM
bhv bhv is offline
Junior Member
 
Join Date: Mar 2006
Posts: 5
bhv is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-07-2006, 11:09 AM
Junior Member
 
Join Date: Apr 2006
Posts: 3
coco is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new questions
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.