Resolves logins on the new primary server against logins from the former primary server.
sp_resolve_logins [ @dest_db = ] 'dest_db'
, [ @dest_path = ] 'dest_path'
, [ @filename = ] 'filename'
[@dest_db =] 'dest_db'
Is the name of the new primary database. dest_db is sysname, with no default.
[@dest_path =] dest_path
Is the path to the directory where filename is stored. dest_path is nvarchar(255), with no default.
[@filename =] filename
Is the name of the file containing a bulk copy of the syslogins table from the former primary database. filename is nvarchar(255), with no default.
Return Code Values
0 (success) or 1 (failure)
sp_resolve_logins must be run on the instance of SQL Server marked as the new primary server (former secondary server). You must run this stored procedure from the target database.
In order to complete a log shipping role change, you must perform several steps in addition to running this procedure. For more information, see How to set up and perform a log shipping role change (Transact-SQL).
Only members of the sysadmin fixed server role can execute sp_resolve_logins.
This example shows how to resolve logins on the new primary server against logins from the former primary server. 'db2' is the name of the new primary database. 'syslogins.dat' contains a bulk copy of the syslogins table from the former primary database and is stored in directory 'c:\bulkoutput\'.
EXEC sp_resolve_logins @dest_db = 'db2', @dest_path = 'c:\bulkoutput\', @dest_filename = 'syslogins.dat'