Home » RDBMS Server » Server Utilities » Log Miner
Log Miner [message #357359] Wed, 05 November 2008 00:55 Go to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
Its not that much difficult to see the sqls from sql_redo,sql_undo column of v$logmnr_contents . But is there any convenient way to apply those sqls in a database? like,

spool test.log
select sql_redo from v$logmnr_contents;
spool off;

is there any other way?
Re: Log Miner [message #357365 is a reply to message #357359] Wed, 05 November 2008 01:23 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No.
And take care in the order you applied them.

Regards
Michel
Re: Log Miner [message #357380 is a reply to message #357359] Wed, 05 November 2008 02:06 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
I am getting some problem while applying in BLOB columns. When the file(inserted in blob column) size is more that 4KB then it does not fit in one row(sql_redo) and log miner provide a pl/sql block. and then spool file does not work.
Re: Log Miner [message #357381 is a reply to message #357359] Wed, 05 November 2008 02:10 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
I also wrote a pl/sql for writing a file that is,
DECLARE
 vInHandle utl_file.file_type;
BEGIN
  vInHandle := utl_file.fopen('SADAT', 'logmnr.out', 'W',32767);
  FOR x IN (SELECT SQL_REDO FROM V$LOGMNR_CONTENTS WHERE seg_owner IN ('SADAT')) LOOP
	  IF INSTR(X.SQL_REDO,';',-1) = 0 THEN
	    utl_file.put(vInHandle, X.SQL_REDO);
	  ELSE
	    utl_file.put_line(vInHandle, X.SQL_REDO);
	  END IF;
  END LOOP;
  utl_file.fclose(vInHandle);
END;
/


IF INSTR(X.SQL_REDO,';',-1) = 0 THEN
...so that there is no new line between hexadecimal characters.Then I got the error,
Input truncated to 7499 characters
SP2-0027: Input is too long (> 2499 characters) - line ignored


so ... what should I do?
Re: Log Miner [message #357384 is a reply to message #357381] Wed, 05 November 2008 02:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to split the too long lines.

Regards
Michel

Re: Log Miner [message #357391 is a reply to message #357359] Wed, 05 November 2008 03:08 Go to previous message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
It does not solve my problem. My intension was to not to split the line. But its automatically splitting the long string and thats why I cant execute the pl/sql block.
Previous Topic: Exp/Imp - Move objects between tablespaces
Next Topic: Dump with version enabled Tables
Goto Forum:
  


Current Time: Sat Dec 10 20:33:32 CST 2016

Total time taken to generate the page: 0.08844 seconds