Tuesday, August 24, 2010

MS SQL Server Backup and Restore -Aha

Recently i took a the backup on an instance of MS SQL Server and restored to another instance of the MS SQL Server.  After that i started getting this error when i tried to login to that machine from a remote machine (using SQL Server Management Studio Express and also via JDBC). Then i got the error:  Microsoft SQL Error: 4064

This error is thrown in many cases, this being one. In this case i got the error as the signature of the database tables did not match.

To fix it i ran the below command on the machine that has the SQL Server installed:-
EXEC sp_change_users_login 'Auto_Fix', 'user-name'

The user-name is the name of all the users you are using to connect.

That worked for me. Let me know if this helps you.

No comments:

Post a Comment