Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> sql_undo > 2048

sql_undo > 2048

From: Herring Dave - dherri <Dave.Herring_at_acxiom.com>
Date: Sat, 18 Feb 2006 12:46:54 -0600
Message-ID: <7ED53A68952D3B4C9540B4EFA5C76E3601785B0F@CWYMSX04.Corp.Acxiom.net>


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



Dave Herring, DBA
Acxiom Corporation
3333 Finley
Downers Grove, IL 60515
wk: 630.944.4762
<mailto:dherri_at_acxiom.com>


The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged.

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-l
Received on Sat Feb 18 2006 - 12:46:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US