blocking session

I'm working on Oracle 10 g on Linux enviornment

V $ second how to find the course of which two caused the deadlock? Or Simple Q. I want to know session what blocking causing?
Thank you

Published by: susdba on January 10, 2011 11:52

The error in the alert.log file contains a reference to a trace file that contains detailed information about the impasse.

Thank you.

Tags: Database

Similar Questions

  • Why do I own this blocking session / blocked

    Oracle 11.2.0.4 SE a 64-bit

    Oracle Linux 5

    We have a task that runs every 5 minutes to detect blocking sessions / blocked.  When it detects an email with the details is sent.  Conduct of query is the following:

    select NVL(s1.username,''null'') username1,
                    s1.machine machine1,
                    s1.sid sid1,
                    s1.osuser osuser1,
                    s1.program program1,
                    lo.object_id locked_object,
                    NVL(s2.username,''null'') username2,
                    s2.machine machine2,
                    s2.sid sid2,
                    s2.osuser osuser2,
                    s2.program program2,
                    sqlt.sql_text sql_text2
             from   v$lock l1,
                    v$session s1,
                    v$lock l2,
                    v$session s2,
                    v$locked_object lo,
                    v$sqltext sqlt
             where s1.sid=l1.sid
               and s2.sid=l2.sid
               and l1.BLOCK=1 and l2.request > 0
               and l1.id1 = l2.id1
               and l2.id2 = l2.id2
               and s1.sid = lo.session_id
               and s2.sql_address = sqlt.address
               and s2.sql_hash_value = sqlt.hash_value
               and sqlt.piece = 0
    

    Normally things are fairly quiet except on the occasion one of my power forgot to engage users.  But last week I started to have notification that a session belonging to me (ESTEVENS) was blocking one or more sessions held by me.  Still, he arrives at 21:00 and fades within 5 minutes before the next review.  The sql code associated with the blocked session is always the same.  Here is a representative sample, with company data obscured.

    Block user - ESTEVENS

    Machine - myserver.mycompany.org

    SID - 433

    OSUSER - oracle

    -PROGRAM [email protected] (J001)

    OBJID - 12451

    Blocked user - ESTEVENS

    Machine - myserver.mycompany.org

    SID - 200

    OSUSER - oracle

    -Program [email protected] (J002)

    SQL: UPDATE HS_FDS_CLASS_DATE SET FDS_CLASS_DATE = SYSDATE WHERE FDS_

    By comparing the time of the block and SIDS reported with DBA_SCHEDULER_JOB_RUN_DETAILS content, I was able to follow some scheduled tasks 'load '.  These jobs do a SELECT... IN... OF < db_link >.  Because the table is locked is HS_FDS_CLASS_DATE, I found notes 1536085.1 describing a bug with the use frequent or simultaneous to a db_link, supposed to be fixed in 11.2.0.4 but my experience says otherwise.  However, I can deal with all that.

    But my real question is how to get my username attached to these sessions?

    Understand your question, I hope...

    It happened to me, that if I use my "DBA1' to create one job to another user"USER1", my user name is indicated as the USER name in the session, but 'The ANALYSIS of the USER' are the owner of the task.

    I think it's normal, but I still don't know why.

    Edit: Duh! It seems that it is documented Overview of job creation

    Because no destination_name attribute is specified, the task runs on the (local) database of origin. The job runs as the user who created the work.

    Kind regards

    Juan M

  • contracting of Oracle tm + idenitifying blocking sessions/proceseses + sql

    Hello

    Using oracle 11.2.0.3 and sometimes our etl load lock because of the argument - while having a gui tool which can identify sessions blocking, would be a good thing to have a script that allows to identify these blocking sessions, user of the os and pc who initiated the session blocking and sql blocking.

    For example, the summary tables sometimes have patches ran against them and we are not aware of this so happens when not around.

    Is this possible?

    It is also possible to identify any tabels who the fk constraints, but Marvin Dollin have associated indexes?

    Thank you

    Blocking find sessions:

    SELECT

    blocking_session,

    SID,

    Serial No.,

    wait_class,

    seconds_in_wait

    Of

    session v$

    WHERE

    blocking_session IS NOT NULL

    ORDER BY

    blocking_session;


    Find the query to execute blocking the session

    SELECT q.sql_fulltext

    V $ session s, v$ sql q

    WHERE SID = 'blocking_session_id' AND s.sql_id = q.sql_id

  • How to find block sessions on a 2 DB of RAC node?

    Hi DBAs,

    I know that the query that will give me the session that is blocking on a standalone DB as below:

    Select l1.sid, 'BLOCKS', l2.sid from v$ lock l1, l2 of v$ lock

    where l1.block = 1 and l2.request > 0 and l1.id1 = l2.id1 and l1.id2 = l2.id2;

    But now I have a small question that my other DB is a node 2 CARS DB (2 instances that are on 2 different location breaks). And there seems to be some memory problems and I need to find sessions that are open for a long time and I need to kill them. Can anyone help me find the blocking in RAC environment session and also how to kill in RAC environment.

    DB environment:

    version: Oracle 10.2.0.5

    Production

    2 node RAC

    Regads,

    Ritu

    SELECT DECODE (ask, 0,' owner: ',' server: '). ID1, id2, lmode, ask, sid sess, type OF gv$ LOCK (id1, id2, type) WHERE IN(SELECT id1,id2, type FROM gv$LOCK WHERE request>0) ORDER BY id1, ask;

  • Blocking session problem

    Hi all

    I have a stored procedure that is called in specific reports and this report running much different to the user in the application. When this report is by many users running it start blocking the session. Instant Oracle showing locked held by another session and all the beginning of session resource pending, but never published by session, what is the error in this stored procedure

    For the analysis of the functioning and to block queries run the suite of scripts

    1.       Query about sessions that are either blocked or blocking other sessions.

    Select s1.username. '@' || S1.machine | ' (SID =' | s1.sid |) blocking ') ' | S2. UserName | '@' || S2.machine | ' (SID =' | s2.sid |) ') ' AS blocking_status

    v $ lock l1, v$ lock l2, v$ session s1 and s2 from v$ session where s1.sid = l1.sid and s2.sid = l2.sid and l1. BLOCK = 1 and l2.request > 0

    and l1.id1 = l2.id1 and l2.id2 = l2.id2;

    BLOCKING_STATUS

    [email protected] (SID = 158) blocks [email protected] (SID = 375)

    [email protected] (SID = 416) blocks [email protected] (SID = 329)

    [email protected] (SID = 416) blocks [email protected] (SID = 369)

    [email protected] (SID = 416) blocks [email protected] (SID = 385)

    [email protected] (SID = 416) blocks [email protected] (SID = 429)

    [email protected] (SID = 416) blocks [email protected] (SID = 443)

    [email protected] (SID = 416) blocks [email protected] (SID = 451)

    2.       Can be found objects that are blocked by above sessions by running the following issue:

    Select do.object_name, row_wait_obj #, row_wait_file #, row_wait_block #, row_wait_row #, dbms_rowid.rowid_create (1, ROW_WAIT_OBJ #, ROW_WAIT_FILE #, ROW_WAIT_BLOCK #, ROW_WAIT_ROW #)

    v $ session s, dba_objects do where sid =: sid and s.ROW_WAIT_OBJ # = do. OBJECT_ID;

    3.       The request for running SQL against SID

    Select sql_text

    de v$ sqlarea

      (address, hash_value) in

    (select sql_address sql_hash_value )

    de session $ v

            where sid like '&sid');

    4.       Next statement is blocking other sessions:

    UPDATE gl_je_lines l

       SET CONTEXT = NULL,

    attribute1 = NULL,

    attribut2 = NULL,

    attribut3 = NULL,

    attribute4 = NULL,

    attribute5 = NULL,

    Description = NULL

    WHERE l. je_header_id = :b2 AND l. je_line_num = :b1


    Here's the code for SPplz help me

    CREATE OR REPLACE PROCEDURE APPS. () LESCO_IOTSSCHQ_UPDATE_DFF

    P_AS_ON VARCHAR2)

    IS

    -TO UDPATE CHECK NUMBER OF DISTRIBUTIONS

    CURSOR CUR_SSCHQ

    IS

    SELECT HELPED SEPARATE. INVOICE_DISTRIBUTION_ID DISTRIBUTION_ID,

    AIDA. INVOICE_ID

    OF AIDA AP_INVOICE_DISTRIBUTIONS_ALL,.

    GL_CODE_COMBINATIONS_V CC

    WHERE CC. CODE_COMBINATION_ID = AIDA. DIST_CODE_COMBINATION_ID

    AND CC. SEGMENT4 = '530103'

    AND AIDA. ACCOUNTING_DATE < = FND_DATE. CANONICAL_TO_DATE (P_AS_ON)

    AND AIDA. ATTRIBUTE_CATEGORY = "Debitable.

    AND AIDA. ATTRIBUT3 IS NULL.

    -ITO FOR CASH

    CURSOR CUR_IOTCASH

    IS

    SELECT HELPED SEPARATE. INVOICE_DISTRIBUTION_ID DISTRIBUTION_ID,

    AIDA. INVOICE_ID

    OF AIDA AP_INVOICE_DISTRIBUTIONS_ALL,.

    GL_CODE_COMBINATIONS_V CC

    WHERE CC. CODE_COMBINATION_ID = AIDA. DIST_CODE_COMBINATION_ID

    AND CC. SEGMENT4 = '530102'

    AND AIDA. ACCOUNTING_DATE < = FND_DATE. CANONICAL_TO_DATE (P_AS_ON)

    AND AIDA. ATTRIBUTE_CATEGORY = 'transfer of the letter references '.

    AND AIDA. ATTRIBUTE8 IS NULL.

    CURSOR CUR_INV_DISTD

    IS

    SELECT THE RIF. JE_HEADER_ID,

    GIR. JE_LINE_NUM,

    AIDA. INVOICE_DISTRIBUTION_ID DISTRIBUTION_ID

    OF GL_JE_HEADERS H,

    GL_IMPORT_REFERENCES RIF,

    AP_AE_LINES_ALL AAELA,

    AIDA AP_INVOICE_DISTRIBUTIONS_ALL,.

    GL_CODE_COMBINATIONS_V CC

    GL_JE_LINES L

    WHERE H.JE_HEADER_ID = RIF. JE_HEADER_ID

    AND GIR.GL_SL_LINK_ID = AAELA.GL_SL_LINK_ID

    AND AAELA. SOURCE_TABLE = "AP_INVOICE_DISTRIBUTIONS."

    AND AAELA. SOURCE_ID = AIDA. INVOICE_DISTRIBUTION_ID

    AND CC. CODE_COMBINATION_ID = AIDA. DIST_CODE_COMBINATION_ID

    AND CC. CHART_OF_ACCOUNTS_ID = 50268

    AND GIR. JE_HEADER_ID = L.JE_HEADER_ID

    AND GIR. JE_LINE_NUM = L.JE_LINE_NUM

    AND NVL(L.DESCRIPTION,'N/A') <>NVL (AIDA. ATTRIBUT3, "N/A")

    AND (CC.) SEGMENT4 IN ('530101', '530102','530103 ','530104 ')

    OR CC. SEGMENT4 IN

    (SELECT A.SEGMENT4 FROM XX_GL_APAR_COMP_REC_CC_V HAS)

    UNION ALL

    SELECT A.SEGMENT4 FROM XX_GL_APAR_COMP_PAY_CC_V HAS

    ))

    AND GIR.GL_SL_LINK_TABLE = 'APECL. '

    AND H.DEFAULT_EFFECTIVE_DATE < = FND_DATE. CANONICAL_TO_DATE (P_AS_ON)

    AND AIDA. ATTRIBUTE_CATEGORY = "Debitable.

    AND AIDA. ATTRIBUT2 IS NOT NULL;

    CURSOR CUR_INV_DISTT

    IS

    SELECT THE RIF. JE_HEADER_ID,

    GIR. JE_LINE_NUM,

    AIDA. INVOICE_DISTRIBUTION_ID DISTRIBUTION_ID

    OF GL_JE_HEADERS H,

    GL_IMPORT_REFERENCES RIF,

    AP_AE_LINES_ALL AAELA,

    AIDA AP_INVOICE_DISTRIBUTIONS_ALL,.

    GL_CODE_COMBINATIONS_V CC

    GL_JE_LINES L

    WHERE H.JE_HEADER_ID = RIF. JE_HEADER_ID

    AND GIR.GL_SL_LINK_ID = AAELA.GL_SL_LINK_ID

    AND AAELA. SOURCE_TABLE = "AP_INVOICE_DISTRIBUTIONS."

    AND AAELA. SOURCE_ID = AIDA. INVOICE_DISTRIBUTION_ID

    AND CC. CODE_COMBINATION_ID = AIDA. DIST_CODE_COMBINATION_ID

    AND CC. SEGMENT4 IN ('530101', '530102','530103 ','530104 ')

    AND GIR.GL_SL_LINK_TABLE = 'APECL. '

    AND CC. CHART_OF_ACCOUNTS_ID = 50268

    AND GIR. JE_HEADER_ID = L.JE_HEADER_ID

    AND GIR. JE_LINE_NUM = L.JE_LINE_NUM

    AND ((L.DESCRIPTION, 'N/a') <>NVL NVL (AIDA. ATTRIBUTE9, "N/A")

    (OR)

    CASE

    WHEN CC. SEGMENT4 = '530102'

    THEN NVL(L.ATTRIBUTE1,'N/A')

    END) <>NVL (AIDA. ATTRIBUTE7, N / 'A'))

    AND H.DEFAULT_EFFECTIVE_DATE < = FND_DATE. CANONICAL_TO_DATE (P_AS_ON)

    AND AIDA. ATTRIBUTE_CATEGORY = 'transfer of the letter references '.

    AND AIDA. ATTRIBUTE8 IS NOT NULL;

    CURSOR CUR_TRX_DIST

    IS

    SELECT THE RIF. JE_HEADER_ID,

    GIR. JE_LINE_NUM,

    D.CUST_TRX_LINE_GL_DIST_ID DISTRIBUTION_ID

    OF GL_JE_HEADERS H,

    GL_IMPORT_REFERENCES RIF,

    AR_AEL_GL_INV_V T,.

    RA_CUST_TRX_LINE_GL_DIST_ALL D,.

    GL_CODE_COMBINATIONS_V CC

    GL_JE_LINES L

    WHERE H.JE_HEADER_ID = RIF. JE_HEADER_ID

    AND GIR. JE_HEADER_ID = T.JE_HEADER_ID

    AND GIR. JE_LINE_NUM = T.JE_LINE_NUM

    AND CC. CHART_OF_ACCOUNTS_ID = 50268

    AND D.CUST_TRX_LINE_GL_DIST_ID = T.SOURCE_ID

    AND T.SOURCE_TABLE = 'CTLGD. '

    AND CC. CODE_COMBINATION_ID = D.CODE_COMBINATION_ID

    AND (CC.) SEGMENT4 IN ('530101', '530102','530103 ','530104 ')

    OR CC. SEGMENT4 IN

    (SELECT A.SEGMENT4 FROM XX_GL_APAR_COMP_REC_CC_V HAS)

    UNION ALL

    SELECT A.SEGMENT4 FROM XX_GL_APAR_COMP_PAY_CC_V HAS

    ))

    AND GIR. JE_HEADER_ID = L.JE_HEADER_ID

    AND GIR. JE_LINE_NUM = L.JE_LINE_NUM

    AND NVL(L.DESCRIPTION,'N/A') <>NVL(D.ATTRIBUTE3,'N/A')

    AND H.DEFAULT_EFFECTIVE_DATE < = FND_DATE. CANONICAL_TO_DATE (P_AS_ON)

    AND D.ATTRIBUTE_CATEGORY = 'Debitable.

    AND D.ATTRIBUTE2 IS NOT NULL;

    CURSOR CUR_MISC_DIST

    IS

    SELECT THE RIF. JE_HEADER_ID,

    GIR. JE_LINE_NUM,

    AMCDA. MISC_CASH_DISTRIBUTION_ID DISTRIBUTION_ID

    OF GL_JE_HEADERS H,

    AR_DISTRIBUTIONS_ALL ADA,

    AR_MISC_CASH_DISTRIBUTIONS_ALL AMCDA,

    GL_IMPORT_REFERENCES RIF,

    GL_CODE_COMBINATIONS_V CC

    WHERE H.JE_HEADER_ID = RIF. JE_HEADER_ID

    AND TO_CHAR (AMCDA. POSTING_CONTROL_ID) = (RIF. REFERENCE_1)

    AND GIR. REFERENCE_10 = "AR_MISC_CASH_DISTRIBUTIONS".

    AND ADA. SOURCE_TABLE = "MCD".

    AND ADA. SOURCE_ID = AMCDA. MISC_CASH_DISTRIBUTION_ID

    AND AMCDA. CODE_COMBINATION_ID = CC. CODE_COMBINATION_ID

    AND TO_CHAR (ADA. LINE_ID) = (RIF. REFERENCE_3)

    AND (CC.) SEGMENT4 IN ('530101', '530102','530103 ','530104 ')

    OR CC. SEGMENT4 IN

    (SELECT A.SEGMENT4 FROM XX_GL_APAR_COMP_REC_CC_V HAS)

    UNION ALL

    SELECT A.SEGMENT4 FROM XX_GL_APAR_COMP_PAY_CC_V HAS

    ))

    AND H.DEFAULT_EFFECTIVE_DATE < = FND_DATE. CANONICAL_TO_DATE (P_AS_ON)

    AND AMCDA. ATTRIBUTE_CATEGORY = "Debitable.

    AND AMCDA. ATTRIBUT2 IS NOT NULL;

    -PROJECTS

    CURSOR CUR_PROJ

    IS

    SELECT L.JE_HEADER_ID,

    L.JE_LINE_NUM,

    H.PERIOD_NAME,

    L.ENTERED_DR,

    L.ENTERED_CR,

    SUM (PCDLA. DIST_AMNT AMOUNT).

    PCDLA.PA_DATE

    OF GL_JE_HEADERS H,

    GL_JE_LINES L,.

    GL_CODE_COMBINATIONS_V CC

    PA_COST_DISTRIBUTION_LINES_ALL PCDLA

    WHERE H.JE_HEADER_ID = L.JE_HEADER_ID

    AND PCDLA. BATCH_NAME = L.REFERENCE_1

    AND L.CODE_COMBINATION_ID = CC. CODE_COMBINATION_ID

    AND L.REFERENCE_3 ('COST', 'Responsibility')

    AND H.PERIOD_NAME = PCDLA.GL_PERIOD_NAME

    AND H.DEFAULT_EFFECTIVE_DATE < = FND_DATE. CANONICAL_TO_DATE (P_AS_ON)

    AND CC. SEGMENT4 IN ('530103')

    AND L.DESCRIPTION = "created log import'

    L.JE_HEADER_ID GROUP,

    L.JE_LINE_NUM,

    H.PERIOD_NAME,

    L.ENTERED_DR,

    L.ENTERED_CR,

    PCDLA.PA_DATE

    SAW (NVL(L.ENTERED_CR,0) = SUM (PCDLA. AMOUNT)

    OR NVL(L.ENTERED_CR,0) = SUM (PCDLA. AMOUNT));

    NUMBER OF CHECK_NUM;

    BEGIN

    C IN CUR_SSCHQ

    LOOP

    BEGIN

    SELECT ACA. CHECK_NUMBER

    IN CHECK_NUM

    OF ACA AP_CHECKS_ALL,.

    AP_INVOICE_PAYMENTS_ALL LAIP

    WHERE ACA. CHECK_ID = AIPA. CHECK_ID

    AND ACA. STATUS_LOOKUP_CODE <>"CANCELLED."

    AND AIPA. INVOICE_ID = C.INVOICE_ID;

    UPDATE AP_INVOICE_DISTRIBUTIONS_ALL AIDA

    SET ATTRIBUT2 =

    CASE

    WHAT AMOUNT > 0

    THEN "SS received cheque".

    ELSE "SS cheque".

    END,

    ATTRIBUT3 = CHECK_NUM

    WHERE AIDA. INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID;

    EXCEPTION

    WHILE OTHERS THEN

    NULL;

    END;

    END LOOP;

    C IN CUR_IOTCASH

    LOOP

    -FOR THE DELIVERY OF INVOICES THAT ARE NOT CANCELED LINES

    UPDATE AP_INVOICE_DISTRIBUTIONS_ALL AIDA

    SET ATTRIBUTE9 =

    (SELECT THE AIA. INVOICE_NUM

    OF AP_INVOICES_ALL AIA

    WHERE AIA. INVOICE_ID = AIDA. INVOICE_ID

    ),

    attribute8 =

    CASE

    WHAT AMOUNT > 0

    THEN "ITO issued cash."

    ELSE "IOT receipts."

    END

    WHERE AIDA. INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID;

    -FOR THE DELIVERY OF INVOICES THAT ARE CANCELLED LINES

    UPDATE AP_INVOICE_DISTRIBUTIONS_ALL AIDA

    SET ATTRIBUTE9 =

    (SELECT THE AIA. INVOICE_NUM

    OF AP_INVOICES_ALL AIA

    WHERE AIA. INVOICE_ID = AIDA. INVOICE_ID

    ),

    attribute8 =

    CASE

    WHEN AMOUNT < 0

    THEN "ITO issued cash."

    ELSE "IOT receipts."

    END

    WHERE AIDA. INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID

    AND AIDA. CANCELLATION_FLAG = 'Y ';

    END LOOP;

    C IN CUR_INV_DISTD

    LOOP

    -The Sub statement is commented because of server performance low as indicated by the DBA as dated: 06-MAY-2014

    / * UPDATE GL_JE_LINES L

    SET CONTEXT = NULL,

    ATTRIBUT1 = NULL,

    ATTRIBUT2 = NULL,

    ATTRIBUT3 = NULL,

    ATTRIBUTE4 = NULL,

    ATTRIBUTE5 = NULL,

    DESCRIPTION = NULL

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    UPDATE GL_JE_LINES L

    GAME CONTEXT = "Debitable."

    ATTRIBUT1 = (SELECT D.ATTRIBUTE1 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUT2 = (SELECT D.ATTRIBUTE2 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUT3 = (SELECT D.ATTRIBUTE3 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    DESCRIPTION = (SELECT D.ATTRIBUTE3 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUTE4 = "pay."

    ATTRIBUTE5 = (SELECT I.INVOICE_NUM AP_INVOICE_DISTRIBUTIONS_ALL D, AP_INVOICES_ALL I WHERE I.INVOICE_ID = D.INVOICE_ID AND D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID)

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM; * /.

    UPDATE GL_JE_LINES L

    SET

    (

    CONTEXT,

    ATTRIBUTE1,

    ATTRIBUT2,

    ATTRIBUT3,

    DESCRIPTION,

    ATTRIBUTE4,

    ATTRIBUTE5

    )

    =

    (SELECT 'Debitable',

    D.ATTRIBUTE1,

    D.ATTRIBUTE2,

    D.ATTRIBUTE3,

    D.ATTRIBUTE3,

    "Payable",.

    I.INVOICE_NUM

    AP_INVOICE_DISTRIBUTIONS_ALL D,.

    AP_INVOICES_ALL I

    WHERE I.INVOICE_ID = D.INVOICE_ID

    AND D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID

    )

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID

    AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    END LOOP;

    C IN CUR_INV_DISTT

    LOOP

    -The Sub statement is commented because of server performance low as indicated by the DBA as dated: 06-MAY-2014

    / * UPDATE GL_JE_LINES L

    SET CONTEXT = NULL,

    ATTRIBUT1 = NULL,

    ATTRIBUT2 = NULL,

    ATTRIBUT3 = NULL,

    ATTRIBUTE4 = NULL,

    ATTRIBUTE5 = NULL,

    DESCRIPTION = NULL

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    UPDATE GL_JE_LINES L

    GAME CONTEXT = "Debitable."

    ATTRIBUT1 = (SELECT D.ATTRIBUTE7 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUT2 = (SELECT D.ATTRIBUTE8 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUT3 = (SELECT D.ATTRIBUTE9 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    DESCRIPTION = (SELECT D.ATTRIBUTE9 FROM AP_INVOICE_DISTRIBUTIONS_ALL D WHERE D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUTE4 = "pay."

    ATTRIBUTE5 = (SELECT I.INVOICE_NUM AP_INVOICE_DISTRIBUTIONS_ALL D, AP_INVOICES_ALL I WHERE I.INVOICE_ID = D.INVOICE_ID AND D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID)

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM; * /.

    UPDATE GL_JE_LINES L

    SET

    (

    CONTEXT,

    ATTRIBUTE1,

    ATTRIBUT2,

    ATTRIBUT3,

    DESCRIPTION,

    ATTRIBUTE4,

    ATTRIBUTE5

    )

    =

    (SELECT 'Debitable',

    D.ATTRIBUTE7,

    D.ATTRIBUTE8,

    D.ATTRIBUTE9,

    D.ATTRIBUTE9,

    "Payable",.

    I.INVOICE_NUM

    AP_INVOICE_DISTRIBUTIONS_ALL D,.

    AP_INVOICES_ALL I

    WHERE I.INVOICE_ID = D.INVOICE_ID

    AND D.INVOICE_DISTRIBUTION_ID = C.DISTRIBUTION_ID

    )

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID

    AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    END LOOP;

    C IN CUR_TRX_DIST

    LOOP

    -The Sub statement is commented because of server performance low as indicated by the DBA as dated: 06-MAY-2014

    / * UPDATE GL_JE_LINES L

    SET CONTEXT = NULL,

    ATTRIBUT1 = NULL,

    ATTRIBUT2 = NULL,

    ATTRIBUT3 = NULL,

    ATTRIBUTE4 = NULL,

    ATTRIBUTE5 = NULL,

    DESCRIPTION = NULL

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    UPDATE GL_JE_LINES L

    GAME CONTEXT = "Debitable."

    ATTRIBUT1 = (SELECT D.ATTRIBUTE1 FROM RA_CUST_TRX_LINE_GL_DIST_ALL D WHERE D.CUST_TRX_LINE_GL_DIST_ID = C.DISTRIBUTION_ID).

    ATTRIBUT2 = (SELECT D.ATTRIBUTE2 FROM RA_CUST_TRX_LINE_GL_DIST_ALL D WHERE D.CUST_TRX_LINE_GL_DIST_ID = C.DISTRIBUTION_ID).

    ATTRIBUT3 = (SELECT D.ATTRIBUTE3 FROM RA_CUST_TRX_LINE_GL_DIST_ALL D WHERE D.CUST_TRX_LINE_GL_DIST_ID = C.DISTRIBUTION_ID).

    DESCRIPTION = (SELECT D.ATTRIBUTE3 FROM RA_CUST_TRX_LINE_GL_DIST_ALL D WHERE D.CUST_TRX_LINE_GL_DIST_ID = C.DISTRIBUTION_ID).

    ATTRIBUTE4 = "receive."

    ATTRIBUTE5 = (SELECT I.TRX_NUMBER RA_CUST_TRX_LINE_GL_DIST_ALL D, RA_CUSTOMER_TRX_ALL I WHERE I.CUSTOMER_TRX_ID = D.CUSTOMER_TRX_ID AND D.CUST_TRX_LINE_GL_DIST_ID = C.DISTRIBUTION_ID)

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM; * /.

    UPDATE GL_JE_LINES L

    SET

    (

    CONTEXT,

    ATTRIBUTE1,

    ATTRIBUT2,

    ATTRIBUT3,

    DESCRIPTION,

    ATTRIBUTE4,

    ATTRIBUTE5

    )

    =

    (SELECT 'Debitable',

    D.ATTRIBUTE1,

    D.ATTRIBUTE2,

    D.ATTRIBUTE3,

    D.ATTRIBUTE3,

    "Receive."

    I.TRX_NUMBER

    RA_CUST_TRX_LINE_GL_DIST_ALL D,.

    RA_CUSTOMER_TRX_ALL I

    WHERE I.CUSTOMER_TRX_ID = D.CUSTOMER_TRX_ID

    AND D.CUST_TRX_LINE_GL_DIST_ID = C.DISTRIBUTION_ID

    )

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID

    AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    END LOOP;

    C IN CUR_MISC_DIST

    LOOP

    -The Sub statement is commented because of server performance low as indicated by the DBA as dated: 06-MAY-2014

    / * UPDATE GL_JE_LINES L

    SET CONTEXT = NULL,

    ATTRIBUT1 = NULL,

    ATTRIBUT2 = NULL,

    ATTRIBUT3 = NULL,

    ATTRIBUTE4 = NULL,

    ATTRIBUTE5 = NULL,

    DESCRIPTION = NULL

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    UPDATE GL_JE_LINES L

    GAME CONTEXT = "Debitable."

    ATTRIBUT1 = (SELECT D.ATTRIBUTE1 FROM AR_MISC_CASH_DISTRIBUTIONS_ALL D WHERE D.MISC_CASH_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUT2 = (SELECT D.ATTRIBUTE2 FROM AR_MISC_CASH_DISTRIBUTIONS_ALL D WHERE D.MISC_CASH_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUT3 = (SELECT D.ATTRIBUTE3 FROM AR_MISC_CASH_DISTRIBUTIONS_ALL D WHERE D.MISC_CASH_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    DESCRIPTION = (SELECT D.ATTRIBUTE3 FROM AR_MISC_CASH_DISTRIBUTIONS_ALL D WHERE D.MISC_CASH_DISTRIBUTION_ID = C.DISTRIBUTION_ID).

    ATTRIBUTE4 = "receive."

    ATTRIBUTE5 = (SELECT I.RECEIPT_NUMBER AR_MISC_CASH_DISTRIBUTIONS_ALL D, AR_CASH_RECEIPTS_ALL I WHERE I.CASH_RECEIPT_ID = D.CASH_RECEIPT_ID AND D.MISC_CASH_DISTRIBUTION_ID = C.DISTRIBUTION_ID)

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM; * /.

    UPDATE GL_JE_LINES L

    SET

    (

    CONTEXT,

    ATTRIBUTE1,

    ATTRIBUT2,

    ATTRIBUT3,

    DESCRIPTION,

    ATTRIBUTE4,

    ATTRIBUTE5

    )

    =

    (SELECT 'Debitable',

    D.ATTRIBUTE1,

    D.ATTRIBUTE2,

    D.ATTRIBUTE3,

    D.ATTRIBUTE3,

    "Receive."

    I.RECEIPT_NUMBER

    AR_MISC_CASH_DISTRIBUTIONS_ALL D,.

    AR_CASH_RECEIPTS_ALL I

    WHERE I.CASH_RECEIPT_ID = D.CASH_RECEIPT_ID

    AND D.MISC_CASH_DISTRIBUTION_ID = C.DISTRIBUTION_ID

    )

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID

    AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    END LOOP;

    C IN CUR_PROJ

    LOOP

    -The Sub statement is commented because of server performance low as indicated by the DBA as dated: 06-MAY-2014

    / * UPDATE GL_JE_LINES L

    SET CONTEXT = NULL,

    ATTRIBUT1 = NULL,

    ATTRIBUT2 = NULL,

    ATTRIBUT3 = NULL,

    ATTRIBUTE4 = NULL,

    ATTRIBUTE5 = NULL,

    DESCRIPTION = NULL

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID AND L.JE_LINE_NUM = C.JE_LINE_NUM; * /.

    UPDATE GL_JE_LINES L

    GAME CONTEXT = "Debitable."

    ATTRIBUT1 = "STORE MATTER."

    Attribut2 = "SS cheque."

    ATTRIBUT3 =

    CASE

    WHEN TO_CHAR (C.PA_DATE, 'DD') BETWEEN 1 AND 15

    THEN C.PERIOD_NAME

    |' / F.N. IST'

    WHEN TO_CHAR (C.PA_DATE, 'DD') BETWEEN 16 AND 31

    THEN C.PERIOD_NAME

    |' / F.N. 2 '

    ELSE "Import Journal created"

    END,

    DESCRIPTION =

    CASE

    WHEN TO_CHAR (C.PA_DATE, 'DD') BETWEEN 1 AND 15

    THEN C.PERIOD_NAME

    |' / F.N. IST'

    WHEN TO_CHAR (C.PA_DATE, 'DD') BETWEEN 16 AND 31

    THEN C.PERIOD_NAME

    |' / F.N. 2 '

    ELSE "Import Journal created"

    END,

    ATTRIBUTE4 = 'projects ', he said.

    ATTRIBUTE5 = L.REFERENCE_1

    WHERE L.JE_HEADER_ID = C.JE_HEADER_ID

    AND L.JE_LINE_NUM = C.JE_LINE_NUM;

    END LOOP;

    COMMIT;

    END;

    /


    The error in the stored procedure, it is that it is badly written - by using the line by line (= slow-by-slow) cursor loops, in the middle of which he

    are updated.

    This causes the locking will be held longer than necessary.

    If rewrite you it with focus on game updates, that will be faster, it will alleviate your problem.

    To completely remove it, you will need to discover why a report made updates and why she strives to update the same rows.

    BTW: also remove this bad Ngen.exe.

  • Script to kill the blocking sessions

    We use Oracle 10. We have a database of test used only for training and I need to give to the teacher the ability to kill all sessions blocking when a block continues
    the entire class.
    My idea was to create a simple form on our Oracle containing just a single menu-button when you press on would trigger the script. Press the key
    to kill each session blocking. I have no idea on how to write a script of this nature. Would appreciate any advice.
    Kind regards
    Sandy

    You can use something like this

    SQL> DECLARE
      2  CURSOR c IS
      3  SELECT c.owner,
      4        c.object_name,
      5        c.object_type,
      6        b.SID,
      7        b.serial#,
      8        b.status,
      9        b.osuser,
     10        b.machine
     11   FROM v$locked_object a, v$session b, dba_objects c
     12   WHERE b.SID = a.session_id AND a.object_id = c.object_id
     13   and c.object_name in ('JSW_CRM_C_HR_COIL_INFO','T_SPCL_BARCODE_CRS2');
     14  c_row c%ROWTYPE;
     15  l_sql VARCHAR2(100);
     16  BEGIN
     17  OPEN c;
     18  LOOP
     19  FETCH c INTO c_row;
     20  EXIT WHEN c%NOTFOUND;
     21  l_sql := 'alter system kill session '''||c_row.SID||','||c_row.serial#||'''';
     22  EXECUTE IMMEDIATE l_sql;
     23  END LOOP;
     24  CLOSE c;
     25  END;
     26  / 
    

    Be sure to use your own SQL statement in the CURSOR!

  • Blocking of RAC sessions

    Hello

    I had a look at several versions of SQL Developer and none of them seem to handle blocking sessions in the CCR that is questioning the views of $ GV. Am I missing something?

    Thank you

    Chris.

    I would hazard a guess that it refers to:

    Reports of data dictionary-> DatabaseAdministration-> locks-> block of the locks by user

    If Yes, it is quite right... it uses exclusively the view V$ and therefore an incomplete view of locking in a RAC database.  This is also true of the locks by report the user in the same group, incidentally.

  • Blocking of the internal services of VPN and Proxy

    Hello

    I have some users with Windows 7 and MAC laptops inside my network domestic who is protected by the R7000.

    I'd like know if its possible to block sessions VPN and Proxy, initiated from these internal, to communicate with Internet computers.

    Thank you

    Try VPN Service to block.

  • How to find who holds a SQL lock when its not v$ session.sql_id and v$ session.prev_sql_id

    Hi all

    Looking a little nudge in the right direction on a strange problem with blocking locks in our database of BSE...

    We occasionally will blocking locks in our EBS 12.1.3 database (11.2.0.4 CARS on OEL5).   I can easily determine the INST_ID select and SID that keeps the lock with this:

    Select final_blocking_instance, final_blocking_session from gv$ session where lockwait is not null;

    and can use these results to find the specific object being blocked by querying a gv$ locked_object where session_id = xxx and INST_ID select = xxx.   These sessions blocker are generally inactive to an event of "SQL * Net client message"-while they seem to be connected to the database users who need simply to commit or rollback transactions.   Usually, when I see this type of behavior, the specific application involved in the unresolved external transactions is easy to find by taking the SQL_ID (or sometimes the PREV_SQL_ID) value of gv$ session and questioning gv$ sql.  I can then use this information to better understand what users are trying to accomplish and help them understand what they need to change to avoid the deadlock problem.

    But recently, we have integrated the add-on of Oracle content management and it seems to have added (I suspect indirectly) triggers for many forms EBS our users work in.  Now that we know these "locks blocking inactive form" - and the SQL_ID value is zero and related PREV_SQL_ID sql_text is

    SELECT * FROM AXF_COMMANDS_SYN WHERE FORMID =: b1 AND (MENUTYPE = 'SPÉCIAL' MENUTYPE or = "ZOOMANDSPECIAL") AND AXF_COMMANDS_SYN. SPECIAL 'n' IS NOT NULL


    Although I can see SGS $ locked_object both the text of the SQL being run by sessions which blocked the blocking the locks held by the session is on an object (for example RA_CUSTOMER_TRX_ALL) that does not seem to be at all related to AXF_COMMANDS_SYN.   The AXF schema has been added as part of the deployment of content management.


    So, my thought is that a different cursor open (previous) held by the session is the real unresolved SQL that maintains the lock.  Is there a way to determine the SQL_ID of this query "indirectly" from gv$ locked_object / gv$ transaction, gv$ open_cursor, etc.?  I can determine what is the problem and what user, we need to talk to him - but I would really like to find the exact SQL that is involved.   I am also to establish if the new behavior is somehow contributing to locking problems blocking or just 'a Kipper"- and I think I know which statement SQL Gets the lock will help me to move forward with the investigation.  I'm sure I could find this info by tracing the blocking - session but the problem occurs rarely, and I'm not able to determine which trace session until it is too late... :-)


    Any recommendations would be appreciated, and my apologies for the long post...









    A session may issue a followed LMD of 5 requests without issuing a commit.

    Another session may be attempting a DML when the 5th request session above is running.  Querying V$ session for the first session SQL_ID or PREV_SQL_ID wouldn't you say the first SQL DML.

    You can walk backwards through V$ ACTIVE_SESSION_HISTORY (if you have the License Pack diagnosis) and determine all SQL_IDs of this first session if they did get captured in V$ ACTIVE_SESSION_HISTORY or DBA_HIST_ACTIVE_SESS_HISTORY.  (Attention: not all SQLs are captured - particularly short-lived SQLs can't get captured)

    Hemant K Collette

  • Blocking problem

    Hello

    We had a blocking problem when insert 2 instructions were trying to insert into the same table. I don't see a reason why 2 commands insert should cause a blocking problem, but it was indeed happening. The table had no triggers, partitions or bitmap indexes. However the table had 2 unique index and primary key constraints.

    Can someone please advice on this? What can be the reason for the impasse here?

    Oracle Version: 11.1

    Thank you

    create table t1 (key primary number n1);

    session 1: insert into t1 values (1);

    session 2: insert into t1 values (2);

    session 1: insert into t1 values (2);  -wait session 2 to rollback or commit

    session 2: insert into t1 values (1);  -waiting for the session 1 to rollback or commit.

    In the seconds 3 session 1 will throw an exception of blocking, session 2 will continue waiting

    Collisions on the uncommitted inserts, updates or deletes on primary, unique (or foreign) keys can cause expected, which means that you can engineer blockages.

    Concerning

    Jonathan Lewis

  • How to find the details of the session of hexadecimal value 11g RAC deadlock

    Hello

    Version: 11.2.0.4 2 node RAC on AIX 7.1

    We place worldwide in our database, and we can see in the file path as:

    Submit application dump asynchronized [1 c]. Summary = [clear stack process GHG (kjdglblkrdm1)].

    Global end dump blockers: -.

    Wait-For-Graph (WFG) overall to DDT [0.2d7]:

    BLOCKED 0x700010448e88a48 wq 4 2 cvtops x 1 TM 0x1a3b3.0x0 (ext 0 x 0 0 x 0) [100 a-00AB-00000093] inst 1

    TRAINER 4 wq 0x70001043b5ffd50 2 cvtops x 1 TM 0x1a3b3.0x0 (ext 0 x 0 0 x 0) [200F-00F8-00000014] inst 2

    0x70001043b5ffd50 wq 4 2 cvtops x 1 TM 0x1a3b3.0x0 (ext 0 x 0 0 x 0) BLOCKED [200F-00F8-00000014] inst 2

    TRAINER 4 wq 0x700010448e88a48 2 cvtops x 1 TM 0x1a3b3.0x0 (ext 0 x 0 0 x 0) [100 a-00AB-00000093] inst 1

    So, here, the session had lock mode 4 on the 0x1a3b3 object. What is "wq 2 ' above the info? What are the 100 a-00AB-00000093 and 200F-00F8-00000014 indicates the above data of the WFG?.

    I want to see the details of each session of 0x700010448e88a48, 0x70001043b5ffd50 sessions and how can I get this info from the history views$ v?

    Thank you very much

    Kind regards

    '4' is actually the 5 lock mode.

    See https://orastory.wordpress.com/2011/11/23/wfg-mode-5-tm-deadlock/

    You can also use the raw data of ASH in V$ ACTIVE_SESSION_HISTORY and/or DBA_HIST_ACTIVE_SESS_HISTORY to complete.

    It will tell you which statement was the blocked session running and blocking the session details (but not which statement was responsible for blocking, unless you get very lucky).

    However, your scenario of lock mode 5 TM could match the scenario of blocking foreign key non-indexed in the article above.

    The TM, the 0x1a3b3 lock can be translated into decimal - 107443 - and used to match the object of dba_objects.object_id

    #define KJUSERNL 0         /* no permissions */   (Null)

    #define KJUSERCR 1         /* concurrent read */ (Row-S (SS))

    #define KJUSERCW 2         /* concurrent write */ (Row-X (SX))

    #define KJUSERPR 3         /* protected read */    (Share)

    #define KJUSERPW 4         /* protected write */ (S/Row-X (SSX))

    #define KJUSEREX 5         /* exclusive access */ (Exclusive)

  • Username blocking which is held on the database at the time

    Hello

    Using oracle 11.2.0.3 and concluding that on sat morning (03:30 a table cannot be updated due to an exclusive lock.

    merge into the affected table.

    Nothing else, we are aware to access the table at the moment because of some process must be because of the ORA-00054 - busy resource.

    Is there a way that we can identify what caused the blocking / causing the lock - happenening each week.

    Thank you

    You get it in history, when you get the lock again and then query the table mentioned above.  In addition, to check any kind of blocking session problem use this query.

    Select b.session_id, a.SERIAL #, «blocker details» a.username

    session $ v has, dba_lock b

    where b.session_id = a.sid

    and b.blocking_others = 'block ';

    Concerning

    Asif Kabir

  • Session refused to be killed

    Hello
    I have a serious problem with my session who refuses to be killed.
    I first issuing a delete statement to this session that used to take hours, so I decided to stop the process of going through another way. So I tried to canceled the process, but he refused. I have problem alter system kill session on this session, then I got a message like the process is killed, but is not to kill. I tried later to stop and restart the database with an immediate halt, not at all, after a few minutes, I got error user cancelled process. Something strange is that if you look in the session of $ v, the session does not appear, but no matter when you issue remove another on the same table, a lock apperas automatically, where you can see the blocking and blocked session. Please how can I ride of that old deletes the session to continue with the rest of my delete.
    Thank you

    Aman... wrote:
    Please kill the following processes and post comments later, what happened to the database

    oracle 8828 1 0 08:49 ? 00:00:00 oraclemoovprod (LOCAL=NO)
    oracle 9139 1 0 08:50 ? 00:00:00 oraclemoovprod (LOCAL=NO)
    oracle 9438 1 0 08:51 ? 00:00:00 oraclemoovprod (LOCAL=NO)
    oracle 10396 10359 0 08:54 ? 00:00:00 oraclemoovprod (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 10762 1 0 08:55 ? 00:00:00 oraclemoovprod (LOCAL=NO)
    oracle 10954 1 0 08:56 ? 00:00:00 oraclemoovprod (LOCAL=NO)
    oracle 11559 1 0 08:58 ? 00:00:00 oraclemoovprod (LOCAL=NO)
    oracle 22093 22084 0 09:33 ? 00:00:00 oraclemoovprod (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    

    HTH
    Aman...

    We should not find ourselves first of all the correct process Id, rather than kill a couple of random connections?

    Select spid in process $ v where addr = (select paddr in session $ v where sid = and serial #= )

    The output can be compared to the 'ps - ef' list.
    Kill only the process id.
    Often a "kill - 9 'is required

    HTH,

    FJFranken
    My Blog: http://managingoracle.blogspot.com

  • DROP USER CASCADE takes forever! Cannot see all blocks... any ideas?

    Hi all

    I am running a script that has a cascade of user to fall, and it's been sitting there for about 3.5 hours at this point.

    I ran a query to see if I could find any blocking sessions:

    SQL > alter
    A written file afiedt.buf

    1 SELECT DECODE (ask, 0,' the owner: ',' server: '). Sess sid,
    2 id1, id2, lmode, request, type
    3. IN V$ LOCK
    4. WHERE (id1, id2, type) IN
    5 (SELECT id1, id2, type OF LOCKING WHEN demand for V$ > 0)
    6 * ORDER BY id1, ask
    SQL > /.

    no selected line


    So, I'm a bit stuck... is possible to see what maybe continues this? This is performed on a 3 x system RAC node... I think this would go pretty fast...

    any ideas on what to do or what to watch?

    TIA,

    Cayenne

    Yes, you drop the first user objects, then delete it the user. Slow user drops have been written about many times over the years. It generally works better if you don't try to do everything via a single command.

    I had the same experience with drop tablespace waterfall. It is generally faster remove objects via the script, then drop the tablespace.

    For now, you want to probably just wait the drop user cascade.

    HTH - Mark D Powell.

  • blocking because of the primary key constraint

    Hi all

    Recently, we migrated to 9.2.0.4 to 10.2.0.4. In the new version of oracle there was a strange behavior, we have 200 + oracle database user and there was too much blocking on a particular one table, we looked and looked for the cause but found nothing exact reason, then on the internet somewhere, we found that if a primary key is disabled and no there is also foreign then blocking is caused for example

    CREATE TABLE TEST_MST
    (
    MST_COL1 NUMBER,
    MST_COL2 NUMBER,
    MST_COL3 NUMBER
    )

    CREATE TABLE TEST_DTL
    (
    MST_COL1 NUMBER,
    MST_COL2 NUMBER,
    MST_COL3 NUMBER,
    DTL_COL1 NUMBER,
    DTL_COL2 NUMBER,
    DTL_COL3 NUMBER
    )

    ALTER TABLE TEST_MST ADD)
    CONSTRAINT PK_TM
    KEY ELEMENTARY SCHOOL
    (MST_COL1, MST_COL2, MST_COL3)) ;

    ALTER TABLE TEST_DTL ADD)
    CONSTRAINT PK_TD
    KEY ELEMENTARY SCHOOL
    (MST_COL1, MST_COL2, MST_COL3, DTL_COL1, DTL_COL2)) ;

    ALTER TABLE TEST_DTL ADD)
    CONSTRAINT FK_TM_TD
    FOREIGN KEY (MST_COL1, MST_COL2, MST_COL3)
    REFERENCES TEST_MST (MST_COL1, MST_COL2, MST_COL3));

    ALTER TABLE TEST_DTL
    DISABLE THE CONSTRAINT PK_TD;


    so, I just want to be sure that's the exact reason only blocking sessions and if yes, then why not so happning.

    Thanks and Rgds,
    Piyush

Maybe you are looking for

  • Reinstalled logic lack of Applications

    I've deleted and reinstalled my Logic Pro X (after an abortive attempt to move EXS24 on external hard drive). Everything seemed fine. Logic works very well, but after the closing, it is not found. No Applications and no recent Articles.  What I have

  • T60 - 200746g

    I bought this for a friend. When you try to update BIOS it said something about Windows Bitlocker. I tried to change the HARD drive and install W7 and W XP nothing works. Installation process stops. Any clue?

  • Mouse 6000 v2,

    IM struggling to find the best way to contact Microsoft.  That is to say; telephone, e-mail, etc.?   My mouse wireless 6000 v2 is crazy. Whenever the cursor is on a site it opens several instantly.  It worked fine for 2 years and must have something

  • biohd-8 error

    I have the same problem.  It was beautiful and I stopped him for the night and the next morning, the computer froze.  I couldn't do anything that the little blue circle was running. I accepted a change in the registry when I used a program lately.  W

  • Unable to download the update for Windows Vista

    Try to download the update for Windows Vista 28. MB (big enough file) download also refers to "KB980248.  He continues to show "failed" and "errors found." 'code 80070017' never had problems to download the updates of windows before.