By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

sqlurlog question

P: n/a

W2K, v7, fp11.

I want to write my oun log miner. I use sqlurlog API.
I found that algorithm of reading logs described in
\sqllib\samples\c\asynrlog.sqc is very inconvenient:
I make first call with
callerAction = SQLU_RLOG_QUERY
and get initial and current LSNs.
But when I assign them to start and end LSNs respectively and call sqlurlog
callerAction = SQLU_RLOG_READ
I get error with sqlcode=-2657:
The Asynchronous Log Reader requires log file
"<name>" which does not currently reside in the
database log directory.
That is absolutely true: since it is too old logfile I have already archived
and removed it.
So I can't continue...
My question is: is any way to calculate VALID start LSN based on end LSN for
Because now I have to do this:
1. start LSN = end LSN = current LSN;
2. while (sqlca.sqlcode!=0):
start LSN = start LSN - 1;
call sqlurlog with these start and end LSNs;
But it is very ineffective because I can call sqlurlog some thousands times
with sqlca.sqlcode=-2650 before I get sqlca.sqlcode=0

Thanks in advance,
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Another question:
Is any way to get any valid LSN from particular log file?
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.