关于 flashback transaction query

我的数据库版本如下:
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
我在一张表的执行了几个操作,通过flashback versions query 可以看到如下内容:
SQL> select versions_startscn,versions_endscn,versions_xid,versions_operation,versions_starttime,versions_endtime,tt.id,tt.name from tt versions between scn minvalue and maxvalue order by versions_startscn;
VERSIONS_STARTSCN VERSIONS_ENDSCN VERSIONS_XID V VERSIONS_STARTTIME VERSIONS_ENDTIME ID NAME
1239547 1239632 08001C00C3030000 I 24-OCT-12 11.25.03 AM 24-OCT-12 11.27.39 AM 1 tan
1239632 1239801 04001A0016030000 U 24-OCT-12 11.27.39 AM 24-OCT-12 11.31.13 AM 1 jia
1239801 1239836 02001700B7030000 U 24-OCT-12 11.31.13 AM 24-OCT-12 11.32.31 AM 1 ping
1239836 0A000D000B030000 D 24-OCT-12 11.32.31 AM 1 ping
但是:
SQL> select * from flashback_transaction_query where table_name='TT';
XID START_SCN START_TIM COMMIT_SCN COMMIT_TI LOGON_USER UNDO_CHANGE# OPERATION TABLE_NAME TABLE_OWNER ROW_ID UNDO_SQL
02001700B7030000 1239632 24-OCT-12 1239801 24-OCT-12 SCOTT 1 UNKNOWN TT
04001A0016030000 1239547 24-OCT-12 1239632 24-OCT-12 SCOTT 1 UNKNOWN TT
08001C00C3030000 1239546 24-OCT-12 1239547 24-OCT-12 SCOTT 1 UNKNOWN TT
0A000D000B030000 1239801 24-OCT-12 1239836 24-OCT-12 SCOTT 1 UNKNOWN TT
可以看到当查询 flashback_transaction_query 时,却看不到UNDO_SQL 并且OPERATION为UNKNOWN,有哪位大神遇到过此问题,求助!

SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> drop table people purge;
drop table people purge
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> create table people(empno number primary key, empname varchar2(16), salary
  2  number);
Table created.
SQL> insert into people values(111,'James', 100);
1 row created.
SQL> create table dept(deptno number, deptname varchar2(32));
Table created.
SQL> insert into dept values(10, 'Accounting');
1 row created.
SQL>
SQL> commit;
Commit complete.
SQL>
SQL> update people set salary = salary + 100 where empno = 111;
1 row updated.
SQL> insert into dept values(20, 'Finance');
1 row created.
SQL>
SQL> delete from people where empno=111;
1 row deleted.
SQL>
SQL> insert into people values(111,'Tom', 100);
1 row created.
SQL> update people set salary = salary + 100 where empno = 111;
1 row updated.
SQL> update people set salary = salary + 50 where empno = 111;
1 row updated.
SQL> commit;
Commit complete.
SQL>
SQL> select versions_xid xid, versions_startscn start_scn, versions_endscn
  2  end_snc,
  3  versions_operation operation, empname, salary
  4  from people
  5  versions between scn minvalue and maxvalue
  6  where empno = 111
  7  order by start_scn
  8  /
XID               START_SCN    END_SNC OP EMPNAME
    SALARY
0900120064060000    2391498    2391514 I  James
       100
0A000D0068060000    2391514            I  Tom
       250
0A000D0068060000    2391514            D  James
       100
  1* select undo_sql,OPERATION from flashback_transaction_query where table_name='PEOPLE' order by start_scn
SQL> /
UNDO_SQL                                           OPERATION
                                                   UNKNOWN
                                                   UNKNOWN
                                                   UNKNOWN
                                                   UNKNOWN
                                                   UNKNOWN
                                                   UNKNOWN
6 rows selected.
        这是一个 flashback_transaction_query 在11.2的一个BUG
Hdr: 9056188 11.2.0.1.0 RDBMS 11.2.0.1.0 LOGMINER PRODID-5 PORTID-46
Abstract: FLASHBACK_TRANSACTION_QUERY IS NOT SHOWING ANY UNDO_SQL
该BUG似乎一直没有被FIX
REPRODUCIBILITY:
Reproduable atwill in 11.2
Not reproducing in 11.1.0.7

Similar Messages

  • Columns from table FLASHBACK_TRANSACTION_QUERY

    Hi, have any problem with columns START_TIMESTAMP and COMMIT_TIMESTAMP from table FLASHBACK_TRANSACTION_QUERY ?
    It's declarated in type DATE.
    This is correct ?
    Message was edited by:
    anderson.rf
    Message was edited by:
    anderson.rf

    Hi
    If I understand correctly then you can use
    SQL> select to_char(START_TIMESTAMP, 'DD/MM/YY HH:MI:SS') FROM FLASHBACK_TRANSACTION_QUERY
    Hope it helps.
    Rgds
    Adnan

  • Query on flashback_transaction_query table taking ridiculously long time

    Oracle 10.2.0.3.0 on Solaris :
    I am trying to use Flashback Transaction Query table to track transactions and generate the undo_sql within a time period for an entire schema using the following sql :
    SELECT XID,START_SCN,COMMIT_SCN,OPERATION,TABLE_NAME,TABLE_OWNER,LOGON_USER,UNDO_SQL
    FROM flashback_transaction_query
    WHERE start_timestamp >= TO_TIMESTAMP ('2007-08-16 11:50:00AM','YYYY-MM-DD HH:MI:SSAM')
    AND start_timestamp <= TO_TIMESTAMP ('2007-08-16 11:55:00AM','YYYY-MM-DD HH:MI:SSAM')
    AND TABLE_OWNER = 'JEFFERSON';
    None of my attempts to run this query has succeeded so far as it keeps executing and executing that never seems to end.
    The highest I waited is 50 minutes before cancelling it.
    I did read thru metalink doc id 270270.1 (which I think is close), however, the solution is not relevant to the requirement I have.
    Any suggestions would be of help. Thanks

    I found that if I did the following:
    select t2.*
    from
      select taddr
      from v$session
      where username = <username>
      ) t1
      inner join
      v$transaction t2
      on t1.taddr = t2.addr
    /... and used the XID value in this:
    select *
    from flashback_transaction_query
    where xid = hextoraw('< the value of XID from above');... that it would come back fast.
    But even then, I would have to wait a little bit before the update statement seemed to register elsewhere in the database. There was a delay. But once the update seemed to register -- and you reselected -- it was fast.
    I had no luck using those other columns in 10.1.0.5.
    I also ran DBMS_STATS.GATHER_FIXED_OBJECT_STATS and DBMS_STATS.GATHER_DICTIONARY_STATS but I do not know if they changed anything or if I just was not waiting long enough for the statement to register.

  • Flashback_transaction_query.undo_sql 10g

    I have hard time getting over the 4000 limit on UNDO_SQL column in FLASHBACK_TRANSACTION_QUERY view on 10.2.0.3/x86 linux. The problem is in sqls longer than 4000 characters, I assume they should be split as in v$sqltext but they are not. Supplemental logging doesn't do much difference except that undo sqls are truncated and not absent.
    Is there a possibility to generate UNDO_SQL for statement longer than 4000 characters at all? 11g has transaction backout based on that view so it's hard to believe that this is for small sqls only. Below example is for database without supplemental logging.
    SQL> drop table t purge;
    Table dropped.
    SQL> create table t (x varchar2(4000), y varchar2(4000));
    Table created.
    SQL> insert into t values (lpad('#', 4000, '#'), lpad('#',4000, '#'));
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select max(ora_rowscn) from t;
    MAX(ORA_ROWSCN)
    7217362153
    SQL> select undo_sql from flashback_transaction_query where commit_scn=7217362153;
    UNDO_SQL
    delete from "SYSTEM"."T" where ROWID = 'AAHUIxAABAAAbzLAAA';
    delete from "SYSTEM"."T" where ROWID = 'AAHUIxAABAAAbzKAAA';
    SQL> delete from t;
    1 row deleted.
    SQL> commit;
    Commit complete.
    SQL> select max(commit_scn) from flashback_transaction_query where table_name='T';
    MAX(COMMIT_SCN)
    7217364347
    SQL> select undo_sql from flashback_transaction_query where commit_scn=7217364347;
    UNDO_SQL
    SQL> select length(undo_sql) from flashback_transaction_query where commit_scn=7217364347;
    LENGTH(UNDO_SQL)
    SQL> select dump(undo_sql) from flashback_transaction_query
    where commit_scn=7217364347;
    DUMP(UNDO_SQL)
    NULL
    NULL
    NULL

    Does this mean log miner (did I mention the same applies to v$logmnr_contents?), transaction backout, flashback transaction are useless for statements involving values longer than 4000 characters? Hard to believe...

  • FLASHBACK_TRANSACTION_QUERY not working

    I try the following and it always fails.
    Can somebody tell me why ?
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> show parameter undo_tablespace
    NAME                                 TYPE        VALUE
    undo_tablespace                      string      UNDOTBS1
    SQL> show parameter undo_retention
    NAME                                 TYPE        VALUE
    undo_retention                       integer     900
    SQL> select retention
      2  from dba_tablespaces
      3  where tablespace_name='UNDOTBS1';
    RETENTION
    GUARANTEE
    SQL> connect test/test
    Connected.
    SQL> create table tx(x int);
    Table created.
    SQL> insert into tx values(0);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from tx;
             X
             0
    SQL> update tx set x=5 where x=0;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> connect admin/admin
    Connected.
    SQL> select versions_xid XID, versions_startscn START_SCN,
      2    versions_endscn END_SCN, versions_operation OPERATION,
      3    x
      4  from test.tx
      5  versions between scn minvalue and maxvalue;
    XID               START_SCN    END_SCN O          X
                                                      5
    SQL> --
    SQL> select     xid, start_scn, commit_scn, operation, logon_user, undo_sql
      2  from flashback_transaction_query
      3  where  table_owner='TEST'
      4  and table_name='TX';
    no rows selected
    SQL>I see that I have TABLE_OWNER column set to NULL:
    SQL> select     xid, table_owner, table_name, operation, logon_user, undo_sql
      2  from flashback_transaction_query
      3  where table_name='TX'
      4  order by start_scn;
    XID              TABLE_OWNER TABLE_NAME OPERATION                        LOGON_USER UNDO_SQL
    02000D001E030000             TX         UNKNOWN                          TEST
    03001A001C030000             TX         UNKNOWN                          TEST
    SQL>Edited by: P. Forstmann on 28 mai 2013 21:18
    Edited by: P. Forstmann on 28 mai 2013 21:20

    No but now it works:
    SQL>  alter database add supplemental log data;
    Database altered.I get:
    SQL> connect admin/admin
    Connected.
    SQL> select versions_xid XID, versions_startscn START_SCN,
      2    versions_endscn END_SCN, versions_operation OPERATION,
      3    x
      4  from test.tx
      5  versions between scn minvalue and maxvalue;
    XID               START_SCN    END_SCN O          X
                                                      5
    SQL> --
    SQL> select     xid, start_scn, commit_scn, operation, logon_user, undo_sql
      2  from flashback_transaction_query
      3  where  table_owner='TEST'
      4  and table_name='TX';
    XID               START_SCN COMMIT_SCN OPERATION
    LOGON_USER
    UNDO_SQL
    080000002D030000    1260298    1260299 INSERT
    TEST
    delete from "TEST"."TX" where ROWID = 'AAASdiAAEAAAAC+AAA';
    09000B0035030000    1260301    1260302 UPDATE
    TEST
    update "TEST"."TX" set "X" = '0' where ROWID = 'AAASdiAAEAAAAC+AAA';
    XID               START_SCN COMMIT_SCN OPERATION
    LOGON_USER
    UNDO_SQL
    SQL> --
    SQL> set linesize 100
    SQL> column undo_sql format a15
    SQL> column table_owner format a11
    SQL> column table_name format a10
    SQL> column logon_user format a10
    SQL> select     xid, table_owner, table_name, operation, logon_user, undo_sql
      2  from flashback_transaction_query
      3  where table_name='TX'
      4  order by start_scn;
    XID              TABLE_OWNER TABLE_NAME OPERATION                        LOGON_USER UNDO_SQL
    080000002D030000 TEST        TX         INSERT                           TEST       delete from "TE
                                                                                        ST"."TX" where
                                                                                        ROWID = 'AAASdi
                                                                                        AAEAAAAC+AAA';
    09000B0035030000 TEST        TX         UPDATE                           TEST       update "TEST"."
                                                                                        TX" set "X" = '
                                                                                        0' where ROWID
                                                                                        = 'AAASdiAAEAAA
                                                                                        AC+AAA';Thanks.

  • Flashback_Transaction_Query Problem

    Hi,
    When I execute sql below it runs for hours and no result.
    Any idea? Thank you
    SELECT xid ,operation,undo_sql
    FROM flashback_transaction_query
    WHERE table_owner = 'xxx'
    AND table_name = 'xxx'
    and start_timestamp>to_timestamp('22-09-10 14:15:30','dd-mm-yy hh24:mi:ss')

    efendicans wrote:
    Hi,
    When I execute sql below it runs for hours and no result.
    Any idea? Thank you
    SELECT xid ,operation,undo_sql
    FROM flashback_transaction_query
    WHERE table_owner = 'xxx'
    AND table_name = 'xxx'
    and start_timestamp>to_timestamp('22-09-10 14:15:30','dd-mm-yy hh24:mi:ss')This is too broad question with almost no informational input already there with it. Are you sure that you have started a transaction backout operation already? What happens when in the above query , you don't use the where clause ? Does it give some results at that time or not?
    Aman....

  • Error year format in statements in FLASHBACK_TRANSACTION_QUERY.UNDO_SQL

    I execute 20 delete on tab1 table and then COMMIT.
    flashback is enabled: in table FLASHBACK_TRANSACTION_QUERY field UNDO_SQL I can found all statements for undo: in this case I found exactly 20 insert of 20 rows that I deleted.
    the problem is in date format: all insert have this kind of timestamp field:
    INSERT INTO SCHEMA.TAB1 (<fields>) VALUES (TO_TIMESTAMP ('01-FEB-90 00:00:00'),<other values>)
    this insert IS NOT GOOD: I'd like 4 digits year, so I try alter sessionì:
    ALTER SESSION SET nls_timestamp_format = 'DD-MON-YYYY HH24:MI:SS';
    then I re-execute 20 delete e re-read flashback table.....now all insert have this kind of timestamp field:
    INSERT INTO SCHEMA.TAB1 (<fields>) VALUES (TO_TIMESTAMP ('01-FEB-0090 00:00:00'),<other values>)
    this insert IS ALSO NOT GOOD....correct year is 1990 and NOT 0090!!!! so I try another format:
    ALTER SESSION SET nls_timestamp_format = 'DD-MON-RRRR HH24:MI:SS';
    and then I also try:
    ALTER SESSION SET nls_timestamp_format = 'DD-MON-RR HH24:MI:SS';
    nothing.....I alwais have year 0090 in insert statement (instead 1990)
    P.S. In practice I want something like this: http://www.oracle-developer.net/display.php?id=320
    at half page, where it says XID 040028008A010000 there is the format that I need

    I just performed a test:
    SQL> select undo_sql from FLASHBACK_TRANSACTION_QUERY  where table_owner = 'A'
      2  /
    UNDO_SQL
    insert into "A"."T12"("C1") values (TO_TIMESTAMP('21-JUN-90 06.57.35.000000 PM'));
    insert into "A"."T12"("C1") values (TO_TIMESTAMP('16-JUN-09 06.54.35.656000 PM'));
    13 rows selected.
    SQL> alter session set nls_timestamp_format = 'DD-MON-RRRR HH.MI.SSXFF AM'
      2  /
    Session altered.
    SQL> select undo_sql from FLASHBACK_TRANSACTION_QUERY  where table_owner = 'A'
      2  /
    UNDO_SQL
    insert into "A"."T12"("C1") values (TO_TIMESTAMP('21-JUN-1990 06.57.35.000000 PM'));
    insert into "A"."T12"("C1") values (TO_TIMESTAMP('16-JUN-2009 06.54.35.656000 PM'));Are you completly sure that your original data was from 1990 ?
    With kind regards
    Krystian Zieja

  • Using FLASHBACK_TRANSACTION_QUERY from within a procdure.

    I am trying to create a procedure that will execute immediate the undo_sql found in the flashback_transaction_query.
    I am using version 10.2
    When i run the following code:
    SELECT UNDO_SQL
    FROM flashback_transaction_query
    WHERE table_name = 'table'
    AND logon_user = 'user';
    UNDO_SQL
    update "schema"."table" set "item" = '999' where ROWID = 'AAAVLeAAAAAAPCUAAA';
    8 rows....
    However when i embed the same code within a procedure it states i have insufficient privileges.
    CREATE OR REPLACE PROCEDURE FIND_REDO_SQL
    (tablename in varchar2,
    username in varchar2)
    IS
    code varchar2(300);
    CURSOR SQL_TRANS IS
    SELECT UNDO_SQL
    FROM flashback_transaction_query
    WHERE table_name = tablename
    AND logon_user = username;
    BEGIN
    OPEN sql_trans;
    LOOP
    FETCH SQL_TRANS INTO code;
    EXECUTE IMMEDIATE code;
    EXIT WHEN SQL_TRANS%NOTFOUND;
    END LOOP;
    END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "user.FIND_REDO_SQL", line 15
    ORA-06512: at line 1
    Is it the case that i cannot query flashback_transaction_query from within a proceduress.

    Unfortunately not, i cannot see anywhere it may tell me why i cannot query this view via a procedure. Below is a list of privileges that i have.
    Am i missing one that i really need.
    Thanks,
    G
    ADMINISTER ANY SQL TUNING SET
    ADMINISTER DATABASE TRIGGER
    ADMINISTER SQL TUNING SET
    ADVISOR
    ALTER ANY CLUSTER
    ALTER ANY DIMENSION
    ALTER ANY EVALUATION CONTEXT
    ALTER ANY INDEX
    ALTER ANY INDEXTYPE
    ALTER ANY LIBRARY
    ALTER ANY MATERIALIZED VIEW
    ALTER ANY OUTLINE
    ALTER ANY PROCEDURE
    ALTER ANY ROLE
    ALTER ANY RULE
    ALTER ANY RULE SET
    ALTER ANY SEQUENCE
    ALTER ANY SQL PROFILE
    ALTER ANY TABLE
    ALTER ANY TRIGGER
    ALTER ANY TYPE
    ALTER DATABASE
    ALTER PROFILE
    ALTER RESOURCE COST
    ALTER ROLLBACK SEGMENT
    ALTER SESSION
    ALTER SYSTEM
    ALTER TABLESPACE
    ALTER USER
    ANALYZE ANY
    AUDIT ANY
    AUDIT SYSTEM
    BACKUP ANY TABLE
    BECOME USER
    COMMENT ANY TABLE
    CREATE ANY CLUSTER
    CREATE ANY DIRECTORY
    CREATE ANY INDEX
    CREATE ANY INDEXTYPE
    CREATE ANY LIBRARY
    CREATE ANY MATERIALIZED VIEW
    CREATE ANY OPERATOR
    CREATE ANY PROCEDURE
    CREATE ANY SEQUENCE
    CREATE ANY SYNONYM
    CREATE ANY TABLE
    CREATE ANY TRIGGER
    CREATE ANY TYPE
    CREATE ANY VIEW
    CREATE CLUSTER
    CREATE DATABASE LINK
    CREATE INDEXTYPE
    CREATE LIBRARY
    CREATE MATERIALIZED VIEW
    CREATE OPERATOR
    CREATE PROCEDURE
    CREATE PROFILE
    CREATE PUBLIC DATABASE LINK
    CREATE PUBLIC SYNONYM
    CREATE ROLE
    CREATE ROLLBACK SEGMENT
    CREATE SEQUENCE
    CREATE SESSION
    CREATE SYNONYM
    CREATE TABLE
    CREATE TABLESPACE
    CREATE TRIGGER
    CREATE TYPE
    CREATE USER
    CREATE VIEW
    DELETE ANY TABLE
    DROP ANY CLUSTER
    DROP ANY DIRECTORY
    DROP ANY INDEX
    DROP ANY INDEXTYPE
    DROP ANY LIBRARY
    DROP ANY MATERIALIZED VIEW
    DROP ANY OPERATOR
    DROP ANY PROCEDURE
    DROP ANY ROLE
    DROP ANY SEQUENCE
    DROP ANY SYNONYM
    DROP ANY TABLE
    DROP ANY TRIGGER
    DROP ANY TYPE
    DROP ANY VIEW
    DROP PROFILE
    DROP PUBLIC DATABASE LINK
    DROP PUBLIC SYNONYM
    DROP ROLLBACK SEGMENT
    DROP TABLESPACE
    DROP USER
    EXECUTE ANY LIBRARY
    EXECUTE ANY OPERATOR
    EXECUTE ANY PROCEDURE
    EXECUTE ANY TYPE
    FORCE ANY TRANSACTION
    FORCE TRANSACTION
    GLOBAL QUERY REWRITE
    GRANT ANY PRIVILEGE
    GRANT ANY ROLE
    INSERT ANY TABLE
    LOCK ANY TABLE
    MANAGE TABLESPACE
    QUERY REWRITE
    RESTRICTED SESSION
    SELECT ANY DICTIONARY
    SELECT ANY SEQUENCE
    SELECT ANY TABLE
    UNDER ANY TYPE
    UNDER ANY VIEW
    UNLIMITED TABLESPACE
    UPDATE ANY TABLE

  • Flashback_Transaction_Query - how to get OPERATION if UNKNOWN?

    Hi,
    In Fl a s h b a c k T r a n s a c t i o n Q u e r y sometimes I am getting a value of UNKNOWN under the OPERATION column, if the transaction didn’t have enough undo information to correctly identify its operation type. For example it happens often when I am updating a CLOB column or always when I am deleting rows that contain at least one CLOB column type, or when I am deleting another row without CLOB column type.
    Do you know how I can get operation information in this case? Is there any way to get it?
    I am trying to retreive the information using flashback versions query that join some information with Flashback_Transaction_Query table.
    Cheers,
    Benny

    hi,
    The value of the UNDO_RETENTION parameter determines the length of time your users can flashback their queries. try increasing it , so u dont face the same issue
    in future.you’ll notice a value of UNKNOWN under the OPERATION column, if the transaction didn’t have enough undo information to correctly identify its operation
    type.
    You may want to turn on minimal supplemental logging in order to support operations involving chained rows and special storage structures such as clustered tables.
    ALTER DATABASE ADD SUPPLEMENT LOG DATA;

  • Is it possible to clear FLASHBACK_TRANSACTION_QUERY

    hello
    i want to clear FLASHBACK_TRANSACTION_QUERY
    delete from FLASHBACK_TRANSACTION_QUERY do not works
    i need to do selects on this table but it has many data and it become very slow ... how can i reach my task ?

    FLASHBACK_TRANSACTION_QUERY is accessing x$ktuqqry, which is indexed on XID.
    As xid column is RAW, to use index you need to convert your transaction id to RAW.
    SCOTT@db1> EXPLAIN PLAN FOR SELECT * FROM flashback_transaction_query WHERE xid = '0100050049090000';
    Explained.
    SCOTT@db1> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1115820779
    | Id  | Operation      | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |          |        1 |     2259 |        0   (0)| 00:00:01 |
    |*  1 |  FIXED TABLE FULL| X$KTUQQRY |        1 |     2259 |        0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(RAWTOHEX("XID")='0100050049090000')
    13 rows selected.
    SCOTT@db1> EXPLAIN PLAN FOR SELECT * FROM flashback_transaction_query WHERE xid = HEXTORAW('0100050049090000');
    Explained.
    SCOTT@db1> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1747778896
    | Id  | Operation          | Name              | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |              |       1 |  2259 |       0   (0)| 00:00:01 |
    |*  1 |  FIXED TABLE FIXED INDEX| X$KTUQQRY (ind:1) |       1 |  2259 |       0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("XID"=HEXTORAW('0100050049090000') )
    13 rows selected.Lukasz

  • Why SQL Operation is misfire in FLASHBACK_TRANSACTION_QUERY (Ora 10g XE)?

    I am selecting the list of sql queries issued using FLASHBACK_TRANSACTION_QUERY . (Oracle 10g XE)
    The below is query...
    select operation,START_SCN,undo_sql from FLASHBACK_TRANSACTION_QUERY where logon_user='SHARMA' AND table_owner='SHARMA' AND TABLE_NAME='EMPLOYEE';
    Output is..
    operation START_SCN undo_sql
    DELETE 1000896 insert into "SHARMA"."EMPLOYEE"("ID","NAME") values ('103','Shiva');
    UPDATE 966271 update "SHARMA"."EMPLOYEE" set "NAME" = 'Fernandas' where ROWID = 'AAADeIAABAAAKlaAAD';
    INSERT 966222 delete from "SHARMA"."EMPLOYEE" where ROWID = 'AAADeIAABAAAKlaAAD';
    From the above o/p
    Sql query is "Delete from.." for that Operation is INSERT and vice versa.
    Update is correct format only.
    How to rectify this?
    Thanks

    Thanks for yor reply..
    I am trying to get when the INSERT,UPDATE and DELETE query is issued..
    For this i had created a table with 'ROWDEPENDENCIES'.
    Then i issue a query
    SELECT SCN_TO_TIMESTAMP(ORA_ROWSCN),ID,NAME FROM emptest;
    It shows except DELETED quey information..
    I need to get DELETED query details also..
    Using FLASHBACK we can retrive the deleted query info know?
    For that only i tried in FLASHBACK_TRANSACTION_QUERY table.
    It wont give full information..
    I had tried AS OF clause
    SELECT * FROM emptest AS OF TIMESTAMP
    TO_TIMESTAMP('25-JAN-08 07.53.17 PM', 'DD-MON-YY HH:MI:SS AM')
    The above query also doesn't display DELETED query details..
    How to get when the record is got deleted?
    Thanks

  • FLASHBACK_TRANSACTION_QUERY

    hello
    i want to see queries issued in database
    but got this error.
    thanks
    SQL> select * from FLASHBACK_TRANSACTION_QUERY;
    select * from FLASHBACK_TRANSACTION_QUERY
    ERROR at line 1:
    ORA-01031: insufficient privileges

    Don't you know the GRANT command?
    Please read the SQL manual more carefully.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#i2062275
    I'll show you an example below,
    grant SELECT ANY TRANSACTION to scott;regards

  • UNDO_SQL in FLASHBACK_TRANSACTION_QUERY is null

    Hi,
    does anybody know why selecting from FLASHBACK_TRANSACTION_QUERY gives me null values in UNDO_SQL and OPERATION is set to 'UNKNOWN'? I read in Expert Oracle Database 11g Administration that: "If you see a value of UNKNOWN in the OPERATION column, it means there isn't sufficient undo information in your undo tablespace to correctly identify the transaction's exact operation type." The transaction is still uncommited at the time the query on FLASHBACK_TRANSACTION_QUERY is run, so there should available be all the UNDO necessary.
    The database is a 2 node 11.2.0.1 RAC on AIX.
    Any ideas?
    Thanks in advance,
    Jure

    Thanks, it worked as you wrote.
    The interesting thing is that on my test 11.1.0.6 database, I didn't have to enable it, and it UNDO_SQL was still present (v$database.supplemental_log_data_min shows NO) - maybe I missed something. Anyway, I'd like to ask another thing regarding supplemental logging. Does disabling the supplemental logging (ALTER DATABASE DROP SUPPLEMENTAL LOG DATA;) compromise in any way the database recoverability like a NOLOGGING operation would do for a table?
    I'm quite sure it doesn't compromise it, since as it's stated here http://download.oracle.com/docs/cd/E11882_01/server.112/e10701/logminer.htm#SUTIL1582 : "By default, Oracle Database does not provide any supplemental logging...." and there's nothing mentioned about compromised recoverability. I also checked v$datafile.unrecoverable_change# after disabling supplemental logging and there was no sign of any unrecoverable operation (the database runs in ARCHIVELOG mode).
    Thanks and regards,
    Jure

  • Flashback : Error:ORA-04030: out of process memory when trying to allocate

    Hi All,
    I have executed this query on my db for using flash back features:
    select * from flashback_transaction_query where table_owner='USERNAME'
    However, it throws the error after being executed for 5 min:
    ORA-04030: out of process memory when trying to allocate 268 bytes (Logminer LCR c,krvxbpdl)
    Please help me in understading the error and provide some links/docs to resolve this.
    Thanks,
    Kishore

    That's the error description:
    What does an ORA-4030 mean?
    This error indicates that the oracle server process is unable to allocate more memory from the operating system.This memory consists of the PGA (Program Global Area) and its contents depend upon the server configuration.For dedicated server processes it contains the stack and the UGA (User Global Area) which holds user session data, cursor information and the sort area. In a multithreaded configuration (shared server), the UGA is allocated in the SGA (System Global Area) and will not be responsible for ORA-4030 errors.
    The ORA-4030 thus indicates the process needs more memory (stack UGA or PGA) to perform its job.
    On metalink:
    Diagnosing and Resolving ORA-4030 errors
    Doc ID: Note:233869.1
    Werner

  • Flashback and transaction query very slow

    Hello. I was wondering if anyone else has seen transaction queries be really slow and if there is anything I can do to speed it up? Here is my situation:
    I have a database with about 50 tables. We need to allow the user to go back to a point in time and "undo" what they have done. I can't use flashback table because multiple users can be making changes to the same table (different records) and I can't undo what the other users have done. So I must use the finer granularity of undoing each transaction.
    I have not had a problem with the queries, etc. I basically get a cursor to all the transactions in each of the tables and order them backwards (since all the business rules must be observed). However, getting this cursor takes forever. From that cursor, I can execute the undo_sql. In fact, I once had a cursor that did "union all" on each table and even if the user only modified 1 table, it took way too long. So now I do a quick count based on the ROWSCN (running 10g and tables have ROWDEPENDANCIES) being in the time needed to find out if this table has been touched. Based on that, I can create a cursor only for the tables that have been touched. This helps. But it is still slow especially compared to any other query I have. And if the user did touch a lot of tables, it is still way too slow.
    Here is an example of part of a query that is used on each table:
    select xid, commit_scn, logon_user, undo_change#, operation, table_name, undo_sql
    from flashback_transaction_query
    where operation IN ('INSERT', 'UPDATE', 'DELETE')
      and xid IN (select versions_xid
                  from TABLE1
                  versions between SCN p_scn and current_scn
                  where system_id = p_system_id)
      and table_name = UPPER('TABLE1')Any help is greatly appreciated.
    -Carmine

    Anyone?
    Thanks,
    -Carmine

  • To get the transaction data..please help

    Hi all,
    i need to retrive the transaction datas..like deleted ,n updated datas..
    I tried this query
    SELECT * FROM FLASHBACK_TRANSACTION_QUERY WHERE TABLE_OWNER='CFMSDEV'
    AND TABLE_NAME='M_REGIONS'
    but this is givng the feilds of details..not showing a fied what data is translated..
    please help me...
    thnks&regards

    Hi,
    To my knowledge this can be achieved only by Change Data Capture in 10g.
    Let us wait for others opinion.
    Regards
    K.Rajkumar

Maybe you are looking for

  • 2LIS_02_ITM (When BW receive value " ", "X", "R" Reversal indicator

    Hi !     I Have an issue (I think is issue)...with extractor 2LIS_02_ITM about reversal or deleted indicator…. Some PO are created on R/3 and mark for deleted some line items… I try or I hope  received a “R” indicator…. But I didn´t receive the indic

  • How to design this requirement  by GP, Webdnpro , Adobe and UWL?

    The scenario is : The supplier logs in the SAP Portal 1) The first screen should be WebDynpro  screen with some filter selection which have drop downs etc populating from R/3 After selecting particular values and clicking on a button on screen an ado

  • Need to upload Cxml file to HTTPS Server- cannot use SFTP

    WE have a need to use SSIS to first watch for the creation of the CXML file ( I'll use File Watcher) then use some web services to upload this to a secure HTTPS Server. What I am reading from these posts is that the built in web services task in SSIS

  • E1000 Guest password setup not working - security is not activated

    I used Cisco connect to set up guest access with a secure password. Cisco Connect now indicates guess access is allowed and shows the password. However, when I actually try to connect to the guest network, it shows no security at all, and I can join

  • Regarding :Repetative Manufacturing

    Dear Friends, I wanted to know about repetitive manufacturing scenario , can anyone explain about this scenario in detail. Also if anyone is having any test scripts on this , can you please share with me. Thanks in advance