lost passwords--any hope?

  • This has probably been asked before. Small company, the former IT people long gone. A SQL Server 2005 database exists, but there's no record of any loginname/password, including sa. And yes, we did try sa and blank. Is there any hope?

  • Do have the administrator password to the Windows server administrator account that the database instance resides on? If so, and if the former admin did not remove the BUILTIN/administrators group from the 'sysadmin' role, you should be able to log in to the database instance using Windows Authentication.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • Sorry I should have mentioned I tried that.

  • Try single user mode then:

    http://blogs.msdn.com/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • Before taking the system down and putting SQL Server in single user mode, try adding your windows domain account to the SQL Server specific windows groups on the server. Those groups, by default - have sysadmin rights to SQL Server.

    You should be able to add your account and then login using windows authentication.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • i think you can use the Surface Area Configuration tool to add yourself as an administrator, and then change the passwords of the lost admins, including "sa", right?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell, if that functionality adds the users to the right local windows groups - then yes, that should work. If it doesn't, then it will need to login to SQL Server with admin rights - which isn't known.

    My bet is that it adds the user(s) to the appropriate windows groups and not to SQL Server.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • I'm not sure what you mean by SQL Server-specific windows groups.

  • middletree (5/4/2010)


    there's no record of any loginname/password, including sa. And yes, we did try sa and blank.

    then how do you login now ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • I can't log in. I know the DB exists, but can't get in.

  • If the sql server is running under a domain service account, then you could very gingerly go into AD and change the password, the RDP into the SQL Server using that account.

    I will point out that any other servers out there using the same account could be in a world of hurt if the password is changed.

    /* ----------------------------- */
    Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!

  • the utility i described should work for you;

    i found out the hard way on a new Windows7 laptop; the security is tighter, and it does not automatically add the person installing SQL or the Builtin\Administrators to SQL Server users, so you have to use the surface area configuration to add yourself. Brand new isntall, and i was locked out of it.

    this functionality adds the login of your choice to the SQL server sysadmin group. it does not add it to the Builtin\Administrators group, which may or may not have been removed.

    you should be able to do the same, then just make sure when you try to login that you use Windows Authentication:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • middletree (5/5/2010)


    I'm not sure what you mean by SQL Server-specific windows groups.

    Right-click on My Computer and select Manage.

    Open the section for Local Users and Groups

    Select the Groups

    In that section are all of the local windows groups available on that server. There should be several groups that are named like:

    SQLServer2005...

    Find the group for SQL Server User that is named:

    SQLServer2005MSSQLUser${your instance name}

    Add your windows login to this group and you should be able to connect to that instance of SQL Server. Those groups are defined by default as sysadmin in SQL Server.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • middletree (5/4/2010)


    This has probably been asked before. Small company, the former IT people long gone. A SQL Server 2005 database exists, but there's no record of any loginname/password, including sa. And yes, we did try sa and blank. Is there any hope?

    Don't know if this will help...

    http://deepakrangarajan.blogspot.com/2008/01/forgot-sa-password-in-sql-server-2005.html

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply