Today I couldn't start SQL Server process anymore. 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.
Ok, then I searched the internet looking for a solution for this strange problem and I found a blog post suggesting that I should replace
mastlog.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 'andre-PC\andre'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: ]
Login failed for user 'andrerpena'. Reason: Could not find a login matching the name provided. [CLIENT: ]
How can I work around this?