| Log Miner simple example |
|
|
|
| Written by Martin | |
| Friday, 11 December 2009 | |
|
I have never really played with log miner, but used it many times implicitly for streams. The need to get to grips with it arose when a developer created unrecoverable operations (i.e. something non-logging) in a QA system. I don't want them to run the same in production so I had to find out who did it. First of all I needed a test case on my 10.2.0.4 32bit Linux system, following these steps: 1. Build the dictionary That's probably not always necessary, but I did create it anyway. I chose to put that into a file instead of the online redo logs since I couldn't/didn't want to enable supplemental logging on the database. With that said the streams initialisation-adding supplemental logging to all replicated tables makes a lot more sense! I also started to understand "dictionary_begin" and "dictionary_end" in v$archived_log more. To build the dictionary to a file, you need to have utl_file_dir set correctly, which sounds a bit anachronistic nowadays where we have directories but I digress. In my case utl_file_dir was set to '/home/oracle/utl_file_dir'. The command I executed was: begin 2. Add log files I knew from v$archived_log that my logfiles are for sequence 23 and 24 so I added them to the list of file to mine: begin 3. Start log miner Now for the interesting part of this! begin 4. Analysing the results Now query v$logmnr_contents at your heart's delight! 5. End your log miner session The final step is to end the session. begin |
|
| Last Updated ( Friday, 11 December 2009 ) |
| < Prev | Next > |
|---|



