Solved

How to RESET SQL SERVER DATBASE PASSWORD?

Posted on 2011-09-19
11
429 Views
Last Modified: 2012-05-12
Hello,

I've an application which uses a database running on SQL Server 2000. I forgot the administrator login to the database, so that I can't login into the application. I opened the SQL Manager and changed the password to SA user. But I can't find the username for Administrator.

I think the application stores password inside the database itself. Is there any way to reset the login password to the database?

Any help would be greatly appreciated. Thank you.
0
Comment
Question by:SrinathS
[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
  • 4
  • 4
  • 3
11 Comments
 
LVL 30

Assisted Solution

by:Randy Downs
Randy Downs earned 450 total points
ID: 36562926
change the sa password

http://www.eukhost.com/forums/f31/how-change-mssql-sa-password-511/

1) Go to the command prompt of the server & type in command prompt osql -L
This command will list all the MSSQL servers near you.

2) Copy full name of required MSSQL server & type

Quote:
osql -S copied_servername -E  

By this command you'll connect to MSSQL server using administrator account.
3) To change sa password you should execute the following query:

Quote:
sp_password NULL,'new_password','sa'
go  
0
 
LVL 22

Expert Comment

by:8080_Diver
ID: 36563176
osql -S copied_servername -E


The above command will try to connect to database ied_servername using a Trusted Connection (-E).  Now, if that Trusted Connection doesn't happen to be able to execute system stored procedures, then you will probably not be able to do the next command that was provided.  So, you will need to be logged onto your system as a Windows User that has admin privileges.

I sure wish that I could reply privately because there is a way to reset the sa password without having any access to the database but I don't want to post it here where any hacker could stumble upon it. :-D

0
 
LVL 22

Expert Comment

by:8080_Diver
ID: 36563186
ied_servername should read copied_servername.  

(My keyboard doesn't spell well. :-D )
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:SrinathS
ID: 36563207
I think you guys misunderstood my question. I need to reset the password for a custom database! I've a TopsData database in SQL Server. I can login into SQL Server Manager tool and even I can change the password for SA or create another user.

But I'm looking for a way to reset the custom logins for the database! The database itself stores logins for users!
0
 
LVL 30

Expert Comment

by:Randy Downs
ID: 36563239
Once you have the sa password you can change any user in any database.

The user passwords for the application will be in a table and they might even be plain text.
0
 
LVL 22

Assisted Solution

by:8080_Diver
8080_Diver earned 50 total points
ID: 36563451
Without haviing the schema for the custom database, it is going to be kind of hard to tell you how do anything with it.  

Also, what do you mean by "reset"?  Are you saying that you want to restore the set of logins to the originally installed set of logins?  Or are you wanting to restore the password for "custom logins" to those that were set originally? If you don't know the original passwords and you want to restore those original passwords for the set of users that were originally installed, you may need to contact the source for the software.  Failing that, you may have to reinstall or repair the basic set of software and, hopefully, you can do that without wiping out the data.  
0
 

Author Comment

by:SrinathS
ID: 36563497
I've the database in working stage. I spoke with the application provider and they told me that I need to modify the table to reset the password for an Administrator, so that I can login into the software as an Administrator.

I think, I need to check all tables for login details! :(
0
 
LVL 30

Assisted Solution

by:Randy Downs
Randy Downs earned 450 total points
ID: 36563600
The table is usually called Users or something similar
0
 
LVL 22

Expert Comment

by:8080_Diver
ID: 36563809
I frequently use one I call Permissions; however, as Number-1 has indicated, the tables are usually fairly obvious . . . unless the software provider is extremely paranoid. ;-0
0
 

Author Comment

by:SrinathS
ID: 36564056
It's look different in SQL Server 2000 Manager. I will import it into SQL Server 2005 or 2008 and look for log-in table. Is there any identifies or commands to look for "something" in the database? I mean, Is there any option to search for "something" in the tables? Sorry, I'm completely novice to SQL!

Thanks to everyone for your support.
0
 
LVL 30

Accepted Solution

by:
Randy Downs earned 450 total points
ID: 36566832
Typically the login table will have Username and Password or something along those lines. Perhaps it will also have User Type in which case you want the Administrator. Perhaps there will be a user called Admin or something similar.

If passwords are unencrypted you should be able to just change the password with an update query.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

705 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