forgot the sa password - please help!

  • Hi All,

    We have a test server which was on Domain X, then it was moved to Domain Y and the Domain X has now been closed.

    It seems like I have forgotten the sa password for this box, and thought I should log on as the Local administrator and be able to connect to atleast the master database and then I'll change the sa password. However, its not even allowing me to connect to it as that through Windows authentication. I reckon that's because now the administrator account has also changed (In new domain).

    I am trying to get SYS Admin to let me log on to the box as an administrator on the Domain X.

    Any other ideas will be helpful.

    Thanks,

    TK

  • If you reInstall SQL Service pack 3 it will ask you to provide a new password for the SA Account.

    Type in the new password and you should be all set.

  • Henry,

     

    One entry level doubt!!! If my box is running with SP4 [2040 Build].. what should I do?

    Thanks in advance.

     

    Regards

    Utsab Chattopadhyay

  • If the server got set to use Windows Authentication Only, then the SA account won't work.

    No matter what the server is set for, have the system admin give you a temporary account (or permissions to your account) as DomainAdmin on domain y. That will allow you access via the BUILTIN\Administrator login. Provided that login wasn't removed from SQL Server. Change the SA password and you'll be good to go.

    -SQLBill

  • You cannot recover sa password. But you can access the server using other account with sa privilege, then, reset the password.

  • The problem is that since this was a test server, there is no other account with the same priviledges as sa account.

    The sys admin team let me get on to the box as a Domain Administrator on the old domain. However, I still can't get to the server. I can't understand why it doesn't let me in.

    This server has SQL 2000 SP4 on it. And yes, I set it to mixed mode when I installed SQL 2000 on it. I wonder what will happen if I reinstall SP4 on it. Will it let me install it, or what?

  • Can you log on to the box as local administrator?  The local admin proabably has SQL Server sysadmin permissions from BUILTIN\Administrators.

  • If you set mixed mode and didn't disable builtin admins - log onto box as a local admin, or get your domain account added to the local admins group. Open EM register server using windows authentication and you'll be sysadmin = sa.

    Failing that copy all the mdf and ldf files away. re-install sql server and attach the databases. You can add all your user and msdb this way. OK you lose master info but you can attach this as a user database to extract the login info etc. No problem !!! ( or restore a copy of master as a user database )

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Just thought I'd add that rather than re-install SQL if youve no other options, you can just use the rebuildm.exe.  See BOL

  • Here is a password cracker for SQL Server:

    http://www.ngssoftware.com/products/database-security/ngs-sqlcrack.php

  • You can verify/change the login mode by accessing the following registry key on the server:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\LoginMode

    1=Windows Authentication

    2=Mixed Mode

  • quote: The sys admin team let me get on to the box as a Domain Administrator on the old domain.

    But that box is no longer a part of that domain. You need to have a domain y login with administrator access.

    -SQLBill

  • As I read this I can't help but think... Was the SQL Service set to run as an account on the Old Domain?  Is the sQL server service even started or is it continuing to fail due to incorrect login information?  More likely though you need to get logged into that box either as Local Admin or the Domain Admin of domian y as SQLBill said.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • I just realised what has actually happened! I had installed the evaluation copy of SQL server on it as we didn't have a licencse for this one.

    Any ideas how I can recover the databases?

  • And yes, the SQL service was actually set to run under an account in the old domain.

    Thanks heaps guys - you've given me a lot of insight to this.

    Btw, once the evaluation copy gets expired - is there any way to retrieve the databases?

    -- I would copy the database files to another server, and try to attach them. But not sure what the impact of not detaching them in the first place will be? and what about the users?

Viewing 15 posts - 1 through 15 (of 21 total)

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