Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing LogMiner for scanning the Archive Logs.

Status
Not open for further replies.

madhes

Programmer
Apr 16, 2001
18
US
I m using LogMiner for scanning my archive logs. I use following sequence:

1. Get a connection for LogMiner session.
2. Add the required log files to the LogMiner session.
3. Start the LogMiner, using DBMS_LOGMNR.START_LOGMNR(...).
4. Read from the view V$LOGMNR_CONTENTS, using a select query.

This is working perfectly fine. The list of available archive file names can be obtained from the view: V$ARCHIVED_LOG. From my (java) program i span a thread which does all these jobs for me. (NOTE: Its not mandatory to have the connection (for LogMiner) to the same instance for which the scanning is performed. ie., If i m scanning the log files of instance 'Sales', i can get the connection for instance 'Purchase' and start the LogMiner).
-------------------------------------
Question-1: At times, i m getting the following error:
"java.sql.SQLException: ORA-01306: dbms_logmnr.start_logmnr() must be invoked before selecting from v$logmnr_contents". I m not sure, why this error is occuring in a very rare frequency.
-------------------------------------
Question-2: When i want to scan the log files of two instances (say 'db1', 'db2'), i span two threads, one for each database. But i m getting the connection with different instance (say, 'common'). Now i m getting the result of one scan, for both the scans, which is not correct. But if i get the connection with 'SYSDBA' previlages, this is working properly. I couldnt get any clues, why this needs SYSDBA previlages.

Can anyone help pls?

thanks,
madhes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top