Home » Blog » Topic » Login failed In SQL Server 2012

Login failed In SQL Server 2012

Lincoln Burrows ~ Modified: July 6th, 2015 ~ ~ 1 Minute Reading

Home Forums Login failed In SQL Server 2012

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #320 Score: 0
    Lincoln Burrows
    Moderator
    16 pts

    Please help! Not able to login after replaced master mdf/ldf file.

    Reason:
    The log scan number (213:18:1) passed to log scan in database ‘master’ is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
    I searched solution for this strange problem and I found a blog post suggesting that I should replace master.mdf and masterlog.ldf files with the ones located in C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Template Data and so I did.

    Now I can start the process but I can’t log in with neither my 2 previous login accounts. I thought that after replacing master I would at least be able to login with my Windows account, but I can’t.

    These are the login failed event logs:
    Login failed for user ‘Ramakutty-PC\Ramakutty’.

    Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors.
    Login failed for user ‘Ramakutty’.

    Reason: Could not find a login matching the name provided.

    #326 Score: 0
    Stephen West
    Moderator
    4 pts

    You will have to re-create your existing logins.

    #582 Score: 0
    Andrew Jackson
    Moderator
    1 pt

    Login details are stored in the master, so it makes sense that they would be gone if you’ve replaced the master database files.
    Do you have a copy of your old master.mdf and .ldf file, or did you overwrite them? If not, you will have to recreate all the logins

    #627 Score: 0
    Lincoln Burrows
    Moderator
    16 pts

    Thanks i have resolved this by recreation of all the existing logins

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.