468,257 Members | 1,441 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

sqlurlog question

Hello.

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
with
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
sqlurlog?
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,
Mark.
Nov 12 '05 #1
1 2358
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.

Similar topics

3 posts views Thread by Stevey | last post: by
10 posts views Thread by glenn | last post: by
53 posts views Thread by Jeff | last post: by
56 posts views Thread by spibou | last post: by
2 posts views Thread by Allan Ebdrup | last post: by
3 posts views Thread by Zhang Weiwu | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.