Solved

Change an Existing sa password

Posted on 2007-11-23
9
1,493 Views
Last Modified: 2008-07-15
We have had to upgrade from MSDE to SQL 2005 Express.  I am unable to restore the data because of an install goof by our developers.  I need to change the sa password.  I have the old password, and I have the new password. but I don't know how to change the sa password to finish this upgrade.  
0
Comment
Question by:paul_brinkman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20340525
check out the sp_password procedure.
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 20340669
Change a password
This example changes the password for the login Victoria from ok to coffee.

EXEC sp_password 'ok', 'coffee'
0
 

Expert Comment

by:Pawel Lijewski
ID: 20748371
sp_password returns: Cannot alter the login 'sa', because it does not exist or you do not have permission.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 20748379
sp_Password @Old = 'putOldPassword', @Nen = 'newpassword', @loginame ='sa'
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 20748383
sorry typo


sp_Password @Old = 'putOldPassword', @New = 'newpassword', @loginame ='sa'
0
 

Expert Comment

by:Pawel Lijewski
ID: 20752173
what if you don't have old_password ?
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 20752182
it is not necessary that you need the old passoword in the above part

You just need to provide the  @New and @loginaname
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 21606997
So you've sorted it all out now?
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question