This can be ran from a command prompt or a batch file (Exclude the  when putting your info in):
Originally Posted by Janit
osql -S[IP_Address/Hostname]\[SQL_Instance] -U[username] -P[Password] -n -Q"exec [Database_Name].sims.db_p_transfer_login"
osql -S127.0.0.1\SIMS2008 -Usa -Ppassword -n -Q"exec sims.sims.db_p_transfer_login"
We use these in our backup script even though we backup the databases using dbAttach. There is no harm running the script first. If anything, it acts as a fail-safe to ensure login's are transferred first.
osql -S127.0.0.1\SIMS2008 -Usa -Ppassword -n -Q"exec ccsfms.sims.db_p_transfer_login"