Flashback query vs. flashback versions query

I have noticed that I can do a regular flashback query as far back as I have UNDO data available for the query, as long as long as the table definition has not changed. Flashback versions query, however, is limited to the UNDO retention parameter.
So, for example, if my UNDO_RETENTION parameter is set to the default 900 seconds, I can only go back 15 minutes in time, even if the regular flashback query shows data in the table from 1 hour ago.
Why does Oracle hold to the the retention parameter for versions query, but let you go back farther for the regular query?

Flashback query shows 7th Nov value and the next query shows 8th nov value..
thanks,
baskar.l

Similar Messages

  • Cannot use Flashback Versions Query in Oracle 10g

    If I want use Flashback Versions Query for one Table in my Database 10.1.0.4 then I receive follow error message:
    500 Internal Server Error
    java.lang.RuntimeException: options is null
         at oracle.sysman.emSDK.jsp.ListBean.applyAttributes(ListBean.java:70)
         at oracle.sysman.emSDK.jsp.ShuttleBean.render(ShuttleBean.java:41)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
         at oracle.cabo.ui.laf.xhtml.XhtmlLafRenderer.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
         at oracle.cabo.ui.laf.xhtml.RowLayoutRenderer.renderChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
         at oracle.cabo.ui.laf.xhtml.XhtmlLafRenderer.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    .... and so on
    Can any of you help me?

    At what stage did you get this error?. Have you already selected the type of Flash Back Versions Query you want e.g Specifying type of Point in Time (Row Evaluation, Timestamp or SCN) or just when you select from the Action?

  • Doubt regarding flashback versions  query

    I am working with Oracle 10g database on Oracle Enterprise Linux
    I was trying this query both as sysdba and connected as the respective user .
    When connected as sysdba I was of course appending schema name to the table name while running the query so there were no errors.
    SELECT VERSIONS_STARTTIME, VERSIONS_ENDTIME
          FROM emp_data
          VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE
          ORDER BY VERSIONS_STARTTIME ;
    VERSIONS_STARTTIME                                VERSIONS_ENDTIME  But unfortunately the query is returning null .
    Let me know if any parameter has to be enabled for the query to work or what went wrong. The table of course has many transactions running and I was able to get the change through ora_rowscn but flashback versions query was the one not working.
    Let me know if I have missed anything

    Prabu,
    If the transaction is still going on means they are not yet committed than Versions query won't show you anything.Also if you have surpassed the Undo_retention andhave most probably lost the required undo data,you wont be able to get any output from it.So check these two things.There are no special parameters required to use this feature except for automatic undo management and Undo retention.
    In the meantime,you may also want to look at this link for a simple description of this and other flashback features,
    http://www.oracle-base.com/articles/10g/Flashback10g.php
    HTH
    Aman....

  • Flashback query works, but not flashback versions query

    This is a test database (Oracle10g 10.1.0.5), not in archivelog mode. I deleted one row 2 hours ago. I can still use flashback query:
    select * from tm_instances as of timestamp to_timestamp('STARTTIME_HERE') to view this row. But I can't use the following flashback versions query:
    SELECT versions_startscn, versions_starttime,
    versions_endscn, versions_endtime,
    versions_xid, versions_operation from tm_instances VERSIONS BETWEEN TIMESTAMP to_timestamp('STARTTIME_HERE') and MAXVALUE
    It gave the following error:
    ORA-30052: invalid lower limit snapshot expression
    So I guess flashback query works better than flashback versions query?
    undo_retention is set to 900 by default here.
    Thanks,
    Hai

    currently function returns all mydate rows, i just want mydesired date rowsCheck if there is a column in the table with the same name as the function parameter. It's the most probable reason of such DML operations behaviour in PL/SQL procedures and function.
    Rgds.

  • Flashback Versions Query

    Hi
    Please explain me the advantages of Flashback Versions Query in 10g.I read 2 or more articles but still doubtful.It will be a great help if anybody clarify my doubt.
    Thanx & cheers
    Antony

    hi
    i want to give a example for better understanding on flashback version query
    SQL> select * from a;
    NO
    1
    2
    3
    SQL> delete from a where no=2;
    commit;
    1 row deleted.
    SQL>
    Commit complete.
    SQL>
    SQL> select * from a;
    NO
    1
    3
    SQL> r
    1 SELECT versions_xid AS XID,
    2 versions_startscn AS START_SCN,
    3 versions_endscn AS END_SCN,
    4* versions_operation AS OPERATION,no from a VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE
    XID START_SCN END_SCN O NO
    0005002C0000045B 205513026 D 2
    0009000D00000487 205512880 I 3
    0009000D00000487 205512880 205513026 I 2
    0009000D00000487 205512880 I 1
    verions of rows between two times and transaction that changed the rows
    use this xid with flashback_transaction_query to get the undo_sql for revert the changes
    SQL> select LOGON_USER,UNDO_CHANGE#,OPERATION,UNDO_SQL from flashback_transaction_query where XID='0005002C0000045B';
    LOGON_USER UNDO_CHANGE# OPERATION UNDO_SQL
    SCOTT 1 DELETE insert into "SCOTT"."A"("NO") values ('2');
    SCOTT 2 BEGIN
    Thanks and Regards
    Kuljeet Pal Singh

  • Difference between Flashback Versions Query vs Flashback Transaction Query

    plz somebody can clearly tell me difference between
    --Flashback Versions Query
    --Flashback Transaction Query                                                                                                                                                                                                                                   

    Hi,
    I was able to test the data given by you
    CREATE TABLE test1(a number);
    INSERT INTO test1 values(1);
    INSERT INTO test1 values(3);
    COMMIT;
    UPDATE test1 SET a=10 WHERE a=1;
    COMMIT;
    ALTEr TABLE test1 ENABLE ROW MOVEMENT;
    INSERT INTO test1 values(1);
    INSERT INTO test1 values(3);
    COMMIT;
    ALTEr TABLE test1 ENABLE ROW MOVEMENT;
    SELECT * FROM test1 VERSIONS BETWEEN TIMESTAMP
    TO_TIMESTAMP('2011-07-25 15:50:00', 'YYYY-MM-DD HH24:MI:SS') AND
    TO_TIMESTAMP('2011-07-25 15:56:00', 'YYYY-MM-DD HH24:MI:SS');
    A
    3
    1
    10
    3
    I didnt get any error. Please check again.

  • No flashback versions query and flashback transaction query tools on EM?

    No Flashback Versions Query and Flashback Transaction Query tools on EM Console?
    How to do Flashback Versions Query work and Flashback Transaction Query on EM Console?

    No Flashback Versions Query and Flashback Transaction
    Query tools on EM Console?WOrks on mine.
    How to do Flashback Versions Query work and Flashback
    Transaction Query on EM Console?Part of the Maintenance , Recovery wizard. Not intended to be a casual query tool.

  • Flashback Versions Query vs  Flashback Querya

    Hi,
    When I run the following Flashback Query, it shows that employee number 101 has salary of 17000 at "2009-11-07 11:30:00":
    SQL> SELECT employee_id, department_id, salary FROM employees
    AS OF TIMESTAMP
    TO_TIMESTAMP ('2009-11-07 11:30:00 PM', 'YYYY-MM-DD HH:MI:SS AM')
    WHERE employee_id=101;
    EMPLOYEE_ID DEPARTMENT_ID     SALARY
            101            90      17000However, when I run the following Flashback Versions Query on the same row,
    it doesn't show the row status when the salary was 1700.
    SELECT
    VERSIONS_STARTTIME AS START_TIME,
    VERSIONS_ENDTIME AS END_TIME,
    versions_operation AS OPERATION,
    last_name,
    salary
      FROM EMPLOYEES
      VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE
      WHERE employee_id = 101;
    START_TIME            END_TIME              O LAST_NAME           SALARY
    08-NOV-09 09.45.59 AM                       U Kochhar              19500
    08-NOV-09 09.45.38 AM 08-NOV-09 09.45.59 AM U Kochhar              19000
                          08-NOV-09 09.45.38 AM   Kochhar              18000
    Why the Flashback Versions Query doesn't display status of the rows retreived by the Flashback Query although both of them depend on the Undo?
    Thanks in advance.

    Flashback query shows 7th Nov value and the next query shows 8th nov value..
    thanks,
    baskar.l

  • Can I directly access BEX query from web version

    Hi expert,
            Can I directly access BEX query from web version ? I know we can access bex query from webi rich client.
    Many Thanks,

    Hi,
    Yes, you can access BEx query via BICS connection (OLAP Connection).
    In SAP BusinessObjects BI 4.0 you have multiple options to connect your SAP BusinessObjects BI client to your SAP NetWeaver BW system.
    Direct BI Consumer Services (BICS)
    SAP BusinessObjects BI 4.x Relational Universe (UNX)
    SAP BusinessObjects XI 3.1 OLAP Universe (UNV) used in a SAP BusinessObjects BI 4 environment
    Web Intelligence
    Yes
    Yes
    Yes
    SAP BusinessObjects Dashboards
    Yes
    Yes
    No
    Analysis, edition for Microsoft Office
    Yes
    No
    No
    Analysis, edition for OLAP
    Yes
    No
    No
    SAP BusinessObjects Explorer
    No
    Yes
    No
    SAP BusinessObjects Design Studio
    Yes
    No
    No
    Visual Intelligence
    No
    Yes (1)
    No
    Predictive Analysis
    No
    Yes (1)
    No
    Design Studio
    Yes
    No
    No

  • Can I use flashback database to flashback a pluggable database?

    Hi All,
    I created a container database and then created a pluggable database.
    In the pluggable 12.1 datbase, I loaded the user data.
    I performed the below
    sqlplus / as sysdba;
    create restore point CLEAN_DB guarantee flashback database;
    And I performed the transactions on the pdb.
    Now my intention is to restore to the restore point CLEAN_DB as created from the above step.
    If I perform the below, will it restore my pdb to the initial state?
    flashback database to restore point CLEAN_DB;
    Regards,
    Kamal.

    Hi,
    You cannot use FLASHBACK DATABASE for pluggable database.
    Flashback query/versions queryis UNDO based and work in PDB’s
    Flashback transaction query/flashback transactionis UNDO and REDO based and work in PDB’s
    Flashback data archiveUNDO gernerated archives
    Flashback table
    before drop –> Rename segment name of recylebin, which is based on UNDO, work in PDB’s
    flashback table to –> is UNDO based, work in PDB’s
    Flashback databasedoesn’t work in PDB’s:
    RMAN> flashback pluggable database prmdb01 to time "to_date('23:00 20-11-2013','hh24:mi dd-mm-yyyy')";
    Starting flashback at 25-NOV-13
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of flashback command at 11/20/2013 23:00:00
    RMAN-05108: Command is not supported for pluggable database
    Regards
    Mahir M. Quluzade
    p.s. Command exists but not supporting, may be next release come support.

  • Flashback questions - particularly flashback table

    Hi,
    Oracle 10GR2
    The docs state that flashback must be turned on in order to enable the functionality. Subsequently, a flashback logfile is started where designated. Now, for flashback table the docs also state that data comes from the UNDO iin order to restore. My first question is: What is kept in the flashback log and how does it fit in (given that the restore is done via UNDO)? The docs also state that if a flashback database is done that you should perform a resetlogs, but nothing is specified with respect to after a flashback table is done. I could see why you wouldn't want to but still wonder about the table that was flashed back and if it is in a vulnerable state.
    I'm also interested in understanding the significance of flashback retention time vs undo_retention.
    I guess I see some overlap here between the UNDO and FLASHBACK and want to understand the difference.
    Thanks

    Know that Flashback logs are not the only thing
    stored in Flashback Recovery Area. Archived redo logs
    and RMAN backups are also stored and they are used
    for Flashback Table, Flashback Drop, Flashback
    Versions Query, and Flashback Transaction Query
    features.Hmm....this is news to me. Are you are sure about this????? Archived logs, backups are stored in the FRA, but it doesn't mean that they are used for Flashback table, Flashback drop, and FBQ or FTQ....
    So yes, I would say, you need flashback on to
    flashback a table.Again, NO, this is not required. You may like to review the facts associated with these technologies once again.
    Thanks
    Chandra

  • BW QUERY and BW MDX Query

    Hi,
    While creating a report through crystal i see one option while creating a connection to database.
    SAP BW Query
    SAP BW MDx Query.
    Could anyone told me whats the technical diffrence between two.
    When option should be used when.
    Thanks
    Ashwani

    The BW Query Driver is an old version. the BW MDX is an enhanced version.
    The BW MDX Driver is able to leverage a BW query with two structures and it shows display attributes.
    ingo

  • Query off of a Query

    I have an initial query that does several things, groups, creates calculated fields, etc... I now want to run a subsequent different query using the first query as my data source. I want to query off a query, so to speak.

    Main page for Documentation
    http://www.oracle.com/technetwork/middleware/performance-management/documentation/index.html
    Current Version Documentation
    http://docs.oracle.com/cd/E40248_01/nav/portal_4.htm
    Look at Oracle Hyperion Interactive Reporting -> Studio User's Guide

  • Query hangs with outer query

    Hi,
    OS: SPARC 64 bit
    Oracle Version: 10.2.0.3.0 64 bit
    My query hangs when I include the outer query. When I execute without outer query It comes out in a fraction of second but when I includes outer query it starts hang
    Below is my original query which hangs
    select * from (select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
    AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
    ('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000) WHERE raw_rnum_ > 0;
    when I execute this it will come out immediately
    select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
    AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
    ('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000
    select * from (select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
    AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
    ('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000) WHERE raw_rnum_ > 0;
    but when I includes outer query I hangs it is really very weird for me?
    Here is the explain plan for that query
    Execution Plan
    Plan hash value: 3493649369
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 2015 | 1 (0)| 00:00:01 | | |
    |* 1 | VIEW | | 1 | 2015 | 1 (0)| 00:00:01 | | |
    |* 2 | COUNT STOPKEY | | | | | | | |
    | 3 | PARTITION RANGE SINGLE | | 1 | 5894 | 1 (0)| 00:00:01 | 99 | 99 |
    | 4 | PARTITION LIST ALL | | 1 | 5894 | 1 (0)| 00:00:01 | 1 | 48 |
    |* 5 | TABLE ACCESS BY LOCAL INDEX ROWID| CDR | 1 | 5894 | 1 (0)| 00:00:01 | 4705 | 4752 |
    | 6 | BITMAP CONVERSION TO ROWIDS | | | | | | | |
    |* 7 | BITMAP INDEX SINGLE VALUE | IX_CDR_INTERFACE | | | | | 4705 | 4752 |
    Predicate Information (identified by operation id):
    1 - filter("RAW_RNUM_">0)
    2 - filter(ROWNUM<=10000)
    5 - filter("DAY_OF_YEAR"=99 AND "TIME_STAMP">=TO_DATE('2009-04-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND
    "TIME_STAMP"<=TO_DATE('2009-04-09 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND ("NETWORK_ID"=1025 OR
    "NETWORK_ID"=1026))
    7 - access("INTERFACE"='TRAFIC')
    can one explain why it happen? what could be the reason? Is it a bug or something? what should I do now? Issue is critical in the production enviromentent
    Waiting for your Valuable Reply
    Thanks In Advance
    With Regards
    Boo

    user454189 wrote:
    I suspect the issue with the where clause (raw_rnum_ > 0)
    Actually I using bitmap index on ' INTERFACE' column. Does it causing a prob or raw_rnum_ causing a problem?Boo,
    a couple of comments:
    1. Why do you use the deprecated FIRST_ROWS hint? From 9i on the FIRST_ROWS_n mode should be used instead, and since you're using a top-N query format the hint should be superfluous anyway since the optimizer should switch to FIRST_ROWS_n mode automatically.
    2. Why do you use a BITMAP index and not a conventional b*tree index? Let me hazard a guess: Because the INTERFACE column has a small number of distinct values? That would be in most cases a bad idea.
    3. What seems to be odd that you're accessing the data via the BITMAP index on INTERFACE, but request an ORDER BY ID DESC. But there is no order by in the execution plan posted. I wonder where the order should come from? Can you show us the DDL of the bitmap index?
    4. What does the plan look like if you run only the inner query without the outer query?
    You can always gain more information by tracing the statement execution or using the GATHER_PLAN_STATISTICS hint together with the DBMS_XPLAN.DISPLAY_CURSOR function.
    Please read this HOW TO: Post a SQL statement tuning request - template posting that explains what you should provide if you have SQL statement tuning question and how to format it here so that the posted information is readable by others.
    This accompanying blog post shows step-by-step instructions how to obtain that information.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to find all query elements inside a Query

    Hi,
    I would like to find out all query elements inside my query.
    Is there any table which stores all query elements inside my query ?
    Thanks
    Pratyush

    Hi,
    Query elements are stored in this  follwing table:
    SE11
    Table name : RSZELTXREF [Directory of query element references]
    other query related tables :
    Tables used in  Queries
    RSZELTDIR      Directory of the reporting component elements
    RSZELTTXT    Texts of reporting component elements 
    RSZELTXREF  Directory of query element references 
    RSRREPDIR     Directory of all reports (Query GENUNIID) 
    RSZCOMPDIR  Directory of reporting components 
    RSZRANGE    Selection specification for an element 
    RSZSELECT    Selection properties of an element
    RSZELTDIR     Directory of the reporting component elements 
    RSZCOMPIC    Assignment reuseable component <-> InfoCube
    RSZELTPRIO   Priorities with element collisions
    RSZELTPROP  Element properties (settings)
    RSZELTATTR  Attribute selection per dimension element 
    RSZCALC        Definition of a formula element 
    RSZCEL           Query Designer: Directory of Cells
    RSZGLOBV     Global Variables in Reporting
    RSZCHANGES  Change history of reporting components 
    Hope it will helps you.
    Thanks
    Hemav

Maybe you are looking for