How can we help you today? How can we help you today?
essamughal
As I mentioned the functionality was working in earlier version and if you see I got the following email from the same job which I created for log restore and now the MAILONERROR feature is not working in the same case when LSN is not correct. I think it might help you finding out the problem with this feature now. The explaination which you gave is making sense but it is not true for the following case since I got emails in July and in June as well. *********************************************** Subject: ERROR - log restore [abcSTANDBY] on 7/31/2006 4:12:02 PM SQL Backup log file 7/31/2006 4:12:01 PM: Restoring abcSTANDBY (transaction logs) from: H:\LogShipping\logshipping\LOG_(local)_ABC_20060731_014500.sqb 7/31/2006 4:12:01 PM: RESTORE LOG [abcSTANDBY] FROM DISK = 'H:\LogShipping\logshipping\LOG_(local)_ABC_20060731_014500.sqb' WITH STANDBY = 'H:\UNDO_abcSTANDBY.DAT', MAILTO = 'essa@ilogic.com', LOGTO = 'H:\RestorLog.txt', ERASEFILES = 7, FILEOPTIONS = 1, PASSWORD = 'XXXXXXXXXX', MOVETO = 'H:\LogShipping\Processed\' 7/31/2006 4:12:01 PM: Server: Msg 3013 RESTORE LOG is terminating abnormally. 7/31/2006 4:12:01 PM: Server: Msg 4305 The log in this backup set begins at LSN 33292000001276900001, which is too late to apply to the database. An earlier log backup that includes LSN 32933000001371500001 can be restored. *********************************************** Please, have a look into that problem, this is one of the feature of Red-Gate tool which convinced us to purchase the tool. Thanks / comments
As I mentioned the functionality was working in earlier version and if you see I got the following email from the same job which I created for log restore and now the MAILONERROR feature is not wor...
0 votes
Hi Petey; Thanks for your reply. I had to remove quotes from each variable as well. Here is correct syntax for others who want to do the same task. DECLARE @exitcode int DECLARE @sqlerrorcode int Declare @L_RESTORE_DATABASE_COMMAND nvarchar(4000) Declare @L_DATABASENAME varchar(100) Declare @L_DISK_PATH varchar(500) Declare @L_MOVETO_PATH varchar(500) Declare @L_STANDBY_UNDO_PATH varchar(500) Declare @L_DATAFILE_NAME varchar(100) Declare @L_MOVE_DATA_PATH varchar(500) Declare @L_LOGFILE_NAME varchar(100) Declare @L_MOVE_LOG_PATH varchar(500) Declare @L_PASSWORD varchar(100) SET @L_DATABASENAME = '[abc]' SET @L_DISK_PATH = '''\\abc\E$\Dump\*.sqb''' SET @L_MOVETO_PATH = '''\\abc\E$\Dump\Processed\''' SET @L_STANDBY_UNDO_PATH = '''E:\UNDO_abc.DAT''' SET @L_DATAFILE_NAME = '''abc_Data''' SET @L_MOVE_DATA_PATH = '''E:\SecondarySiteDatabase\abc.mdf''' SET @L_LOGFILE_NAME = '''abc_Log''' SET @L_MOVE_LOG_PATH = '''E:\SecondarySitedatabase\abc_log.LDF''' SET @L_PASSWORD = '''abc''' SET @L_RESTORE_DATABASE_COMMAND = '-SQL "RESTORE DATABASE ' + @L_DatabaseName + ' FROM DISK = ' + @L_DISK_PATH + ' WITH MOVETO = ' + @L_MOVETO_PATH + ' , ' + ' STANDBY = ' + @L_STANDBY_UNDO_PATH + ' , ' + 'MOVE ' + @L_DATAFILE_NAME + ' TO ' + @L_MOVE_DATA_PATH + ' , ' + 'MOVE ' + @L_LOGFILE_NAME + ' TO ' + @L_MOVE_LOG_PATH + ' , ' + ' REPLACE, PASSWORD = ' + @L_PASSWORD + '" -E -I ' Print @L_RESTORE_DATABASE_COMMAND Exec master..sqlbackup @L_RESTORE_DATABASE_COMMAND , @exitcode OUTPUT, @sqlerrorcode OUTPUT Thanks / comments
Hi Petey; Thanks for your reply. I had to remove quotes from each variable as well. Here is correct syntax for others who want to do the same task. DECLARE @exitcode int DECLARE @sqlerrorcode int D...
0 votes
I think named instance means the instance installed on the same machine, then yes. Were you able to re-create that case at your side? I have to check the Log Shipping Wizard as well. / comments
I think named instance means the instance installed on the same machine, then yes. Were you able to re-create that case at your side? I have to check the Log Shipping Wizard as well.
0 votes
I am using Restore Wizard not Log Shipping Wizard. I deleted the Registration and re-register the secondary server but it is still not showing the server in the Restore to List. thanks for quick response. / comments
I am using Restore Wizard not Log Shipping Wizard. I deleted the Registration and re-register the secondary server but it is still not showing the server in the Restore to List. thanks for quick re...
0 votes