Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> sql_undo > 2048
Anyone have a good way of managing output from
V$LOGMNR_CONTENTS.SQL_UNDO when the undo statements span 3 rows within
V$LOGMNR_CONTENTS?
I'm on Oracle 9.2.0.6 and need to undo about 200,000 INSERTs from last
night. Unfortunately, I'm finding that the undo statements are
sometimes near 12000 characters (4000 per SQL_UNDO x 3 rows). If I
spool the results at the UNIX level, lines > 2048 are cut in 2. If I
spool to c:\ on my laptop, sqlplus/sql*worksheet changes long, I get
4000 per line like SQL_UNDO is defined as, but even that splits in mid
column_name at times.
Here's what I'm using to grab the undo statements:
SET ECHO off FEEDBACK off HEADING off LINESIZE 4000 PAGESIZE 10000
TERMOUT off
spool undo_inserts.sql
SELECT REPLACE(sql_undo,'"')
FROM v$logmnr_contents
ORDER BY rs_id, scn;
spool off
I tried using DBMS_LOGMNR.PRINT_PRETTY_SQL when starting logmnr, but still some lines get cutoff in mid column name.
Anyone else dealt with this (successfully)? I started playing around with using layered SUBSTRs with INSTR on ' ', to grab 2048 of a line, up through the next to last word, but after 34+ hrs of no sleep I'm starting to lose it.
Dave
If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system.
Thank You.
-- http://www.freelists.org/webpage/oracle-lReceived on Sat Feb 18 2006 - 12:46:54 CST