Monday, December 11, 2006

For test environments developers would like to have the same master database copied to the testing database so they could simulate the testing as if it were running on production. But even after copying the entire database developers are unable to connect. Errrrrrrr!!!

Yes, this happens normally but why? copying database from testing to production doesn't mean the logins have been copied, since they are residing in syslogins table under master database so they won't transfer with every database transfer. Now what to do?

Here comes the sp_help_revlogin stored procedure which after executing in turn generates a T-SQL script contains all the logins and passwords. And on executing this T-SQL on testing database duplicate all the logins associated with the database.

Sounds interesting :)