Interrupted SQL statement and start several times with several SQL_EXEC_ID

Hi all

We meet a strange phenomenon, maybe someone can help.

We see that sometimes, when our client runs a single statement, implemented Oracle to process the statement with a special SQL_EXEC_ID, but after a while stops and starts processing the statement along with different SQL_EXEC_ID. Then, after a while, it happens again - stop Oracle processes the statement and start from the beginning with the new SQL_EXEC_ID. This happens again and again until we kill all of the other sessions on the database (then it ends).

What we see exactly: Client executes the statement (sql_id = "2tp7pz6yv87qp"). Monitor us v $ SQL_MONITOR and get this:

SELECT Sql_id, sql_exec_id, to_char (SQL_EXEC_START, "HH24:MI:SS MON-DD-YYYY) SQL_EXEC_START, status OF V$ SQL_MONITOR where sql_id = '2tp7pz6yv87qp' ORDER BY SQL_EXEC_START DESC;

2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 the EXECUTION

After a while check us again and see this:

2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 the EXECUTION

2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

After a while, we see this:

2tp7pz6yv87qp 16777219 28 may 2015 08:09:58 the EXECUTION

2tp7pz6yv87qp 16777218 28 may 2015 07:53:37 FACT

2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 FACT

2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

and so on — will happen again and again until we kill all of the other sessions in the database.

When comparing the follow-up of the different SQL_EXEC_IDs SQL reports, we see that each of them did exactly the same job: used the same execution plan, beginning treatment she even read/wrote the same amount of e/s and each of them stopped at the same point during execution. You can see that for each SQL_EXEC_ID execution 'stops' in the middle and never reach the end of the plan. She always stops in the JOIN by HASH and never continue to the next steps in the implementation plan.

When you look more deeply, we see in V$ ACTIVE_SESSION_HISTORY always last thing that happens for every SQL_EXEC_ID is HASH JOIN RIGHT OUTER (SQL_PLAN_OPERATION = HASH and SQL_PLAN_OPTIONS = RIGHT OUTER JOIN). Then comes the new SQL_EXEC_ID and it starts to do the same thing as the previous SQL_EXEC_ID did when it was launched.

Kill all other sessions, run finally ends. We see that the final (successful) SQL_EXEC_ID work and completes his plan to run to completion.

When executing the same single statement (when it comes to the single session in the database), it ends with a single SQL_EXEC_ID. Its SQL monitoring report looks like the final execution when the phenomenon occurs after killing all other sessions.

-We checked that the customer executing the query only once. AWR also only shows simple execution of the query.

-We have reproduced in many different clients (plus SQL, JDBC thin client OIC and DBMS_SCHEDULER job).

-It has no PARALLEL in the query or table.

-In this case for different statements (different INSERT-SELECT and MERGE instructions).

-Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

Does anyone have an idea?

Finally found the root cause of the problem.

This phenomenon occurs when the cursor of the active query being invalidated. This can occur in several scenarios, in our case, what happens when we work on a single partition (read or write) and perform DDL operations on different partitions of the same or the tables.

Steps to reproduce:

1 launch long command DML that affect the single partition

2. in the course of executing this SQL, do one of the following values in a session different all 1 minute:

2.1 do the indexes to a different partition unusable: ALTER TABLE X EDIT PARTITION Y UNUSABLE LOCAL INDEX

2.2 rebuild the unusable index of different partition: ALTER TABLE X EDIT PARTITION Y REBUILD UNUSABLE LOCAL INDEX

2.3 a partition different truncate

Support of Oracle we were told that this problem is known and there are several requests for bugs and improvements thereon, for example this one:

Bug 12905327 : TRUNCATE to an INVALID PARTITION TABLE UNNECESSARILY IMMEDIATELY all THE SLIDERS

In our case (ETL process), we used to perform all these operations DDL and DML operations long (we work on different partitions in parallel). In order to solve, we have separated these operations to the different phases in our process and don't be DDL and DML operations at the same time more. This solved the problem for us.

Tags: Database

Similar Questions

  • Sql statement variable gives several values

    Hello

    I have a variable that has sql statement and it gives several values and I want to use this variable in one of the filter of interface condition to filter the data in the source table (which has millions of records).

    some could let me know the best method to achieve this scenario.

    Appreciate your help.

    You are right. Yesterday, I don't think in this case where the data could be from a different server. But I completely forgot today.
    Ok. Here you can find how to use sys_connect_by_path

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:907278700346567560

    Be careful with the size because I think that there is a limit to what can contain the variable ODI.

    After you have assessed the variable is how it could be used in the filter

    ITEM_TYPE_ID IN (#var_csv_id_list)

  • I installed KB263380 KB2572073 and KB2518864 three times with success; However, I get the yellow shield saying that I need to update to Windows XP

    I installed KB263380 KB2572073 and KB2518864 three times with success; However, I get the yellow shield saying that I need to update to Windows XP

    I ran the Mr Fixit for this problem, and briefly, the yellow shield disappeared, I thought that it worked.  But as soon as I clicked the solution worked and Mr. Fixit was gone, the yellow shield came back and said that I have to update these once again.

    Thanks for the article.  The icon stopped appearing after the third time I've updated from Windows.  Someone must have solved the problem to Microsoft.  I did nothing except reboot several times.  Finally, the Update icon went in itself.

  • I've updated to 2015.2 in September and started having problems with freezing while working on the photos. I upgraded my memory from 4 GB to 8 GB and it has disappeared (in most cases); However, I always feel a lot of questions of export of JPEGs (gel) bu

    I've updated to 2015.2 in September and started having problems with freezing while working on the photos. I upgraded my memory from 4 GB to 8 GB and it has disappeared (in most cases); However, I always feel a lot of questions of export of JPEGs (gel) but not tif files? Very frustrating. Tried to install the new updates but my creative cloud is just a blank page?

    Hello

    I think you are referring to the white empty window of CC desktop application.

    Please refer to the threads below where this issue has been addressed:

    Creative cloud is empty window why?

    Cloud Desktop App is empty?

    New application Cloud Creative unusable: it is empty!

    Re: Empty opening creative cloud app

    Kind regards

    Sheena

  • Win unbootable after Kernel_Page_Data_Error and start on time chkdsk

    Hi gurus and thank you in advance for your help:

    ASUS laptop, 4 GB, 500 GB NTFS, run Win8.

    Last 2 weeks started crashing to BSOD with Kernel_Page_Data_Error - some predictable crashes for example when running chkdsk or auditor of malware or try an image backup system [!], others apparently at random, for example just web browsing. In general, it seems [with Task Manager] as the disk thrashes before crash.

    Start time memory diagnostics - no memory error.

    Several attempts of c: chkdsk/f - that is to say before the start - time has not made things better.

    Following a chkdsk/f at boot time, system is now UNBOOTALE - he travels his chkdsk, then 'preparation to automatically repair your system", which proves to be defective then, leaving me with options at each stop or try advanced - tools tries a safe or limited boot does not work, and I'm not yet ready to wipe the drive and start again.

    This sounds like a failing hard drive?

    What are your recommendations to diagnose and fix? BTW, I have a system image backup of about 6 to 12 months and a backup of the user files, which is fairly recent. The computer came with preloaded Win8 and I don't have installation media.

    Thank you!

    Kind regards

    Schmalzbach.

    Them

    Happy to help

    First thing you need to do is update to win 8.1.  In itself, that can solve the problem.

    There are 3 related causes but I suspect that they are all related to your McAfee.  To confirm, please run of driver verifier

    These accidents were related to the corruption of memory (probably caused by a driver).

    Please run these tests to check your memory and find which driver is causing the problem.


    If you're overclocking (pushing components beyond their design) return you to default at least until the crash is resolved. If you don't know what it is that you're probably not overclocking.

    Since then, it is more likely to be a pilot run everything first.
    1-Driver Verifier (for full instructions, see our wiki here)

    If the auditor does not have the issue we move to it.

    2-Memtest. (You can learn more about running memtest here)


    If you cannot start after you have enabled the auditor reboot in safe mode
    In Vista & win 7 (F8)

    Co-written by JMH3143

    .

  • Cut the film and start the time zero line

    Hello

    I cut a film in two parts, I need the second part.

    The timeline begins with the moment where the file was cut, for example: 00; 12; 01 and 04.

    I need to reset the time line of the second file to run from scratch.

    Is this possible with Media Encoder or After Effects?

    I tried several times with these programs but have not find the solution.

    Thank you.

    Composition--> Composition settings--> Composition start time

    Mylenium

  • How can I find an SQL executed and completed on time?

    Hello

    Could you please help me I want to learn started and finish time for SQLs?
    If it is possible?

    DB version: 9.2.0.8

    Thanks and greetings

    Published by: OracleADay on May 12, 2011 16:23

    What term you ask little more describe

    If in terms of query executed last time, this link will be helpful

    http://forums.Oracle.com/forums/thread.jspa?threadID=927452

  • SQL statement error INSERT The conflicted with the FOREIGN KEY constraint

    I recently installed a reporting for vmware vsphere software, but I get a SQL error. I opened a request for assistance with vmware, but so far they have not come up with a solution. The error is caused by: com.microsoft.sqlserver.jdbc.SQLServerException: instruction INSERT The conflicted with the FOREIGN KEY constraint 'FK_CB_VSM_NETWORK_VC_ID '. The conflict occurred in database 'VCChargebackVCC02', table "dbo." " CB_VSM_SERVER', column 'VC_ID '. I don't know a lot about SQL, so I'm lost in the extent of troubleshooting is concerned. If anyone has any ideas I'd love to hear them.

    SQL questions are better posed on Technet.  They are better equipped to manage the

    http://social.technet.Microsoft.com/forums/en-us/categories/

  • SQL statement on the point - problem with commas in the chain

    I have a simple report that all the titles of the work of the groups registered in our database.

    I pass the title to an element of the apex, then on a second list of page records that correspond to this title of work to help:

    and ed.ede_job_title =: P35_JOB_TITLE

    If there is that a comma in the title of the post report finds records that match the string until the comma does not appear the full string.

    Therefore 'Project Manager, Operations' match all records in 'Project Manager'.

    When there is a space left in the title of the post the report also displays the jobtitle without the space left.

    My apologies if this is answered elsewhere, I have a search.

    In the definition of report link, put the value of the column between backslashes.

    Scott

  • Several SQL statements with zero executions in the region of SQL

    Hello

    one of my databases has a large number of statements in the SQL box with zero executions. Some of them analyzed several times without a single run. Why the database stores these statements and how to avoid or reduce them?

    My problem is that the only time or zero time sql statements take the largest part of the area of sql:

    -sql statement and only once and without executing sql statements

    Select

    Count (1) num_sql_total,.

    sum (decode (executions, 1, 1, 0)) num_one_use_sql,.

    sum (decode (executions, 0, 1, 0)) num_no_use_sql,.

    Sum (RUNTIME_MEM) / 1024/1024 mb_used,.

    sum (decode (executions, sharable_mem, 1, 0)) / 1024/1024 mb_for_one_use_sql,.

    sum (decode (executions, 0, sharable_mem, 0)) / 1024/1024 mb_for_no_use_sql

    Of

    GV$ sqlarea

    where

    RUNTIME_MEM > 0;

    NUM_SQL_TOTAL NUM_ONE_USE_SQL NUM_NO_USE_SQL MB_USED MB_FOR_ONE_USE_SQL MB_FOR_NO_USE_SQL

    23318

    8739

    8027

    1420,95619106293

    381,41183757782

    530,999855041504

    Concerning

    Thomas

    This is not unusual. Another app could analyze for example hard the most often used SQLs in upstairs app - making benefit of further processing (in theory) of sweet analysis when you use these SQLs.

    In fact, I remember reading something to this effect as a performance for some factor or another Oracle document or note?

    So unless you have serious questions of shared pool, why bother with these sliders? What would be the problem?

  • copy and paste the sql statement into sql * more

    How do you paste the sql statement into sql * more... I tried the following options, get the windows interface for this sequel to the documentation below, but that did not work

    http://download.Oracle.com/docs/HTML/A88829_01/ch3.htm

    then I tried to create a simple .txt file with my sql statement and tried to run using @name (where name is the name of the file) and it gives me the following error SP2-0310: cannot open the file 'firstscriot.sql '.

    You name the file name.txt? Then you cannot start with @name, because SQL * PLUS will add the extension .sql

    Try instead the @name.txt or name the file name.sql

    And check if you have the correct path.

    Concerning
    Marcus

  • My toolbar disappeared completely. I still have the back arrows on the far left, but everything else is just... gone. I tried Firefox to stop and restart several times, but nothing does not change. All toolbars are checked in the view menu.

    July 13, 2010: My Firefox toolbar has suddenly disappeared, except for the back arrows on the left side. I tried Firefox stop and start several times, but nothing has changed. All toolbars are selected in the view menu... but nothing is visible!

    See the Navigation buttons such as back, home, bookmarks and recharge are missing

  • The problem starts just today when I opened my computer and started playing with the no sound

    So, basically, as the title says, my video games sounds is not recognized by my volume mixer. The problem started only today when I opened my computer and started to play with no sound. At first I thought that I had cut all the sounds but then I checked and nothing was cut and I also checked that my volume mixer didn't even have the game volume control bar to increase or decrease the sound of the video game. I also checked my device to update manager, but didn't so I get really worried about it, if you could help me that would be great.

    (PS: If you need information about my computer just ask in the comments and I'll tell you what you need to know.)

    Well, thanks for the time spent by only typing the answer, I really appreciate it, but I already solved... Just had to uninstall my audio driver from Device Manager and reinstall it. But now I have another problem, when I try to open any folder I gives me an error like this: "this file doesn't have any associated program that allows you to perform this action. "Install a program or if you have one, create an association in the-> default programs control panel. I also noticed that when I right click on it, it should say 'Open', but instead he said: "cmd" as the priority order.

    (PS: I know this issue is off-topic but see if you can help me with this one please.)

    PIC:

  • Help with a SQL statement...

    Hello...

    I have tried to find a way to write a SQL statement and may not seem to produce something that works. What I need is a set of results that returns each month that a given task is in an open State. The only columns that I have in my work table with are TASK_NM, OPEN_DT and CLOSED_DT.

    So if I have a line containing the following: TASK_NM = 'task one', OPEN_DT = April 18, 10 ' and CLOSED_DT = 14 October 10 '... I would like to see as a result set that looks like:

    TASK_NM YEAR JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC
    the task of a 2010 0 0 0 1 1 1 1 1 1 1 0 0

    Is it still possible?

    Thanks in advance,
    David.

    Published by: user13027968 on March 10, 2011 14:19

    Published by: user13027968 on March 10, 2011 15:13

    Hello

    Welcome to the Forum!

    Whenever you have a question. Please post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.
    For example, the sample data may be:

    CREATE TABLE     table_x
    (       task_nm          VARCHAR2 (10)
    ,     open_dt          DATE
    ,     closed_dt     DATE
    );
    
    INSERT INTO table_x (task_nm, open_dt, closed_dt) VALUES ('task a', DATE '2010-04-18', DATE '2010-10-14');
    INSERT INTO table_x (task_nm, open_dt, closed_dt) VALUES ('foo',    DATE '2010-10-31', DATE '2011-01-01');
    INSERT INTO table_x (task_nm, open_dt, closed_dt) VALUES ('foo',    DATE '2010-12-01', DATE '2011-02-21');
    INSERT INTO table_x (task_nm, open_dt, closed_dt) VALUES ('foo',    DATE '2011-04-01', DATE '2011-04-30');
    INSERT INTO table_x (task_nm, open_dt, closed_dt) VALUES ('bar',    DATE '2010-01-01', DATE '2010-01-01');
    

    From this data, you may want these results:

    TASK_NM     YEAR JAN FEB MAR APR MAY JUN JUL AUG SEP OVT NOV DEC
    ---------- ----- --- --- --- --- --- --- --- --- --- --- --- ---
    bar         2010   1   0   0   0   0   0   0   0   0   0   0   0
    foo         2010   0   0   0   0   0   0   0   0   0   1   1   1
    foo         2011   1   1   0   1   0   0   0   0   0   0   0   0
    task a      2010   0   0   0   1   1   1   1   1   1   1   0   0
    

    I'm not sure eactly how you plan to use it. Are there lines that overlap for the name of the task? You always want the same number of columns? What version of Oracle are you using?
    I think you want something like this:

    WITH     got_month_cnt          AS
    (
         SELECT  task_nm
         ,     TRUNC (open_dt, 'MONTH')     AS first_month
         ,     1 + MONTHS_BETWEEN ( TRUNC (closed_dt, 'MONTH')
                             , TRUNC (open_dt,   'MONTH')
                           )          AS month_cnt
         FROM    table_x
    --     WHERE     ...     -- If you want any filtering, put it here
    )
    ,     cntr     AS
    (
         SELECT     LEVEL     AS n
         FROM     (
                   SELECT  MAX (month_cnt)     AS max_month_cnt
                   FROM     got_month_cnt
              )
         CONNECT BY     LEVEL     <= max_month_cnt
    )
    ,     all_months     AS
    (
         SELECT     m.task_nm
         ,     ADD_MONTHS ( m.first_month
                      , c.n - 1
                      )          AS open_month
         FROM     got_month_cnt     m
         JOIN     cntr          c  ON     c.n     <= m.month_cnt
    )
    SELECT       task_nm
    ,       EXTRACT (YEAR FROM open_month)                         AS year
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Jan' THEN 1 ELSE 0 END)     AS jan
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Feb' THEN 1 ELSE 0 END)     AS feb
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Mar' THEN 1 ELSE 0 END)     AS mar
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Apr' THEN 1 ELSE 0 END)     AS apr
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'May' THEN 1 ELSE 0 END)     AS may
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Jun' THEN 1 ELSE 0 END)     AS jun
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Jul' THEN 1 ELSE 0 END)     AS jul
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Aug' THEN 1 ELSE 0 END)     AS aug
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Sep' THEN 1 ELSE 0 END)     AS sep
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Oct' THEN 1 ELSE 0 END)     AS ovt
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Nov' THEN 1 ELSE 0 END)     AS nov
    ,       MAX (CASE WHEN TO_CHAR (open_month, 'Mon') = 'Dec' THEN 1 ELSE 0 END)     AS dec
    FROM       all_months
    GROUP BY  task_nm
    ,       EXTRACT (YEAR FROM open_month)
    ORDER BY  task_nm
    ,            year
    ;
    

    This will work in Orfacle 9 (and), but from Oracle 11, you could simplify it a little bit by using SELECT... Function PIVOT.

    Published by: Frank Kulash, March 10, 2011 16:51

  • With the help of a number variable in a SQL statement

    Hello

    I am trying to use a variable in a sql statement, and I ran into problems when the variable is a number. The following line of code works if the variable is a string, but not if it is a number.

    "SELECT PAGE 1 UUT_STATUS OF UNIT_UUT_RESULT WHERE UnitID = '" + Locals.LocalUnitID + "' ORDER BY DESC START_DATE_TIME.

    Is there a difference in the use of single and double quotes and the sign for numbers variables +?

    Thank you

    Stuart

    Jervin is almost correct in the post above.

    While it is correct that numbers in SQL are not enclosed in single quotes ('), we still need the entire expression to a string.  If Locals.LocalUnitID is stored as a number to TestStand, you will need to cast to a string so that the string concatination works properly.

    I believe that the correct form is as follows:

    "SELECT PAGE 1 UUT_STATUS OF UNIT_UUT_RESULT WHERE UnitID ="+ Str (Locals.LocalUnitID) + 'ORDER BY DESC START_DATE_TIME'

Maybe you are looking for

  • BOOTMGR not found - cannot start Windows

    I have a similar problem... Start the computer and I get:-BOOTMGR not found... Press Ctrl + Alt + Del I put the Toshiba recovery disc in and it registered no operating system... I finally gave up and removed the completely hardrive and tried to insta

  • C50-A283 satellite keyboard problem

    I have a keyboard problem. [Sorry for my bad English.My C50-A283 satellite keyboard does not work properly. It will automatically start and back. Some keys don't work not that is 'L', 'I' button does not work. Even using "on the keyboard of the scree

  • Satellite Pro A100 model PSAA3E wireless card driver

    Hello Hope someone can help, I can't get a driver to work for the card wireless in this laptop, I tried some different drivers now and none doesn't seem to work, I always left with a yellow question mark in device for Ethernet Manager comtroller (and

  • 15 - ac197nr: DVD specifications

    Hello, I can't find information about this type of DVD is on this computer. I played a standard DVD, but then I went to play a BlueRay disc and the system told me that he doesn't have a disc inserted. I thought I read somewhere that had a record of r

  • Sequence structure flat inside the timed loop and execution order

    I have some problems trying to implement a flat sequence structure when you use a loop timed on a target of cRio VI I tried with or without the while loop around the structure of sequence flat, and I also tried to replace the 'Non-deterministic loop'