Rollback after analyze command

Hi Everyone,
My DB version is
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
"CORE    10.2.0.1.0    Production"
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
I've inserted 5 rows in a table, but didn't commit the transaction.
After that I executed following query to update the plan table.
analyze table <table_name> compute statistics
Then I query the plan table for the update, it's updated, but after that I rolled back the transaction
and was hoping that those 5 records will be deleted from that table as I didn't commit the transaction.
But that didn't happen. So my question is when I was computed the statistics, previous DML statement
is committed automatically or what happened? Why ROLLBACK is not working for that table?
Regards,
BS2012. 

I tried this in Oracle 11gr2 version and found similar characteristic.
CREATE TABLE tmp (nm VARCHAR2 (100));
Table created.
INSERT INTO tmp
     VALUES ('A');
1 row created.
INSERT INTO tmp
     VALUES ('B');
1 row created.
INSERT INTO tmp
     VALUES ('C');
1 row created.
INSERT INTO tmp
     VALUES ('D');
1 row created.
INSERT INTO tmp
     VALUES ('E');
1 row created.
ANALYZE TABLE tmp COMPUTE STATISTICS;
Table analyzed.
ROLLBACK;
Rollback complete.
SELECT COUNT (*) FROM tmp;
count(*)
5
According to documentation:
COMPUTE STATISTICS instructs Oracle Database to compute exact statistics about the analyzed object and store them in the data dictionary. When you analyze a table, both table and column statistics are collected.
So Analyze is basically doing a commit into data dictinary in the same session.
Probably that is the reason why rollback does not work here.
Its like simple example:
I inserted 100 rows in a table without commit;
Created a new table in same session (DDL implicit commit)
rollback;
-- that rollback will not have effect on the 100 rows we committed before.
I guess Gurus will come up with better examples than what I have elucidated.
Cheers,
Manik.

Similar Messages

  • Analyze command in a Data warehouse env

    We are doing data loads daily on our Data warehouse. On certain target tables, we have change data capture enabled. As part of loading the table ( 4 million rows total) , we remove data for a certain time period ( say a month = 50,000+ rows) and loading that again from the source. We are also doing a full table analyze part of this load and is taking a long time.
    Question is : Do we need to do the analyze command every day ? Is there a big change we would see if we run the analyze once a week ?
    Thanks.

    Hi srwijese,
    My DW actually has 12TBs and after each dataload we do stats collection from our tables, BUT, we have partitioned tables in most of cases, so we just collect it at partition level using dbms_stat package. I don't know if your enviroment is partitioned or not, if yes, do a stats collection just for partition loaded.
    P.S: If you wish add [email protected] (MSN) to share experiences.
    Jonathan Ferreira
    http://oracle4dbas.blogspot.com

  • Analyze Command ?????

    Hi All,
    I m analyzing a table by analyze command. it takes long time after analyze table releted index of this table also get analyze. WHY ?????
    ASH

    Ash, what version of Oracle?
    The analyze command is obsolete and you should probably be using dbms_stats instead.
    To answer you question if you run analzye table x ....
    then Oracle will analyze the table and then immediately follow with the indexes if you did not include an option to limit the analyze command to the table (for table only).
    How long this takes will depend on the analyze options for sample size (computes, estimate, ...), how large the effective sort_area_size for the session performing the analyze, and how large the table and indexes are and on the hardware capabilities of your machine plus how active your system is at the time you run the command.
    When the command returns the complete message all requested actions are done.
    HTH -- Mark D Powell --

  • Rollback after DB polling

    Hi all,
    I am using DB adapter to poll records from a table(changing a status flag to processed when the records are read) then write these records to a file, all is running fine but I need to handle rollback if any error occurs ,this means that I want the old status in the status flag instead of the current status(processed).
    I already used rollback before and it works fine but I can't seem to rollback after polling, any ideas??

    Hi,
    To implement rollback scenario in BPEL, you need to use compensate activity and compensation Handler in your process.
    Basically in compensate we define the scope which we want to compensate, and in compensation Handler we define the logic i.e in your case we will write the update statement in compensation Handler.
    Hope I have answered to your doubt.
    Cheers,
    Abhi...

  • CSCsm71553 - BGP advertises prefix after network command is removed

    Hello,
    I got a stack of core switches with the following components :
    Switch Ports Model              SW Version            SW Image
         1 52    WS-C3750G-48PS     12.2(52)SE            C3750-IPSERVICES-M
    *    2 52    WS-C3750V2-48PS    12.2(52)SE            C3750-IPSERVICESK9-M
    BGP is configured on the stack in order to exchange routes with our WAN operator.
    I've been told that with some versions of these IOS, BGP keeps on advertising prefix after network command is removed.
    Can you tell me more about it and tell me if my software versions are submitted or not to this bug.
    Thanking you;
    Best regards;
    Pascal

    Hi Amit
    Thanks a lot for your feedback.
    To be noted : I also received an answer from a Cisco engineer writing me the bug was resolved since the 12.2(46)SE version. I will take no risk and prefer taking your answer into account.
    Best regards.
    Pascal

  • My MacBook Pro showed Spinning weel (SPOD) and when I tried to reboot took ages to restart (20 minutes)now shows SPOD after every command and is extrmely slow

    My MacBook Pro showed Spinning weel (SPOD) and when I tried to reboot took ages to restart (20 minutes)now shows SPOD after every command and is extrmely slow

    See if you can download and post an Etrecheck report:
    http://www.etresoft.com/etrecheck
    Ciao.

  • [svn:fx-trunk] 8459: Fixing current point after CloseSegment command in Path sequences.

    Revision: 8459
    Author:   [email protected]
    Date:     2009-07-08 12:39:23 -0700 (Wed, 08 Jul 2009)
    Log Message:
    Fixing current point after CloseSegment command in Path sequences.  Also fixing up cubic and quadratic smooth/shorthand logic (t/s) when preceding command is not a curve command).
    Bugs: SDK-21866, SDK-21862, SDK-21607
    Reviewer: Jason, Peter F.
    QE Notes: None
    Doc Notes: None
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21866
        http://bugs.adobe.com/jira/browse/SDK-21862
        http://bugs.adobe.com/jira/browse/SDK-21607
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as

    Hi,
    If I were you, I would Streamline the MDT Task Sequence to find the root cause.
    Moreover, please refer to the link below:
    How to fix Windows System32 Winload.exe Missing Or Corrupt 0xc000000f Error?
    http://winwiki.org/windows-system32-winload-exe-missing-or-corrupt-0xc000000f/
    Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Compaq sr1320nx /win xp after keystroke/command, the system is very slow 10-15 secs. before response

    after keystroke/command, the system is very slow 10-15 secs. before response

    What I've done is that I reinstalled 10.8.1 and each time, I ran disk utilitiy.  It has helped but fter a while, especially when waking up from sleep, EVERY app can take a lot of time to come up, including those already activated.  Every click would take at least 5secs to respond... and then the spinning ball comes up.
    It's only after the same app was used, then it would be smooth.  For example, I run my cursor down to the bottom of the screen where my dock is hidden.  It would take a few times of running down before the dock shows up.  From that point on, it would would work nicely unless I click on any of those apps in the dock.  Then, it would take another 5secs or more before something shows on the screen such as clicking on Mail.  It takes more than 5secs before mail pops up.  Then, when I click on any mailbox, it would take another 5secs or the spinning ball comes up.  From that point on, clicking on Mail is smooth and cicking on the same mailbox is smooth unless I click on a different mailbox or go to preferences, for example.
    So, I keep running disk utility almost everyday and now, it works 99% of the time.  If it slows again, I run the disk utility.  I guess that's the way to go until they come up with a proper fix.
    All this housekeeping work reminds me of Windows and the endless defragging and optimising.  That was one of the few reasons why I switched to Apple and now...
    Dear Mr Steve Jobs, please send some enlightenment to your Apple teams!

  • Stabilization turns itself off after analyzing?

    I have some strange issues with some clips needing a bit of stabilization.
    Some of the clips in the timeline (from the same main clip) somehow can't be stabilized, but I get no warning. The only way I know, is because the blue "on" light turns off just after "Analyzing for dominant motion" reaches 100%
    Other clips (from the same main clip) work fine wThanksith stabilization.
    Any ideas? Is there a log I can check?
    Thanks, Peter

    Could be? However the shaking is very minute. So I shouldnt be an issues because of excessive shaking
    A workaround (I found) is to not create proxy media in the import process. At least for these clips it works (so far)
    /peter

  • Executing query analyzer command via batch ?

    Hello experts,
    it it possible to execute following query analyzer command
    with a batch-programm ?
    EXEC sp_dbcmptlevel ides, 80
    I just want to send this batch - programm to our mobile sales user
    so that they just have to execute this programm and not to
    open query analyzer etc. in order to do this.
    Some ideas ?
    Thanks
    Gerd

    Hello
    Please follow below the steps to do it in a very simple way.
    1. Create <<FIleName>>.sql file, write the sql query or stored procedure what ever you want to execute.
       Place the file Mobile\bin.Net folder.
    2. Open the Upgrade Console from Mobile\Bin.Net folder, Log on to ARS.
    3. Create a new unit, Go to Commands Tab page.
    4. Click on 'Add Sql Command', it will open a small dialog. You enter some name ,select the symbolic DB name as 'USER', click on the 'ADD' and 'select Mobile Application Root Folder' and Browse for <<FIleName>>.sql from Mobile\bin.Net folder. Now click on OK.
    5. IF your MDW is cofigured with CRM server and all mobile clients subscribed for MUP subscriptions, you can do 'send upgrade' from upgrade console. Then you need to run contrans in the mobile client machine to get MUP from CRM server.
    6. IF your MDW is not cofigured with CRM server, you can ' create pakcage' from upgrade console and deploy MUP file to mobile sales user.
    You can find mroe help in UpgradeConsole.chm file available at Mobile\bin.Net folder.
    Best Regards
    Shankar

  • Use Analyze command

    Wht is the purpose of ANALYZE command. if we ANALYZE the table/index wht happens to the object and how it improves the performance?

    If you are using the cost-based optiizer (CBO), you need to provide the optimizer with statistics about the objects in the database. The DBMS_STATS package (and the depricated ANALYZE statement) gather things like the number of rows in a table, the average row length, the distribution of data in columns, the number of leaf nodes in an index, etc. The CBO uses that information to determine how to execute a given query-- whether to use an index, which index or indexes to use, which join methods to use, what order to perform the different steps, etc.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Dbms_stat vs analyze command

    As per i know we use dbms_stats and analyze command to gather statistics.Oracle recommends to use dbms_stats for gathering statistics but analyze statement is use to collect statistics unrelated to the optimizer such as empty blocks, average space, chained rows.
    My question at what situation or real time requirement or condition we need to use analyze statement.

    Use analyze for the following :
        Collect or delete statistics about an index or index partition, table or table partition, index-organized table, cluster, or scalar object attribute.
        Validate the structure of an index or index partition, table or table partition, index-organized table, cluster, or object reference (REF).
        Identify migrated and chained rows of a table or cluster.I suggest you to read oracle documentation :
    http://docs.oracle.com/cd/B12037_01/server.101/b10759/statements_4005.htm

  • Auditing ANALYZE command

    Hi gems...good afternoon.
    Is there any way to audit when the statistics setting of a table was last changed.
    We have locked the stats of a table due to some operation. But someone has unlocked that.
    Now we need to find out when this was happenned.
    The following query didnt show the results for ANALYZE commands.
    select OS_USERNAME,USERNAME,OBJ_NAME,ACTION_NAME from dba_audit_trail where obj_name='TABLE_NAME';I searched google but didnt fine any suitable answer.
    Please help me or point me to some documentation regarding this.
    Thanks in advance.

    Thanks Hemant for your reply.
    I want to audit the operation means who did that or from which machine he/she did that.
    The LAST_ANALYZED column will give me the time when the table was last analyzed only.
    Sorry for not mentioning my Oracle version and OS.
    Its 11.2.0.3 and the OS is RHEL X86-64
    Regards,
    Gogol
    Edited by: 999975 on Jun 7, 2013 2:20 AM

  • Creation of new button on same page after insert command

    Hello All,
    I have an application running on apex.oracle.com where my workspace name is shruti_work,username is [email protected] and password is buwigi. The application name inside this is "app2"
    I am trying to achieve one functionality there but unable to get it so felt like seeking an help from experts here. I have two forms there one page1 form which is simplly made on an html region with go button which is navigating the page 1 items value to page 2 but simply passing their address witout updting the database table.
    In Page 2 i created page on a table or view, which made some extra buttons which i dont want like applychanges ,delete button, cancel button. I created a create button even which is updating my database with insert sql command. What i am seeing is after my create button is pressed i got navigated to same page 2 which i want to but the applychange button, cancel and delete button got appeared. I dont get the idea why it is so. i have checked the buttons even i didnt found anything there.
    All i want is when i press create button in page 2, my database get update and at the same page (2) a new button get appears which i have to use for other things. Approaching to this solution i created a button with giving databse action update and condition to this button "value of item in expression 1 is not null" and in expression 1 i passed p2_id...... but my new button is not getting created.
    Any help on this?

    Hi Jeff,
    I dont want applychanges button and delete button in my page 2. But when i created form on a table or view this but got created and i cannot delete it even. When i am navigating my page from page 1 to page 2 and filling the fields in page 2 and clicking create button, at that time i want after updating my table and running my plsql process which i have created which you can see in page processing, my button at same page get generate which i will use to navigate to other form. This button which i want to generate after clicking my create button will be meaningful only if my record get inserted in table. so that is why i want it at that time.
    I dont want any report so i am not creating form on a table or view

  • Data Committed instead of Rollback after Deadlock Error in SQL Server 2008 R2 (SP2)

    We're having a strange issue which is occurring only with one Customer having SQL Server 2008 R2 (SP2).
    Basically we have multiple threads uploading data and when an error occurs (like deadlock or any other error). The deadlock victim (process/transaction) is rolledback (from .NET). However the rollback command is not reaching SQL Server as it doesn't show
    in the trace (through SQL Profiler).
    To make things worse, not only the transaction is not being rolled back but the INSERTs executed before the error are being somehow committed, leaving the database in an inconsistent state.
    This is only produced in one environment.
    Any idea what the issue could be?

    All statements are executed with in a Transaction. Under the same scenario this code works perfectly fine for 1000s of customers. Only one customer has this issue.
    You need to capture profiler to check transaction scope.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

Maybe you are looking for

  • IPhone 3GS with OS4 upgrade - using Apple's Bluetooth Keyboard

    Help! I just upgraded my iPhone 3GS to OS 4. I also bought an Apple Bluetooth Keyboard. It's awesome except for one thing. After I type a text message and go to send it, I push the "Send/Enter" button and it just goes to the next line, it won't actua

  • IPhone Display turning itself on and off

    Hey Guys, I'm totally in love with my iPhone 3G but since I got it replaced by Apple (warranty), I discovered that in sleep mode the display randomly turns itself on and off again. "On" in this case does not mean displaying any content nor the locksc

  • Can we use Union in ABAP???

    Can we use Union in ABAP??? I have scenario like, in an internal table i have entrie like this, comp code     field1       field2       field3        field4       field5 0A1                   ABC        BCD          00             00              00

  • Does JDK 7 make code that works on JRE6

    In the FILE I/O documentation trail, it explains that the documentation has been updated to be consistent with the JDK 7 classes. It also has instructions on the quickest ways to update your legacy code to the new tool kit. And it even explains some

  • Web Browser will not launch when clicked.

    I installed Solaris 10 for x386 everything is up and running. Nic works but when I try to launch browser nothing happens hour glass starts then stops. I can download updates from SUN. but cannot figure out why the web browser won't launch. No firewal