Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Change sa Password from cmd (using Windows Auth)

Author  Topic 

1sqlover
Yak Posting Veteran

56 Posts

Posted - 2007-11-30 : 10:40:47
Hello everyone, I am in the process of setting up a new server (as i get the time). I installed SQL Server 2005 several weeks ago and have forgotten the password.

How can I change the password from cmd or gui logged on using windows authentication?

Thanks?

epoh

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-11-30 : 10:48:50
sqlcmd -Q "ALTER LOGIN [sa] WITH PASSWORD=N'asdf'" -S MYSERVER -E


elsasoft.org
Go to Top of Page

1sqlover
Yak Posting Veteran

56 Posts

Posted - 2007-11-30 : 11:03:26
Thank you, that took care of it...

What a life saver!!

epoh
Go to Top of Page
   

- Advertisement -