SA Password Reset\Recovery

  • My first questions would be

    did you manage to start the instance using

    [Code="other"]

    SQLServr.Exe –m[/code]

    if you didn't manage to start the instance what error did you get for the login failure (check the sql server error log or the windows application log)?

    Use the following from one cmd window

    [Code="other"]

    SQLServr.Exe –m -sInstancename[/code]

    The instance should start and should display messages like "starting tempdb".

    Then in a 2nd cmd window run

    SQLCMD –S <Server_Name\Instance_Name> -E

    CREATE LOGIN ‘<Login_Name>’ with PASSWORD=’<Password>’

    GO

    SP_ADDSRVROLEMEMBER '<Login_Name>','SYSADMIN'

    Please post back details of any errors you receive and at what point

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • I keep going back and checking my windows account thinking they permissions aren't right but they look fine. Its not like I haven't done this before. All I can think if is it has to be with my windows Account but I can't find anything wrong with it.

    Error messages received

    SQLServr.Exe –m (-m not recognized)

    SQLServr.Exe –m -sInstancename (-m not recognized)

    SQLCMD –S <Server_Name\Instance_Name> -E (Failed login)

    I had got logged in once, and received"

    CREATE LOGIN ‘<Login_Name>’ with PASSWORD=’<Password> ’Failed on Privileges (I don't recall exact message)

  • can you provide a screenshot of the error in the cmd window?

    are you copying and pasting the command into the command window?

    When connecting to the instance use

    SQLCMD –S Server_Name\Instance_Name -E

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • today when trying to start instance I am receiving

    SQLServr.exe -m

    SQLServr.exe is not recognized as an internal or external command, operable program, or batch file

    SQLcmd -S ServerName -E

    Unable to provide the screen shot but, it says "Login Failed for User"

    I really think this has to do with the domain controller aspect of the equation.

    Can you tag members in questions?

  • I resolved my issue with a bit of help from various resources. I uploaded a document on what I did to get Admin rights back.

    Thank you everyone.:hehe:

  • that document doesn't do anymore than what you say you were doing except that your directly modifying the service startup.

    Inconsistencies I can see are you start a default instance of sql server from the command prompt

    SQLServr.Exe –m

    Then you try and connect to a named instance

    SQLCMD –S <Server_Name\Instance_Name>

    Anyhow at least you have it working now

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks for the document, and that works, but starting from a command line also works. If it doesn't work, I suspect you don't have rights or you needed to specify an instance.

  • I could not start SQL Server in single user mode from the command line. I had to alter the Start up properties to work.

    1) All references said to place a -m;C:\.... in the Start up Parameters section at the front. This did not work. [highlight=#ffff11]I had to place it at the end, and the text I had to use was -m sqlcmd

    [/highlight]

    2) Another option provided was to open via the command line in single user mode the SQLsrvr.exe -m this did not work either -m unrecognizable

    3) sqlcmd -m also the -m unrecognizable

    The configuration of the SQL Server had the option turned off

  • swoozie (7/6/2015)


    SQLsrvr.exe -m this did not work either -m unrecognizable

    You have to run this from the folder where the exe lives, usually

    C:\Program Files\Microsoft SQL Server\MSSQL11.INSTANCEID\MSSQL\Binn

    As i said before it seems you were attempting to start a default instance but trying to connect to named instance

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 9 posts - 1 through 10 (of 10 total)

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