LISTING 2: Code That Promotes the Secondary Server Database to a Primary Server Database USE master GO EXEC msdb.dbo.sp_change_secondary_role @db_name = 'Pubscopy', @do_load = 1, @force_load = 1, @final_state = 1, @access_level = 1, @terminate = 1, @keep_replication = 0, @stopat = null