Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am working on incremental testing. I want to test incremental on a old task (SQL server to Attunity) on the dev environment that has been stoppped for few months now. This task uses "Backup logs only" option to load incremental data. I went to advanced options and tried to start from 2hrs ago, but it still went back to the past when the task was stopped saying missing backup files from the past. How can I resume the task to only go back to an hour back and not get stuck in the past without having to do a full load, as we dont have backups from few months and we dont want to enable online logs. Please advise.
1. Replicate read from the MSDB database, so best to check with your DBA if there anything strange or anything strange in the MSDB database.
2. have you try to start using LSN that was 2hours ago?
Thanks for responding Steve. The LSN format is different in Attunity, how do we convert SQL server LSN to the attunity format?
Replicate LSN vs SQLserver is just a matter of Hexadecimal vs Decimal. Use any calculator to resolve. Personally I often use PERL as per below. Replicate itself creates a stored function in the source DB which you can use "CREATE FUNCTION [dbo].[attrep_fn_NumericLsnToHexa](@numeric25Lsn numeric(25,0)) returns varchar(32) AS... "
Back to the main problem " How can I resume the task to only go back to an hour back and not get stuck in the past ". Well in an archive-log only task Replicate asks the source for the right archive containing the requested start time by looking at start_date in msdb.dbo.backupset. See sample query below. That backup could be months ago and deleted since, if no further LOG backup was ever made. I suggest you create a fresh log backup here and now and try again.
hth,
Hein
select
bs.backup_start_date, bs.first_lsn,
[dbo].[fn_NumericLsnToHexa](bs.first_lsn) "first_lsn - hex",
[dbo].[fn_NumericLsnToHexa](bs.last_lsn) "last_lsn - hex",
bs.backup_size/(1024*1024) "MB",
bmf.physical_device_name
from msdb.dbo.backupmediafamily bmf, msdb.dbo.backupset bs
where bmf.media_set_id = bs.media_set_id
and bs.database_name=db_name() and bs.type='L'
and bs.backup_start_date > getdate() - 2
> perl -le "printf q(%0X),1234567890
499602D2
> perl -le "printf 0X499602D2
1234567890