Solved

How to RESET SQL SERVER DATBASE PASSWORD?

Posted on 2011-09-19
11
420 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
  • 4
  • 4
  • 3
11 Comments
 
LVL 29

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
 

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 29

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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 29

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 29

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

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Join & Write a Comment

Suggested Solutions

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Read about achieving the basic levels of HRIS security in the workplace.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently changeā€¦
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

760 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

19 Experts available now in Live!

Get 1:1 Help Now