Comments
Sort by recent activity
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...
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...
Hi Petey;
Thanks for nice suggestion, I did that test on SQL Server Native backup and it does the same thing. The reason is that when there is no change then SQL Server does not give a new LSN to the Log and the LSN of Log1 and Log2 is same so that there is no error if you restore log2 before log1 if data is not changed during these two. When there is data change then it gives the new LSN to the logs and thru error while restoring out of sequence logs.
In SQL Server Management Studio 2005, it shows you all the LSN in the log which is kind a cool and I was curious to see the LSN of each log as well. So, I found it there.
Thanks.
[/img] / comments
Hi Petey;
Thanks for nice suggestion, I did that test on SQL Server Native backup and it does the same thing. The reason is that when there is no change then SQL Server does not give a new LSN to t...
Thanks for that, now I can see the job is failed if there is an error during restore.
It is cool.
Thanks / comments
Thanks for that, now I can see the job is failed if there is an error during restore.
It is cool.
Thanks
Hi ;
Yes, I was talking about the Restore Script generated by the SQL Backup API.
Now, I know we have to encrypt the Restore Script completely if we don't any one to hold of it.
One more thing, If someone see the Restore command into Profilier then he will know the password to restore the backup file as well.
thanks / comments
Hi ;
Yes, I was talking about the Restore Script generated by the SQL Backup API.
Now, I know we have to encrypt the Restore Script completely if we don't any one to hold of it.
One more thing, If ...
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.
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...
Point # 1:
Okay, I am running both the instances on the same machine and trying to simulate automatic backup and restore from one primary instance to secondary instance. So, Server A and Server B are on the same machine and server B can access the backup file since it is on the same local machine.
Point # 2:
I have implemented same thing in version 3 b/c I've testing the version for last 10 days and I just installed version 4 and I am unable to select Secondary server yet.
Point # 3:
Let me check the Log Shipping Wizard as well.
thanks / comments
Point # 1:
Okay, I am running both the instances on the same machine and trying to simulate automatic backup and restore from one primary instance to secondary instance. So, Server A and Server B a...
Yes, both the instances are coming in the list to select the backup from any server. But, the Secondary instance is not coming in the Restore to List, which is not helping me, I had to use my old script from version 3 to setup restore jobs. I was not able to restore on my secondary instance using the GUI but I did it using the script which I created using version 3.
Need response. / comments
Yes, both the instances are coming in the list to select the backup from any server. But, the Secondary instance is not coming in the Restore to List, which is not helping me, I had to use my old s...
It was already registered when I was running version 3. Actually, I upgraded the version 3 to 4 on the same machine. So, my SQL backup GUI already have two instances of SQL Server.
Do I need to register it again after removing it from the SQL Backup GUI? / comments
It was already registered when I was running version 3. Actually, I upgraded the version 3 to 4 on the same machine. So, my SQL backup GUI already have two instances of SQL Server.
Do I need to reg...