Solved

Change an Existing sa password

Posted on 2007-11-23
9
1,489 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
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 142

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
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 20748379
sp_Password @Old = 'putOldPassword', @Nen = 'newpassword', @loginame ='sa'
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Exceptions 3 37
email about the whoisactive result 7 23
Can someone plz fix this..getting an error 3 18
SQL Field Length for Email Address 3 16
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now