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
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 anythingPrabu,
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,
Haicurrently 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 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 -
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
Antonyhi
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 QueryHi,
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 version and transaction
Hi
Does flashback versions and flashback transactions query use the undo data.How long can we use flashback versions query..Sekar_BLUE4EVER wrote:
Hi
Does flashback versions and flashback transactions query use the undo data.How long can we use flashback versions query..Yes they both use UNDO data. You need to specify UNDO_RETENTION
Check the following link:
http://www.databasejournal.com/features/oracle/article.php/3819031/Is-Your-UNDO-Tablespace-Prepared-for-Oracles-Flashback-Technology.htm
Kamran Agayev A.
Oracle ACE
My Oracle Video Tutorials - http://kamranagayev.wordpress.com/oracle-video-tutorials/ -
Version management to my query
Hi Guru's,
I want to check version management to my query in bex analyzer.How can i find this.
Regards,
Vijay.Hi,
in addition to Arun:
you can check the table rszchanges. First goto table rszeltdir and search for your query entering the technical name of your query in field mapname. You get the eltuid, the technical key of the query. Take this value and goto rszchanges. Enter the eltuid in field compuid and start the selection. At least you will get some records to see which version was changed on which date, but nothing about who changed and what were the changes...
regards
Siggi -
In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?
The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.
-
VO Auto Refresh error - Unsupported query for Continuous Query Notification
I created a read only view object and set the auto refresh property to true. According to the documentation that was all that need to be done in order to enable auto-refresh for a view instance of a shared application module (which I am using to retrieve reference data). When I run a test, I get the following error:
[371] DCBindingContainer.reportException :oracle.jbo.SQLStmtException
[372] oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT
CCIPO_REF_SENSITIVITY_LEVEL.SENSITIVITY_ID SENSITIVITY_ID,
CCIPO_REF_SENSITIVITY_LEVEL.SENSITIVITY_DESC SENSITIVITY_DESC
FROM
CCIPO_REF_SENSITIVITY_LEVEL
at oracle.jbo.server.BaseSQLBuilderImpl.processException(BaseSQLBuilderImpl.java:3721)
at oracle.jbo.server.OracleSQLBuilderImpl.processException(OracleSQLBuilderImpl.java:4722)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1386)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:928)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:6968)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1183)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1037)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2774)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2751)
at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1580)
at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3500)
at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:9943)
at oracle.adf.model.binding.DCIteratorBinding.setupRSIstate(DCIteratorBinding.java:779)
at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:679)
at oracle.jbo.uicli.binding.JUIteratorBinding.refreshControl(JUIteratorBinding.java:474)
at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4437)
at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:347)
at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1605)
at oracle.jbo.jbotester.panel.BindingPanel.setBindingContext(BindingPanel.java:116)
at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:88)
at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:71)
at oracle.jbo.jbotester.form.BindingForm.createMasterPanel(BindingForm.java:63)
at oracle.jbo.jbotester.form.BindingForm.init(BindingForm.java:98)
at oracle.jbo.jbotester.form.JTForm.<init>(JTForm.java:72)
at oracle.jbo.jbotester.form.BindingForm.<init>(BindingForm.java:50)
at oracle.jbo.jbotester.form.FormType$1.createForm(FormType.java:63)
at oracle.jbo.jbotester.form.FormType.createForm(FormType.java:199)
at oracle.jbo.jbotester.form.FormType.createTab(FormType.java:270)
at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:248)
at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:207)
at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:203)
at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:140)
at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:123)
at oracle.jbo.jbotester.tree.Tree.processTreeMouseClicked(Tree.java:728)
at oracle.jbo.jbotester.tree.Tree.access$100(Tree.java:96)
at oracle.jbo.jbotester.tree.Tree$TreeMouseListener.mouseClicked(Tree.java:141)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
at java.awt.Component.processMouseEvent(Component.java:6292)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.sql.SQLException: ORA-29983: Unsupported query for Continuous Query Notification
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1262)
... 65 more
The query is selecting two varchar2 columns and according to the criteria in the documentation is valid to be registered for QRCN in Guaranteed Mode. Any thoughts?
JDev version: JDeveloper 11.1.1.5.0.Well, could be a DB bug. I seem to remember that there was a bug in that area in an older version of 11g.
Or you could use jnettrace to trace the calls made by the driver to the DB. That should show you what's going wrong.
Sascha -
Set/get variables with RSBBS from query 1 to query 2
Hi BW Experts,
I created a sender/receiver assignment from query 1 to query 2 using RSBBS. For two characteristics I assigned the processing method by Variable. Process mode for these variables in the receiver query is by customer exit. But I dont know how to set/get values of these variables.
Is there any function module to do it ??
Please help!!
Devthanks...but i m not used in RSBBS and i m afraid i m lost
could anyone explain me in detail :
- what i have to do for setting the sender & receiver,
- before to set parameter ID in the sender how to get the information of the current line (which will serve for the jump)
please help! i promise points
Dev -
Multiple value selection from a base query to jump query in Web
Hi ,
System info
SAP BW 3.5 level-9
PI_BASIS -2004_1_640 level-8
SAP_ABA -640 Level-11
SAP_BASIS-640 Level-11
We have an inventory query with Profit Center,Plant & Material as characteristic. When we run the query, for example we get 10 materials for a plant. We want to keep those materials as filter value for material & want to jump to another query. The Jump query will only execute for those selected materials.
We can able to do the above scenario in BW BEx analyzer but we are not able to do in the web. Any input to resolve the issue are welcome.
example
Query A
Profit Center Plant Material
PC12345 P542 M1
PC12345 P542 M2
PC12345 P542 M3
PC12345 P542 M4
PC12345 P542 M5
PC12345 P542 M6
PC12345 P542 M7
PC12345 P542 M8
PC12345 P542 M9
PC12345 P542 M10
Select M1 to M10 & right click "Keep filter value"
Then remove Material from the drilldown.
The query looklike this:
Query A
Material M1....M10
Profit Center Plant
PC12345 P542
Then right click on P542 "Goto" jump query B.
Query B get executed on those selected materials(M1...M10) as we have a material variable in query B which is mandatory.
In a nut we are selecting more then one value & going to another query.
Regards
Mahendrawhen u select KEEP FILTER VALUE at tat instance u can select only 1 value
HOW DID U SELECT M1 & M10 bot within one hit.
instead of using this option.... did u try restriction
wat i mean is when u know before hand that u need only m1 & m10
remove material first from the display
it will automatically reside in Free chars
right click material and hit RESTRICT
select m1 & m10
hit okey
now u will see desired result...
now try jump query...
try removing the material variable from query b , just for experiementing purpose
and then repeat above exercise...
let us know how u go with it -
Error in while Executing Query in the Query Designer
Hi,
I created info Set based two info object and three Data Store Objects. and join condition is Left Outer Join.
there are Business Partner info object, CRM BP Sales View Info Object and Data Store Objects are BP: Roles (0BP_ROLE),Partner: Industries(0BP_IS),CRM Marketing Attributes for Business Partner(0ATR_DS01)
I given some Selection Parameters while executing query in the Query Designer. in That i given city is selection parameters
and i creted variable for this info object.
it gives the Error Messages
Beim Lesen der Daten sind Fehler aufgetreten. Navigation ist möglich
Der Wert "New Delhi " von Merkmal 0CITY40 enthält an der 10.ten Stelle einen Fehler
it is very urgent , can any one help me regarding this.Hi Reddy,
The Error message in english is this
While reading the data mistakes have appeared. Navigation is possible
The value " New of Delhi " from sign 0CITY40 contains a mistake at the 10.ten place
and i think you need to run the change run and run the report with out selecting the variable option.and navigate in the report by filtering the report for your requirement.
Try this and let me know.
Thanks,
RK
Maybe you are looking for
-
I have a macbook pro, and i want to transfer my hard drive from my macbook (500g), but the display drivers and such are different. How do i do this and is it possible? The Macbook Pro has Mac OS X 10.4.11 (70g hard drive) The Macbook has Mac OS X 10
-
Satellite P10-804: AC adapter makes loud noises
The power supply is periodically making terrible noises. Can it be replaced with a non Toshiba power adaptor ? If yes, is there anything I need to know ?
-
We could not complete your purchase - This version of Mac OS X 10.7 cannot be installed on this computer. I don't know where is problem. On my iMac was install without problem but on my second computer mac mini I cannot install. I have intel core 2
-
Rental movies in original language
I just downloaded a movie, and find that I can only see it in Spanish, and have no option to change to the original language, which is English. Ho w aggravating!! I live in Spain. Any way to fix this?
-
Can you please send me the full partial reset instructions.
I've reset the printer dozens of times. Even hooked it to a new computer. Also this is clearly a chronic problem with the equipment. Has HP done anything to correct the problem? Can you please send me the full partial reset instructions.