Flashback transaction query output

Hi there,
Here is my small demo.
C:\Documents and Settings\Aman>net start oracleserviceorcl
The OracleServiceORCL service is starting.............................
The OracleServiceORCL service was started successfully.
C:\Documents and Settings\Aman>sqlplus aman/
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Dec 9 19:38:00 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create table a ( a number);
create table a ( a number)
ERROR at line 1:
ORA-00955: name is already used by an existing object
SQL> drop table a purge;
Table dropped.
SQL> create table a ( a number);
Table created.
SQL> insert into a values(1);
1 row created.
SQL> insert into a values(2);
1 row created.
SQL> commit;
Commit complete.
SQL> update a set a=100;
2 rows updated.
SQL> commit;
Commit complete.
SQL> select versions_xid from a
2 versions between scn minvalue and maxvalue;
VERSIONS_XID
0A001100F2010000
0A001100F2010000
04001C00DD010000
04001C00DD010000
SQL> select xid, undo_sql
2 from flashback_transaction_query
3 where xid=hextoraw('0A001100F2010000');
XID
UNDO_SQL
0A001100F2010000
update "AMAN"."A" set "A" = '1' where ROWID = 'AAAM5kAAEAAAAG+AAA';
0A001100F2010000
update "AMAN"."A" set "A" = '2' where ROWID = 'AAAM5kAAEAAAAG+AAB';
0A001100F2010000
What I am not able to get is that I should be seeing 2 rows in the output of flashback transaction query view but I am seeing 3 with in one, there is no undo_sql shown but xid is shown. Can anyone let me know why there is this additional third row available and what does it signify?I assume it to be some what associated with commit that I gave but I amot sure as its just a hunch.Any inputs are highly welcome.
Thanks and best regards,
Aman....

Yes, the transaction starts with your first dml statement.
The BEGIN record in flashback_transaction_query marks the beginning of the transaction. If you order the rows by UNDO_CHANGE# you see that the dml statements are returned in reverse order and the last row is the BEGIN row. The view just displays it to mark the beginning of that transaction.
It is a little bit strange as we can identify a single transaction by the XID column, but maybe that row is used for some other internal processing, I am just guessing.
SQL> create table a ( a number);
Table created.
SQL> insert into a values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> select versions_xid from a
  2  versions between scn minvalue and maxvalue;
VERSIONS_XID
0029001B0000450B
SQL> column operation format a10
SQL> column table_name format a10
SQL> set lines 100
SQL> column undo_sql format a20
SQL> select xid, undo_sql, table_name, operation, undo_change# from flashback_transaction_query
  2  where xid=hextoraw('0029001B0000450B')
  3  order by undo_change#;
XID              UNDO_SQL             TABLE_NAME OPERATION  UNDO_CHANGE#
0029001B0000450B delete from "SYS"."A A          INSERT                1
                 " where ROWID = 'AAA
                 w4gAABAAAZHrAAA';
0029001B0000450B                                 BEGIN                 2

Similar Messages

  • Flashback Transaction Query very SLOWWWW

    We are planning to make numerous changes to data in our database soon and we
    want to be able to use flashback_transaction to rollback these changes if we
    need to. I have been able to use flashback_transaction_query to capture and
    create the undo sql but it is a VERY slow process. I have lowered the
    db_flashback_retention_target from 1140 to 360 in an attempt to reduce the
    amount of data we have to read to capture the undo sql but that didn't seem to
    help. Even with the db_flashback_retention_target set to 360 I am seeing
    statements over 6 hours old. Is there any way to speed up the process of
    capturing the undo sql? Here is the sql I use:
    select undo_sql
    from flashback_transaction_query
    where logon_user = 'ROLLOUT';

    This information is form the documentation -> http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_flashback.htm#sthref1493
    Flashback Tips – Performance
    * For better performance, generate statistics on all tables involved in a Flashback Query by using the DBMS_STATS package, and keep the statistics current. Flashback Query always uses the cost-based optimizer, which relies on these statistics.
    * The performance of a query into the past depends on how much undo data must be accessed. For better performance, use queries to select small sets of past data using indexes, not to scan entire tables. If you must do a full table scan, consider adding a parallel hint to the query.
    * The performance cost in I/O is the cost of paging in data and undo blocks that are not already in the buffer cache. The performance cost in CPU use is the cost of applying undo information to affected data blocks. When operating on changes in the recent past, flashback features essentially CPU bound.
    * Use index structures for Flashback Version Query: the database keeps undo data for index changes as well as data changes. Performance of index lookup-based Flashback Version Query is an order of magnitude faster than the full table scans that are otherwise needed.
    * In a Flashback Transaction Query, the type of the xid column is RAW(8). To take advantage of the index built on the xid column, use the HEXTORAW conversion function: HEXTORAW(xid).
    * Flashback Query against a materialized view does not take advantage of query rewrite optimizations.
    See Also:
    Oracle Database Performance Tuning Guide
    Also taking sql trace and analysing would help -> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF01020

  • Flashback 기능 관련 질문 드립니다.[FLASHBACK TRANSACTION QUERY]

    flashback 기능을 공부 중에 있습니다.
    테스트 환경 은 10GR1 입니다.
    scott 에 dba 권한을 주구 쉽게 테스트 진행 중에
    예제와 좀 다른 결과가 나와서, 좀 이상하게 생각이 되서요..
    원래 이게 맞는지도 잘 모르겠네요..
    제가 테스트 진행에 참고하는 문서는
    Reviewed by Oracle Certified Master Korea Community
    ( http://www.ocmkorea.com http://cafe.daum.net/oraclemanager )
    A REWIND BUTTON FOR ORACLE 10G DATABASE
    – FLASHBACK BEST PRACTICES
    입니다. 오타가 좀 있더군요..
    아래와 같이 테스트를 진행 하였습니다.
    ### Test 시작
    # sysdate check
    --select sysdate from dual
    --2007/02/21 20:14:57
    # emp data check
    --select * from emp
    --7782     CLARK     MANAGER     7839     1981/06/09 00:00:00     2450          10
    --7788     SCOTT     ANALYST     7566     1982/12/09 00:00:00     3000          20
    --7839     KING     PRESIDENT          1981/11/17 00:00:00     5000          10
    --7844     TURNER     SALESMAN     7698     1981/09/08 00:00:00     1500     0     30
    --7876     ADAMS     CLERK     7788     1983/01/12 00:00:00     1100          20
    --7900     JAMES     CLERK     7698     1981/12/03 00:00:00     950          30
    --7902     FORD     ANALYST     7566     1981/12/03 00:00:00     3000          20
    --7934     MILLER     CLERK     7782     1982/01/23 00:00:00     1300          10
    ## 3rows 삭제
    --delete emp where empno in ( 7782,7788,7839 )
    --commit
    ## 삭제 결과 확인
    --select * from emp
    --7844     TURNER     SALESMAN     7698     1981/09/08 00:00:00     1500     0     30
    --7876     ADAMS     CLERK     7788     1983/01/12 00:00:00     1100          20
    --7900     JAMES     CLERK     7698     1981/12/03 00:00:00     950          30
    --7902     FORD     ANALYST     7566     1981/12/03 00:00:00     3000          20
    --7934     MILLER     CLERK     7782     1982/01/23 00:00:00     1300          10
    ## Sysdate Check
    -- select sysdate from dual
    -- 2007/02/21 20:16:19
    ## 원래 이부분은 원문은 where 절을 추가하여 아래와 같습니다.
    SELECT version xid, ename
    FROM emp
    VERSIONS BETWEEN
    TO_TIMESTAMP('03/15/2005 15:30:00', 'MM/DD/YYYY HH24:MI:SS') AND
    TO_TIMESTAMP('03/15/2005 16:10:00', 'MM/DD/YYYY HH24:MI:SS')
    WHERE empno = ‘7900’;
    제가 테스트 한건 특정 시간에 delete 혹은 dml 에 의해서 변경된 전체를
    찾는 다는 의미에서 where 절을 주지 않았습니다.
    ==> 이 부분이 맞는지 모르겠네요..
    -- select versions_xid, ename from emp versions between timestamp
    -- to_timestamp('2007.02.21 19:40:00','YYYY.MM.DD HH24:MI:SS') and
    -- to_timestamp('2007/02/21 20:16:19','YYYY.MM.DD HH24:MI:SS')
    ## Return 된 결과
    -- 0004002D0002F847     KING
    --0004002D0002F847     SCOTT
    --0004002D0002F847     CLARK
    --     CLARK
    --     SCOTT
    --     KING
    --     TURNER
    --     ADAMS
    --     JAMES
    --     FORD
    --     MILLER
    ## xid 값을 통해서 undo_sql 문장을 찾고 이를 통해서 손쉽게
    복구가 가능하다고 하는데 실제로 return 되는 undo_sql 문장은
    전체가 아닌 한 row 에 대한 undo_sql 문장만 return 되서요..
    --SELECT operation, undo_sql
    --FROM FLASHBACK_TRANSACTION_QUERY
    --WHERE xid = HEXTORAW('0004002D0002F847');
    --DELETE     insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO")
    -- values ('7782','CLARK','MANAGER','7839',TO_DATE('81/06/09', 'RR/MM/DD'),'2450',NULL,'10');
    --BEGIN     
    ==> undo 로 return 되는것은 한 row 에 대한 undo_sql 문 !!
    # 이건 참고 문서 원문 입니다. xid 값을 통해서 원하는 문장 찾기
    SELECT operation, undo_sql
    FROM FLASHBACK_TRANSACTION_QUERY
    WHERE xid = HEXTORAW(‘0400260021450000’);
    ## Test 끝
    이것이 정상적인지 제가 miss 하고 가는 것이 있는지 조언
    부탁드립니다.
    좋은 하루 되세요 .
    글 수정:
    darkturtle
    글 수정:
    darkturtle

    flashback 기능은 9i때 도입된건 맞습니다. 다만 9i 때는 [flashback query] 만 제공 되었고,
    10g 이후부터
    lashback Database
    Flashback Drop
    Flashback Query
    Flashback Version Query
    Flashback Transaction Query
    Flashback Table
    모두 지원되며, 11g에서도 물론 지원됩니다.... 아마 더 추가된 flashback 기능이 있을 겁니다.. ^^

  • Flashback transaction query advice

    I need to be able to see all transactions on a table during a specific period of time (about every 15 minutes). I have a choice of creating a DB trigger on the table that captures the transactions and writes them to a new table or using the flashback transaction query feature. I haven't used flashback transaction query before in a production DB and was wondering if there were any performance issues I need to worry about (since there will be continous changes to the table being made). I think my query would be something like below and would be executing it very 15 minutes. Any advice/tips would be appreciated.
    SELECT last_name, versions_starttime, versions_operation
    FROM emp versions BETWEEN TIMESTAMP
    SYSTIMESTAMP - INTERVAL '15' MINUTE AND SYSTIMESTAMP
    WHERE versions_starttime is not null
    ORDER BY versions_endtime asc
    Edited by: bobmagan on Feb 7, 2013 5:32 AM

    Actually, this is a Flashback Versions query ( http://docs.oracle.com/cd/E11882_01/appdev.112/e17125/adfns_flashback.htm#i1019938 ), not a Flashback Transaction query (http://docs.oracle.com/cd/E11882_01/appdev.112/e17125/adfns_flashback.htm#i1007455 ). I found that the Flashback Version Queries were more reliable than the Flashback Transaction Queries.
    Be aware that truncates and other DDL will cause a 'break' and you will not be able to query before that.
    Make sure your undo_retention is set to keep undo long enough for your purposes.
    Test well. You may or may not see versions that were created within the same transaction.

  • 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 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

  • Problem with Flashback transaction query in 10g

    Hello,
    I'm having a problem when working with FLASHBACK_TRANSACTION_QUERY.
    When I make a simple update of table PARTIES with some trigger (one transaction with XID=000300310027ACAA), expected result can be found in FLASBACK_TRANSACTION_QUERY:
    select xid, start_scn, commit_scn, logon_user, undo_change#, operation, table_name, table_owner, undo_sql from flashback_transaction_query f
    where xid = hextoraw('000300310027ACAA');
    XID               START_SCN     COMMIT_SCN     LOGON_USER     UNDO_CHANGE#     OPERATION     TABLE_NAME          TABLE_OWNER     UNDO_SQL
    000300310027ACAA     170337630398     170337630411     SYSTEM     1               UPDATE     PARTY_HIST_LOGS     ODS_OWNER          update ...
    000300310027ACAA     170337630398     170337630411     SYSTEM     2               UPDATE     PARTIES          ODS_OWNER          update ...
    000300310027ACAA     170337630398     170337630411     SYSTEM     3               BEGIN          null               null               null     
    But after a while (cca 1 minute) all rows representing DML operations changes to one row with operation=UNKNOWN. And in the same time TABLE_OWNER, UNDO_SQL, ROW_ID is lost.
    select xid, start_scn, commit_scn, logon_user, undo_change#, operation, table_name, table_owner, undo_sql from flashback_transaction_query f
    where xid = hextoraw('000300310027ACAA');
    XID     START_SCN     COMMIT_SCN     LOGON_USER     UNDO_CHANGE#     OPERATION     TABLE_NAME     TABLE_OWNER     UNDO_SQL
    000300310027ACAA     170337630398     0     SYS     1     UNKNOWN     PARTIES     null          null               null
    000300310027ACAA     170337630398     0     SYS     2     BEGIN          null          null          null               null
    Do you have any explanations, why this happens?
    Thanks a lot Filip
    Here are some DB parameters:
    Oracle 10g - 10.2.0.3.0 - 64bit Production
    noarchive log mode
    minimal supplemental logging enabled
    UNDO_MANAGEMENT=AUTO
    UNDO_RETENTION=57600
    v$undostat.tuned_undoretention=345600
    RETENTION GUARANTEE=YES

    SELECT
    o1.GRP_CODE
    , o1.GRP_DESC
    , o1.GRP_GROUP
    , o1.GRP_KATEG
    , o2.actual_amount
    , o2.budg_amount
    , o2.branch
    FROM
    vw_budget_codes o1 LEFT OUTER JOIN dw_fbudget_star o2 ON (o1.grp_code = o2.grp_code)
    WHERE
    o2.branch= '5455345'
    Message was edited by:
    TanteKaethe
    Message was edited by:
    TanteKaethe

  • 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....

  • Query Output to download in flat file through APD  or other means?

    Hello Experts,
    I am currently on BW3.5 system and have requirement to load query output in flat file in .csv format. I checked the option of APD but looks like we cant directly load the query output in flat file like in APD (BW  3.5 system) .
    One way i can think of it...load  the query output in transactional ODS and built an infospoke on it to write into flat file.
    Please advice if there are any better methods to store the query output in flat files.
    Thanks!

    Hi,
    Use RSCRM_BAPI.
    See
    Re: RSCRM_Bapi
    See the help on RSCRM_BAPI
    Re: Running Quaries automatically and saving them in as a Excel file in Server
    Re: Data transfer to external systems
    Re: Loading from a Custom R/3 Table
    Re: How can I schedule my Bex report to execute in background
    Re: How can I insert the RSCRM_BAPI into Process chain?
    Thanks
    Reddy

  • 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

  • Central Management server - executed a query but how to send the query output in the form of mail?

    Hi All,
    i have used CMS in SQL 2008 R2. i have added couple of servers in its group. i have executed a query & i need to send the query output in the form of email.
    basically query is checking the rows count from couple of user tables in servers.
    issue here is how to copy the data that is used by CMS? i need to work on automate the rows count in difft user table in db servers
    could you please suggest how can i achieve this?

    Copy to what?
    SELECT COUNT(*) FROM sys.objects
    Running the above statement returns two columns (server name and count)
    All the servers SS2005  and onwards , then use
    EXEC msdb.dbo.sp_send_dbmail 
         @profile_name = 'name', 
         @recipients = '[email protected]', 
         @query = 'SELECT COUNT(*) FROM sys.objects', 
         @subject = 'Count rows'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • 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?

  • ERROR displaying in the query output... urgetn

    hi experts,
    For the amount keyfigures in the query output it displaying ERROR after the amount like ex- 2000 ERROR.
    plz let me know how to rectify this..
    regards
    vadlamudi

    hi,
    i have created only two keyfigures EMP_BASIC and EMP_HRA. and in the transformations i have mapped with 0DOC_CURRCY.
    but in the report its showing ERROR only after the amount. plz tell me exactly with what field i need to map???
    regards
    vadlamudi

  • Issue In query output

    Hello Gurus,
    I am having an issue with query output.Please find below the details of it
    Unsold claims: Total---> 200
    Dispatch: Total--->118,086
    Unsold claims/dispatch--->0.001694
    This should be the output but its coming --.0033120 because itu2019s dividing with max value in dispatch which is 60,386.
    Reason: The aggregation property of Dispatch is max value. I am not supposed to do any changes in Modeling. So can we do any thing at reporting level to get the desired output?
    Desired output---->0.001694
    Output coming---->.0033120
    Please help me in getting the desired output at query level.
    Regards,

    solved with the help of nested exception aggregation

Maybe you are looking for

  • UpdateXML feature or bug?

    Stupid server error again duplicating my threads... Grrrr! Message was edited by: blushadow

  • HP stream 14 not switching on

    I was using my laptop and I then **bleep** the screen without turning the screen off to take my dogs for a walk for around 20 minutes. I returned from the walk and went to my laptop ur when I tried to turn it on the screen did not appear. The on butt

  • Still looking for flex help

    I had a couple of responses to my request for help that were excellent. Unfortunately, I have lost all my emails and cannot find the email of the people who responded. Could you please respond again at [email protected] I am still looking for some he

  • Codebase problem

    Both my client and server are in the same system, however, in different folders. They do not share other than Remote Interfaces. I want to test dynamic creation of stubs. However, I reciece Exceptions like Class not found exception when serializing o

  • Triggers Firing Sequence Of Forms 10g after commit_form trigger.

    hi all, please tell me Triggers Firing Sequence Of Forms 10g after commit_form trigger. thanks, Regards, Ambarish