Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. READ MORE

Qlik Replicate: SQL Server Active/Backup presence state is kLSN_PRESENCE_NOWEHRE

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
lyka
Support
Support

Qlik Replicate: SQL Server Active/Backup presence state is kLSN_PRESENCE_NOWEHRE

Last Update:

Mar 14, 2022 10:40:13 AM

Updated By:

Sonja_Bauernfeind

Created date:

Mar 8, 2022 7:18:04 PM

When using SQL Server source and you set SOURCE_CAPTURE to TRACE level and you see this type of message:

 [SOURCE_CAPTURE ]T: LSN 'xxxxxxxx:xxxxxxxx:0001' Active/Backup presence state is kLSN_PRESENCE_NOWEHRE (sqlserver_endpoint_capture.c:806)

The LSN specified in the message was the last LSN that was read by Replicate. This message means that it was not in the online and not in any backup that was read and Qlik Replicate will keep on searching for an LSN that doesn't exist.

To verify that the LSN you are looking for is not waiting on the online log you can run:

select top 10 * from ::fn_dblog('xxxxxxx:xxxxxxxx:0001, null)

Note: Please replace xxxxxxx:xxxxxxxx with a valid LSN

If the LSN is in the backup you should get an error and if not, then that means the LSN has not reached the backup yet.

To verify if the LSN is in the backup, run:

select
[dbo].[attrep_fn_NumericLsnToHexa](bs.first_lsn),
[dbo].[attrep_fn_NumericLsnToHexa](bs.last_lsn),
bmf.* , bs.*
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 cast([dbo].[attrep_fn_NumericLsnToHexa](bs.first_lsn) collate SQL_Latin1_General_CP1_CI_AS as varchar (24) ) <=cast( 'xxxxxxx:xxxxxxxx:0001' collate SQL_Latin1_General_CP1_CI_AS as varchar (24) )
and cast('xxxxxxx:xxxxxxxx:0001' collate SQL_Latin1_General_CP1_CI_AS as varchar (24) ) < cast( [dbo].[attrep_fn_NumericLsnToHexa](bs.last_lsn) collate SQL_Latin1_General_CP1_CI_AS as varchar (24) );

 

Labels (1)
Version history
Last update:
‎2022-03-14 10:40 AM
Updated by: