I have a script to automate the process of transferring SQL server 2005 login from SQL server 2005 mirror primary site to DR site, see attached.
but it doesn't take care the transfer or change of login status ( disabled/deleted).
see the statement here:
If Not Exists (Select 1 From sys.server_principals
Where name = @LoginName)
so it only copy new login but not any altered login and deleted login,
any way to improve it ?