Compiled trigger causes database hung

Hi there,
I compile some triggers in our database and they cause our database hung, how can I do ? any hint? Thx

That is ugly - calling a remote proc from inside a trigger. And the wrong thing to do in most cases.
A trigger is there to protect the integrity of the data and transaction. A remote proc call can fail for numerous reasons. Network issues. Remote db is in restricted mode/down. Etc. These will cause the trigger to fail. The trigger failure will cause the business transaction to fail.
And I'm pretty sure that no business transaction and validation and processing logic dictates that it must fail because of sonmething like a network problem if it can be prevented.
If this is a replication issue, you should consider using Oracle's built-in replication instead.
Anything else - I would rather have the trigger inserting instructions (into a table) for a background (DBMS_JOB) process to pick up and execute.

Similar Messages

  • All possible causes of database hung

    Hi,
    Can someone please tell me what are all the possible causes of database hung?
    Thanks.
    Creems

    Already discussed threads.
    http://forums.oracle.com/forums/search.jspa?threadID=&q=database+hang&objID=f61&dateRange=lastyear&userID=&numResults=15
    Regards,
    Sabdar Syed.

  • ROW CACHE ENQUEUE LOCK/ibrary cache load lock leads to database hung

    (lowercase, curly brackets, no spaces)
    We faced database hung on 3 node 11i erp 9i rac database.
    We saw the library cache load lock timed out events reported in alert log.
    Then few ora-600 and later ROW CACHE ENQUEUE LOCK timed out event. Eventually database was hung and we had to bounce the services .
    we created support sr 7845542.992 for RCA.
    The support says to increase shared pool size to avoid shared pool fragmentation and avoid reload ,additionaly to upgrade to 10g database.
    I am not covinced adding additional pool size would solve this or upgrade to 10 .furthermore even 10g has such issues reported.
    I saw couple of bugs mentioned such issue can happen due deadlock of session holding latches .
    kindly let me know your view on issue
    If required i can attach statspack for more information. (lowercase, curly brackets, no spaces)

    Many Thanks, i was keen to have your update .
    There are 8 cpus on each node . Reloads very high during time period ,but normally there are not high reloads.
    Statspack details for 3 nodes
    STATSPACK report for
    DB Name         DB Id    Instance     Inst Num Release     Cluster Host
    PROD            21184234 PROD1               1 9.2.0.8.0   YES     npi-or-db-p-
                                                                       11.npi.corp
                  Snap Id     Snap Time      Sessions Curs/Sess Comment
    Begin Snap:    149817 30-Oct-09 13:00:09      574 #########
      End Snap:    149837 30-Oct-09 14:00:17      602 #########
       Elapsed:               60.13 (mins)
    Cache Sizes (end)
    ~~~~~~~~~~~~~~~~~
                   Buffer Cache:     8,192M      Std Block Size:          8K
               Shared Pool Size:     1,024M          Log Buffer:     10,240K
    Load Profile
    ~~~~~~~~~~~~                            Per Second       Per Transaction
                      Redo size:            122,414.93             11,449.13
                  Logical reads:             69,550.76              6,504.89
                  Block changes:                928.41                 86.83
                 Physical reads:                196.24                 18.35
                Physical writes:                 28.65                  2.68
                     User calls:                343.97                 32.17
                         Parses:                558.61                 52.25
                    Hard parses:                 43.48                  4.07
                          Sorts:                467.24                 43.70
                         Logons:                  0.63                  0.06
                       Executes:              2,046.99                191.45
                   Transactions:                 10.69
      % Blocks changed per Read:    1.33    Recursive Call %:     97.59
    Rollback per transaction %:    5.07       Rows per Sort:     15.85
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:  100.00       Redo NoWait %:    100.00
                Buffer  Hit   %:   99.72    In-memory Sort %:    100.00
                Library Hit   %:   96.79        Soft Parse %:     92.22
             Execute to Parse %:   72.71         Latch Hit %:     99.77
    Parse CPU to Parse Elapsd %:   60.10     % Non-Parse CPU:     78.07
    -> s  - second
    -> cs - centisecond -     100th of a second
    -> ms - millisecond -    1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc (idle events last)
                                                                       Avg
                                                         Total Wait   wait    Waits
    Event                               Waits   Timeouts   Time (s)   (ms)     /txn
    db file sequential read           249,234          0      1,537      6      6.5
    db file scattered read             61,776          0        769     12      1.6
    row cache lock                    780,098         10        566      1     20.2
    library cache lock                697,849        157        432      1     18.1
    latch free                        127,926      4,715        387      3      3.3
    global cache cr request           370,770      3,091        309      1      9.6
    PL/SQL lock timer                      59         58        112   1903      0.0
    wait for scn from all nodes       303,572         18        103      0      7.9
    library cache pin                  26,231          2        100      4      0.7
    global cache null to x             17,717        716         92      5      0.5
    buffer busy waits                   5,388         18         74     14      0.1
    db file parallel read               5,245          0         69     13      0.1
    log file sync                      20,407         29         66      3      0.5
    enqueue                            52,200         70         60      1      1.4
    buffer busy global CR               4,845         33         55     11      0.1
    CGS wait for IPC msg              412,512    407,106         50      0     10.7
    ksxr poll remote instances      1,279,565    483,046         48      0     33.2
    log file parallel write           160,040          0         42      0      4.1
    library cache load lock             1,491          2         29     20      0.0
    global cache open x                19,507        344         28      1      0.5
    buffer busy global cache              957          0         22     23      0.0
    global cache s to x                16,516        180         20      1      0.4
    db file parallel write             11,120          0         12      1      0.3
    log file sequential read              618          0         11     18      0.0
    DFS lock handle                    23,768          0         10      0      0.6
    control file sequential read        8,563          0          4      0      0.2
    KJC: Wait for msg sends to c        1,549         57          4      3      0.0
    lock escalate retry                    76         76          4     52      0.0
    SQL*Net break/reset to clien       12,546          0          3      0      0.3
    SQL*Net more data to client        85,773          0          3      0      2.2
    control file parallel write         1,265          0          2      1      0.0
    global cache null to s                648         23          1      2      0.0
    global cache busy                     200          0          1      5      0.0
    global cache open s                 1,493         28          1      1      0.0
    log file switch completion             12          0          1     61      0.0
    PX Deq Credit: send blkd              161         70          1      4      0.0
    kksfbc child completion               119        118          1      5      0.0
    PX Deq: reap credit                 5,948      5,456          0      0      0.2
    PX Deq: Execute Reply                  83         29          0      3      0.0
    process startup                         8          0          0     25      0.0
    LGWR wait for redo copy               992         12          0      0      0.0
    IPC send completion sync              450        450          0      0      0.0
    PX Deq: Parse Reply                   100         28          0      1      0.0
    undo segment extension             10,380     10,372          0      0      0.3
    PX Deq: Join ACK                      146         65          0      1      0.0
    buffer deadlock                       222        221          0      0      0.0
    async disk IO                       1,179          0          0      0      0.0
    wait list latch free                    2          0          0     16      0.0
    PX Deq: Msg Fragment                  112         28          0      0      0.0
    Library Cache Activity for DB: PROD  Instance: PROD1  Snaps: 149817 -149837
    ->"Pct Misses"  should be very low
                             Get  Pct        Pin        Pct               Invali-
    Namespace           Requests  Miss     Requests     Miss     Reloads  dations
    BODY                 116,007    1.1        133,347   19.9     24,338        0
    CLUSTER                4,224    0.6          5,131    1.0          0        0
    INDEX                 15,048   24.1         13,798   26.4          2        0
    JAVA DATA                 82    0.0            692   39.6        136        0
    JAVA RESOURCE             66   39.4            206   25.2         12        0
    PIPE                   1,140    0.5          1,160    0.5          0        0
    SQL AREA           1,197,908   12.6     13,517,660    1.5    111,833       73
    TABLE/PROCEDURE    3,847,439    0.8      4,230,265    7.9    142,200        0
    TRIGGER                8,444    2.4          8,657   18.5      1,274        0
                        GES Lock      GES Pin      GES Pin   GES Inval GES Invali-
    Namespace           Requests     Requests     Releases    Requests     dations
    BODY                       1        1,234        1,258         985           0
    CLUSTER                3,222           25           25          25           0
    INDEX                 13,792        3,641        3,631       3,629           0
    JAVA DATA                  0            0            0           0           0
    JAVA RESOURCE              0           26           25           0           0
    PIPE                       0            0            0           0           0
    SQL AREA                   0            0            0           0           0
    TABLE/PROCEDURE      857,137       13,130       13,264      10,762           0
    TRIGGER                    0          200          202         200           0
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    STATSPACK report for
    DB Name         DB Id    Instance     Inst Num Release     Cluster Host
    PROD            21184234 PROD2               2 9.2.0.8.0   YES     npi-or-db-p-
                                                                       12.npi.corp
                  Snap Id     Snap Time      Sessions Curs/Sess Comment
    Begin Snap:    149847 30-Oct-09 14:00:05      493 #########
      End Snap:    149857 30-Oct-09 15:00:02      432 #########
       Elapsed:               59.95 (mins)
    Cache Sizes (end)
    ~~~~~~~~~~~~~~~~~
                   Buffer Cache:     8,192M      Std Block Size:          8K
               Shared Pool Size:     1,024M          Log Buffer:     10,240K
    Load Profile
    ~~~~~~~~~~~~                            Per Second       Per Transaction
                      Redo size:             71,853.44             32,058.65
                  Logical reads:            273,904.84            122,207.36
                  Block changes:                889.13                396.70
                 Physical reads:                 40.40                 18.03
                Physical writes:                 20.97                  9.35
                     User calls:                153.74                 68.60
                         Parses:                 66.19                 29.53
                    Hard parses:                  2.66                  1.19
                          Sorts:                 25.70                 11.47
                         Logons:                  0.16                  0.07
                       Executes:                726.41                324.10
                   Transactions:                  2.24
      % Blocks changed per Read:    0.32    Recursive Call %:     92.41
    Rollback per transaction %:    4.84       Rows per Sort:    193.55
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:  100.00       Redo NoWait %:     99.99
                Buffer  Hit   %:   99.99    In-memory Sort %:    100.00
                Library Hit   %:   99.35        Soft Parse %:     95.97
             Execute to Parse %:   90.89         Latch Hit %:     99.99
    Parse CPU to Parse Elapsd %:   36.55     % Non-Parse CPU:     98.28
    Wait Events for DB: PROD  Instance: PROD2  Snaps: 149847 -149857
    -> s  - second
    -> cs - centisecond -     100th of a second
    -> ms - millisecond -    1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc (idle events last)
                                                                       Avg
                                                         Total Wait   wait    Waits
    Event                               Waits   Timeouts   Time (s)   (ms)     /txn
    enqueue                            65,823     33,667     90,459   1374      8.2
    row cache lock                     38,996        560      1,795     46      4.8
    PX Deq Credit: send blkd              522        499      1,223   2344      0.1
    PX Deq: Parse Reply                   466        416        987   2117      0.1
    db file sequential read            50,130          0        421      8      6.2
    library cache lock                 78,842        172        210      3      9.8
    db file scattered read              6,904          0        152     22      0.9
    global cache cr request            84,801        575        113      1     10.5
    latch free                          8,096        736         65      8      1.0
    log file sync                       5,676         27         41      7      0.7
    wait for scn from all nodes        18,891         10         24      1      2.3
    CGS wait for IPC msg              394,678    392,142         21      0     49.0
    library cache pin                   1,339          0         17     13      0.2
    global cache null to x              2,145         48         16      8      0.3
    global cache s to x                 3,242         32         16      5      0.4
    buffer busy waits                     366         10         15     40      0.0
    ksxr poll remote instances         70,990     31,295         14      0      8.8
    db file parallel read                 359          0         11     31      0.0
    global cache open x                 2,708         55         10      4      0.3
    async disk IO                       3,474          0          8      2      0.4
    global cache open s                 3,470         10          6      2      0.4
    log file parallel write            13,076          0          5      0      1.6
    global cache busy                      58         40          5     90      0.0
    PL/SQL lock timer                       1          1          5   4877      0.0
    DFS lock handle                     3,362          0          5      1      0.4
    log file sequential read              412          0          4     10      0.1
    db file parallel write              2,774          0          3      1      0.3
    library cache load lock                59          0          3     58      0.0
    buffer busy global CR                 722          0          3      4      0.1
    control file sequential read        6,398          0          3      0      0.8
    SQL*Net break/reset to clien       16,078          0          2      0      2.0
    name-service call wait                 26          0          2     67      0.0
    control file parallel write         1,248          0          2      1      0.2
    process startup                        24          0          1     49      0.0
    KJC: Wait for msg sends to c        3,491          4          1      0      0.4
    SQL*Net more data to client        23,724          0          1      0      2.9
    buffer busy global cache               23          0          0     19      0.0
    global cache null to s                114          0          0      4      0.0
    PX Deq: reap credit                 5,646      5,509          0      0      0.7
    log file switch completion              4          0          0     58      0.0
    lock escalate retry                    54         54          0      1      0.0
    IPC send completion sync              119        118          0      0      0.0
    direct path read                    2,820          0          0      0      0.3
    direct path read (lob)              3,632          0          0      0      0.5
    PX Deq: Join ACK                       88         37          0      0      0.0
    direct path write                   2,470          0          0      0      0.3
    kksfbc child completion                 6          6          0      6      0.0
    buffer deadlock                         3          3          0     11      0.0
    global cache quiesce wait               4          4          0      8      0.0
    Library Cache Activity for DB: PROD  Instance: PROD2  Snaps: 149847 -149857
    ->"Pct Misses"  should be very low
                             Get  Pct        Pin        Pct               Invali-
    Namespace           Requests  Miss     Requests     Miss     Reloads  dations
    BODY                  27,353    0.5         28,091    6.5      1,643        0
    CLUSTER                  203    1.0            269    1.5          0        0
    INDEX                    526    9.9            271   19.9          0        0
    JAVA DATA                 18    0.0            120    6.7          4        0
    JAVA RESOURCE             20   45.0             56   26.8          3        0
    JAVA SOURCE                1  100.0              1  100.0          0        0
    PIPE                     999    0.4          1,043    0.4          0        0
    SQL AREA             131,793    7.6      3,406,577    0.4      7,012        0
    TABLE/PROCEDURE      926,987    0.2      1,907,993    1.0      8,845        0
    TRIGGER                1,519    0.1          1,532    4.9         69        0
                        GES Lock      GES Pin      GES Pin   GES Inval GES Invali-
    Namespace           Requests     Requests     Releases    Requests     dations
    BODY                       1          129          277         117           0
    CLUSTER                  168            2            2           2           0
    INDEX                    271           52           56          52           0
    JAVA DATA                  0            0            0           0           0
    JAVA RESOURCE              0            9            6           0           0
    JAVA SOURCE                0            1            1           1           0
    PIPE                       0            0            0           0           0
    SQL AREA                   0            0            0           0           0
    TABLE/PROCEDURE       89,523          764          868         460           0
    TRIGGER                    0            2           14           2           0
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    DB Name         DB Id    Instance     Inst Num Release     Cluster Host
    PROD            21184234 PROD3               3 9.2.0.8.0   YES     npi-or-db-p-
                                                                       13.npi.corp
                  Snap Id     Snap Time      Sessions Curs/Sess Comment
    Begin Snap:    149808 30-Oct-09 14:00:00       31 #########
      End Snap:    149809 30-Oct-09 15:00:02       34  11,831.4
       Elapsed:               60.03 (mins)
    Cache Sizes (end)
    ~~~~~~~~~~~~~~~~~
                   Buffer Cache:     8,192M      Std Block Size:          8K
               Shared Pool Size:     1,024M          Log Buffer:     10,240K
    Load Profile
    ~~~~~~~~~~~~                            Per Second       Per Transaction
                      Redo size:              1,518.14             36,700.35
                  Logical reads:              1,333.43             32,235.02
                  Block changes:                  5.09                123.01
                 Physical reads:                 54.31              1,312.88
                Physical writes:                  3.91                 94.44
                     User calls:                  1.46                 35.40
                         Parses:                  2.24                 54.21
                    Hard parses:                  0.04                  0.93
                          Sorts:                  0.84                 20.28
                         Logons:                  0.06                  1.45
                       Executes:                  3.11                 75.23
                   Transactions:                  0.04
      % Blocks changed per Read:    0.38    Recursive Call %:     94.31
    Rollback per transaction %:   45.64       Rows per Sort:    215.97
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:   99.99       Redo NoWait %:    100.00
                Buffer  Hit   %:   96.21    In-memory Sort %:    100.00
                Library Hit   %:   99.07        Soft Parse %:     98.29
             Execute to Parse %:   27.94         Latch Hit %:     99.98
    Parse CPU to Parse Elapsd %:   69.88     % Non-Parse CPU:     97.92
    Wait Events for DB: PROD  Instance: PROD3  Snaps: 149808 -149809
    -> s  - second
    -> cs - centisecond -     100th of a second
    -> ms - millisecond -    1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc (idle events last)
                                                                       Avg
                                                         Total Wait   wait    Waits
    Event                               Waits   Timeouts   Time (s)   (ms)     /txn
    enqueue                            19,510      7,472     15,509    795    130.9
    PX Deq: Parse Reply                 1,152      1,071      2,577   2237      7.7
    row cache lock                      2,202        518      1,579    717     14.8
    db file scattered read             31,556          0        354     11    211.8
    db file sequential read            17,272          0         67      4    115.9
    db file parallel read               1,722          0         34     20     11.6
    global cache cr request            53,754         91         32      1    360.8
    wait for scn from all nodes         1,897         13         10      5     12.7
    CGS wait for IPC msg              403,358    401,478         10      0  2,707.1
    DFS lock handle                     4,753          0          8      2     31.9
    direct path read                    1,248          0          6      5      8.4
    PX Deq: Execute Reply                 110         38          6     51      0.7
    global cache open s                   160         10          5     31      1.1
    control file sequential read        6,442          0          3      0     43.2
    name-service call wait                 26          0          2     78      0.2
    latch free                            129        109          2     13      0.9
    KJC: Wait for msg sends to c          153         24          1      9      1.0
    control file parallel write         1,245          0          1      1      8.4
    buffer busy waits                     199          0          1      6      1.3
    process startup                        20          0          1     44      0.1
    global cache null to x                 74          2          1      9      0.5
    global cache null to s                 19          0          1     29      0.1
    global cache open x                   268          1          1      2      1.8
    library cache lock                  1,150          0          0      0      7.7
    PX Deq: Join ACK                      129         48          0      3      0.9
    log file parallel write             1,157          0          0      0      7.8
    async disk IO                         219          0          0      1      1.5
    direct path write                   1,024          0          0      0      6.9
    ksxr poll remote instances          6,740      4,595          0      0     45.2
    PX Deq: reap credit                 6,580      6,511          0      0     44.2
    buffer busy global CR                  73          0          0      2      0.5
    log file sequential read               11          0          0     10      0.1
    log file sync                         100          0          0      1      0.7
    global cache s to x                   282          2          0      0      1.9
    db file parallel write                 95          0          0      1      0.6
    library cache pin                     142          0          0      0      1.0
    SQL*Net break/reset to clien           28          0          0      1      0.2
    IPC send completion sync               81         81          0      0      0.5
    PX Deq: Signal ACK                     32         14          0      1      0.2
    PX Deq Credit: send blkd                3          1          0      7      0.0
    SQL*Net more data to client           841          0          0      0      5.6
    PX Deq: Msg Fragment                   37         17          0      0      0.2
    log file single write                   4          0          0      1      0.0
    db file single write                    1          0          0      1      0.0
    SQL*Net message from client         4,213          0     13,673   3246     28.3
    gcs remote message                214,784     75,745      7,016     33  1,441.5
    wakeup time manager                   233        233      6,812  29237      1.6
    PX Idle Wait                        2,338      2,294      5,686   2432     15.7
    PX Deq: Execution Msg               2,151      1,979      4,796   2229     14.4
    Library Cache Activity for DB: PROD  Instance: PROD3  Snaps: 149808 -149809
    ->"Pct Misses"  should be very low
                             Get  Pct        Pin        Pct               Invali-
    Namespace           Requests  Miss     Requests     Miss     Reloads  dations
    BODY                   1,290    0.0          1,290    0.0          0        0
    CLUSTER                   18    0.0              8    0.0          0        0
    SQL AREA               4,893    2.0         36,371    0.5          2        0
    TABLE/PROCEDURE        1,555    3.9          3,834    4.9         71        0
    TRIGGER                  286    0.0            286    0.0          0        0
                        GES Lock      GES Pin      GES Pin   GES Inval GES Invali-
    Namespace           Requests     Requests     Releases    Requests     dations
    BODY                       1            0            0           0           0
    CLUSTER                    4            0            0           0           0
    SQL AREA                   0            0            0           0           0
    TABLE/PROCEDURE          863          224           42          42           0
    TRIGGER                    0            0            0           0           0
              -------------------------------------------------------------

  • Deleting all special GL can cause Database inconsistency?

    Hi Expert,
    With reference to the subject, I wonder deleting special GL indicators can cause database inconsistency.
    My Case:
    I deleted all of the SAP special GL indicator, and recreated those I want with my own naming convention, which some of them same with the standard come with SAP.  I did it in client 100, and not yet SCC1 to sandbox (client 120).
    After the deletion, when I run FB01, FB03, etc, I faced error:  Inconsistency in the length of DDIC data type "FBSEG ...
    I faced both problem in client 100 and 120 (I have not changed anything here).
    Question:
    Is it my deletion cause the database inconsistency?
    Why client 120 also have same error?
    Now, basis is figuring the problem, and suspect also the database issue, and not my special GL deletion.
    Kindly advise.
    Thanks and regards,
    sbmel

    Dear expert
        Instead of deleting special G/l indicator you can follow  "use transaction FB00, under Document Entry tab there is General Entry Option where select No Special G/L transaction"
    1329034 - "Correcting inconsistency
    check notes 707715, 929259
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f0d1446011d189700000e8322d00/frameset.htm
    Regards
       Ajeesh.s

  • Oracle XML vaidation causes database connection lost.

    Schema document:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xsd:annotation>
              <xsd:documentation xml:lang="en">
              </xsd:documentation>
         </xsd:annotation>
         <xsd:element name="BDDString" type="xsd:string"/>
    </xsd:schema>
    XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <BDDString><Path>USA</Path></BDDString>
    Result http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx validation:
    Validation error:
    <?xml version="1.0" encoding="UTF-8"?>
    <BDDString
    Error at (2,14): The element 'BDDString' has invalid child element 'Path'. An error occurred at , (2, 14).
    Error at (2,14): The 'Path' element is not declared. An error occurred at , (2, 14).
    <Path>USA</Path></BDDString>ORACLE validation:
    Declare
         xmlObj XMLType;
    begin
         xmlObj := XMLType('<?xml version="1.0" encoding="UTF-8"?><BDDString><Path>USA</Path></BDDString>',
         'cb78db306e061027a7c4b02b1a84d6fb');
         XMLType.schemavalidate(xmlObj);
    end;
    Result: Oracle XML vaidation causes database connection lost!
    *** SCRIPT START : Session:M1GLOBAL_DEV15@MATRIX(5) 3-&#1084;&#1072;&#1088;-2005 14:05:41 ***
    Start SQL Editor Execution ...
    Processing ...
    xmlObj := XMLType('<?xml version="1.0" encoding="UTF-8"?>
    ORA-03113: end-of-file on communication channel
    *** SCRIPT END : Session:M1GLOBAL_DEV15@MATRIX(5) 3-&#1084;&#1072;&#1088;-2005 14:08:02 ***
    End SQL Editor Execution
    Task "SQL Editor Execution": Operation aborted
    SQL Editor Execution terminated with errors
    Task "SQL Editor Execution" in DoTerminate(): Session Manager: No connection to M1GLOBAL_DEV15@MATRIX
    Help!
    Question:
         1)Why Oracle validation incorrectly works?
         2)How it to correct?

    Hi,
    1- what is the Reports version being used?
    2- What is the error you are getting?
    3- Have you tried to enable reports trace and see what is happening in trace file?
    Thanks, Roberto

  • Database trigger causes error in Form

    I have a database trigger on the per_performance_reviews table. When I try to save a performance review record from the forms I get the following error:
    FRM-40403: A calling form has unapplied changes. Save not allowed.
    Any suggestions???
    Here is my trigger:
    CREATE OR REPLACE TRIGGER APPS.XXPER_UPDATE_PERF_REVIEW
    BEFORE INSERT ON HR.PER_PERFORMANCE_REVIEWS
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    l_hire_date DATE;
    l_next_review_Date DATE;
    l_event_type VARCHAR2(40);
    BEGIN
    select papf.START_DATE, pe.type
    into l_hire_date, l_event_type
    from per_all_people_f papf, per_performance_reviews ppr, per_events pe
    where ppr.performance_review_id = :NEW.performance_review_id
    and papf.person_id = ppr.person_id
    and pe.event_id = ppr.event_id
    and sysdate between papf.effective_start_date and papf.effective_end_date;
    l_next_review_date := l_hire_date + (365 * 2);
    IF l_event_type = 'APPRAISAL' THEN
    :NEW.NEXT_PERF_REVIEW_DATE := l_next_review_date;
    END IF;
    END XXPER_UPDATE_PERF_REVIEW;

    There is a forms forum here too.
    However this error message
    FRM-40403: A calling form has unapplied changes. Save not allowed.
    implies that you opend your current form without posting/commiting in the previous form. This is not allowed. Your changes never even touched the database.

  • Db link in trigger causes compilation error

    Using Forms 10.1.2.0.2
    Post-Query trigger
    BEGIN
    SELECT item_desc
    INTO :block1.item_desc
    FROM items@database100
    WHERE item_code = :block1.item_code;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    item_code := 'No description for this item';
    END;
    Compilation error
    Error 201: Identifier 'items@database100' must be declared.
    The select statement works in Toad and Sqlplus, but giving me compilation errors in Forms 10g.
    So is this a bug? If yes, is there a patch?
    Can somebody please post a link to a metalink where this problem is discussed/solved?
    Thanks in advance.

    Well, yeah, that had been considered as a work-around.
    However, at this point, the decision is still to use the db link, and we are still trying to figure out how to make it work.
    Edited by: vanilla.villain on May 21, 2009 11:20 AM

  • Database trigger causes "TooManyObjectsException JBO-25013" in view object

    Hi all,
    I have two tables in a parent - child relationship. Each has it's entity and view object with appropriate associations and links. The parent table has an insert trigger which inserts default rows into the child table when a new parent row is created.
    So the sequence is as follows:
    1) User has view of parent and child tables on one form.
    2) Clicks on parent table row, associated child rows are displayed in child table.
    3) User clicks on Insert button on parent table nav bar.
    4) User enters data and clicks the Commit button on parent table nav bar.
    5) BC4J framework goes off into the JUNavigationBar.actionPerformed() method.
    6) Next thing I see is the error below:
    oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[2210 ].
    I have confirmed that if I disable the trigger the problem goes away. I also tried clearing the cache on the child table just before the JUNavigationBar.actionPerformed() but it does not help.
    I suspect that the VO gets confused by the rows inserted by the trigger when it reloads the data during the last phases of the commit.
    How do I get around this problem??
    Any suggestions welcome. I'm desperate at this stage!
    Thanks,
    Stefan Mahs
    PS: the stack trace follows:
    oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the
    primary key oracle.jbo.Key[2210 ].
    at oracle.jbo.server.EntityCache.add(EntityCache.java:371)
    at
    oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:1493)
    at
    oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:1955)
    at
    oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1021)
    at
    oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2219)
    at
    oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2149)
    at
    oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:1577)
    at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:1429)
    at oracle.jbo.server.QueryCollection.get(QueryCollection.java:966)
    at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2731)
    at
    oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2457)
    at
    oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2321)
    at
    oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2522)
    at
    oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:1604)
    at
    oracle.jbo.server.ViewRowSetImpl.refreshRowSet(ViewRowSetImpl.java:3468)
    at
    oracle.jbo.server.ViewRowSetIteratorImpl.notifyDetailRowSets(ViewRowSetIteratorImpl.java:2952)
    at
    oracle.jbo.server.ViewRowSetIteratorImpl.fireRowUpdated(ViewRowSetIteratorImpl.java:3098)
    at
    oracle.jbo.server.ViewRowSetIteratorImpl.notifyRowUpdated(ViewRowSetIteratorImpl.java:2767)
    at
    oracle.jbo.server.ViewRowSetImpl.notifyRowUpdated(ViewRowSetImpl.java:1113)
    at
    oracle.jbo.server.ViewObjectImpl.notifyRowUpdated(ViewObjectImpl.java:6109)
    at
    oracle.jbo.server.ViewObjectImpl.notifyRowUpdated(ViewObjectImpl.java:6087)
    at
    oracle.jbo.server.ViewObjectImpl.afterRowUpdate(ViewObjectImpl.java:7057)
    at
    oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:7222)
    at
    oracle.jbo.server.EntityCache.deliverEntityEvent(EntityCache.java:504)
    at
    oracle.jbo.server.EntityCache.notifyColumnChange(EntityCache.java:534)
    at
    oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:4034)
    at
    oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:442)
    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:4592)
    at mdh.bc4j.SkusImpl.doDML(SkusImpl.java:1257)
    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:3658)
    at
    oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2336)
    at
    oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2246)
    at
    oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1541)
    at
    oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1707)
    at
    oracle.jbo.uicli.binding.JUApplication.commitTransaction(JUApplication.java:820)
    at
    oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:350)
    at
    oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:257)
    at
    oracle.jbo.uicli.controls.JUNavigationBar.actionPerformed(JUNavigationBar.java:228)
    at
    mdh.client.sku.JUNavigationBarStateful.actionPerformed(JUNavigationBarStateful.java:72)
    at
    javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
    at
    javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
    at
    javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
    at
    javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
    at
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
    at
    java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:227)
    at java.awt.Component.processMouseEvent(Component.java:5134)
    at java.awt.Component.processEvent(Component.java:4931)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3639)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3480)
    at
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
    at
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java:1590)
    at java.awt.Component.dispatchEvent(Component.java:3480)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at
    java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
    at
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

    Let me know when you have a testcase you can email.- unfortunatelly, we cannot reproduce this behavior by using the FOD/Fussion schema with the BrowseEdit demo application (from the Cue cards), everything works as expected.
    After making an analogue trigger on our working schema, this error behaviour still repeats. But, here is our stack trace, maybe this can help. Note addForAltKey(...) bellow, we have one Alternate key. On the other hand, here is part from "Developer quide":
    Whenever any of the key attribute values change, this rule validates that the new key
    does not belong to any other entity object instance of this entity object class. (It is the
    business-logic tier equivalent of a unique constraint in the database.) If the key is
    found in one of the entity objects, a TooManyObjectsException is thrown. The
    validation check is done both in the entity cache and the database
    - we do not know if it is a problem, but looks like that. Note that problem occurs even if we are inserting the first master record.
    In nay case, here is our stack trace:
    oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[49 ].
         at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:369)
         at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:726)
         at oracle.jbo.server.EntityCache.add(EntityCache.java:347)
         at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:2266)
         at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:2631)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:3995)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2677)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2558)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1788)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:4142)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2824)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2680)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2921)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2339)
         at oracle.jbo.server.ViewRowSetImpl.refreshRowSet(ViewRowSetImpl.java:5525)
         at oracle.jbo.server.ViewRowSetIteratorImpl.notifyDetailRowSets(ViewRowSetIteratorImpl.java:3416)
         at oracle.jbo.server.ViewRowSetIteratorImpl.fireRowUpdated(ViewRowSetIteratorImpl.java:3602)
         at oracle.jbo.server.ViewRowSetIteratorImpl.notifyRowUpdated(ViewRowSetIteratorImpl.java:3222)
         at oracle.jbo.server.ViewRowSetImpl.notifyRowUpdated(ViewRowSetImpl.java:1670)
         at oracle.jbo.server.ViewObjectImpl.notifyRowUpdated(ViewObjectImpl.java:9138)
         at oracle.jbo.server.ViewObjectImpl.notifyRowUpdated(ViewObjectImpl.java:9115)
         at oracle.jbo.server.ViewObjectImpl.afterRowUpdate(ViewObjectImpl.java:10267)
         at oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:10484)
         at oracle.jbo.server.EntityCache.sendEvent(EntityCache.java:1044)
         at oracle.jbo.server.EntityCache.deliverEntityEvent(EntityCache.java:1058)
         at oracle.jbo.server.EntityCache.notifyColumnChange(EntityCache.java:1113)
         at oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:6035)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:525)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:6971)
         at com.energosoft.tee.model.entities.TeeTradingTicketEOImpl.doDML(TeeTradingTicketEOImpl.java:87)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:5428)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3129)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2937)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2061)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2263)
    ----------

  • Can anyone explain why the code compiles on one database but not another?

    I have two databases, both running 10.2.0.4, same hardware/OS platform.
    On one database, this code compiles just fine, on the second database, I get errors as shown below:
    SQL> SET SERVEROUTPUT ON SIZE 1000000;
    SQL>
    SQL> create or replace procedure testproc as
    2 vCount number;
    3 vCmd varchar2(2048);
    4 vLastName varchar2(30);
    5 vFirstName varchar2(30);
    6 vPK integer := 0;
    7 vSortLN varchar2(30);
    8 vSortFN varchar2(30);
    9 cursor cPERSON is
    10 select LastName,
    11 FirstName
    12 from GENERIC.PERSON
    13 order by LastName, FirstName;
    14 BEGIN
    15 select count(*) into vCount from USER_OBJECTS where object_name = 'ML4TEMPPERSON';
    16
    17 IF (vCount = 0) THEN
    18 /* NOTE: Omit semi-colon from command. */
    19 vCmd := 'create table ML4TEMPPERSON (PK integer not null, LastName varchar2(30), SortLN varchar2(30), FirstName varchar2(30), SortFN varchar2(30))';
    20 Execute Immediate vCmd;
    21 vCmd := 'alter table ML4TEMPPERSON add (constraint XPKML4TEMPPERSON PRIMARY KEY (PK))';
    22 Execute Immediate vCmd;
    23 END IF;
    24
    25 delete from ML4TEMPPERSON;
    26
    27 for P in cPERSON
    28 loop
    29 vLastName := rpad(P.LastName, 30, ' ');
    30 vFirstName := rpad(P.FirstName, 30, ' ');
    31 vSortLN := vLastName;
    32 vSortFN := vFirstName;
    33 DBMS_OUTPUT.PUT_LINE(vLastName || ', ' || vFirstName);
    34 vPK := vPK+1;
    35 INSERT into ML4TEMPPERSON
    36 ( PK, LastName, SortLN, FirstName, SortFN)
    37 values
    38 (vPK, vLastName, vSortLN, vFirstName, vSortFN);
    39 end loop;
    40 IF (vPK > 0) THEN
    41 COMMIT;
    42 END IF;
    43 END;
    44 /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TESTPROC:
    LINE/COL ERROR
    25/3 PL/SQL: SQL Statement ignored
    25/15 PL/SQL: ORA-00942: table or view does not exist
    35/7 PL/SQL: SQL Statement ignored
    35/19 PL/SQL: ORA-00942: table or view does not exist
    SQL>

    Your table ML4TEMPPERSON doesn't exist in your second database, and you want do delete ans insert, may be in first database the table ML4TEMPPERSON exist
    Try this code. /* Formatted on 2009/05/21 09:10 (Formatter Plus v4.8.8) */
    SET SERVEROUTPUT ON SIZE 1000000;
    CREATE OR REPLACE PROCEDURE testproc
    AS
       vcount       NUMBER;
       vcmd         VARCHAR2 (2048);
       vlastname    VARCHAR2 (30);
       vfirstname   VARCHAR2 (30);
       vpk          INTEGER         := 0;
       vsortln      VARCHAR2 (30);
       vsortfn      VARCHAR2 (30);
       CURSOR cperson
       IS
          SELECT   lastname, firstname
              FROM generic.person
          ORDER BY lastname, firstname;
    BEGIN
       SELECT COUNT (*)
         INTO vcount
         FROM user_objects
        WHERE object_name = 'ML4TEMPPERSON';
       IF (vcount = 0)
       THEN
    /* NOTE: Omit semi-colon from command. */
          vcmd :=
             'create table ML4TEMPPERSON (PK integer not null, LastName varchar2(30), SortLN varchar2(30), FirstName varchar2(30), SortFN varchar2(30))';
          EXECUTE IMMEDIATE vcmd;
          vcmd :=
             'alter table ML4TEMPPERSON add (constraint XPKML4TEMPPERSON PRIMARY KEY (PK))';
          EXECUTE IMMEDIATE vcmd;
       END IF;
       vcmd := 'delete from ML4TEMPPERSON';
       EXECUTE IMMEDIATE vcmd;
       FOR p IN cperson
       LOOP
          vlastname := RPAD (p.lastname, 30, ' ');
          vfirstname := RPAD (p.firstname, 30, ' ');
          vsortln := vlastname;
          vsortfn := vfirstname;
          DBMS_OUTPUT.put_line (vlastname || ', ' || vfirstname);
          vpk := vpk + 1;
          vcmd :=
                'INSERT into ML4TEMPPERSON
    ( PK, LastName, SortLN, FirstName, SortFN)
    values
             || vpk
             || ', '
             || vlastname
             || ','
             || vsortln
             || ','
             || vfirstname
             || ','
             || vsortfn
             || ')';
          EXECUTE IMMEDIATE vcmd;
       END LOOP;
       IF (vpk > 0)
       THEN
          COMMIT;
       END IF;
    END;
    /Edited by: Salim Chelabi on 2009-05-21 06:12

  • Compile debug causes package to become invalid

    We're running 10.2.0.4.0 and I have a large package (7730 lines) which compiles fine on it's own. However, if I try to enable debug mode, I get an error:
    SQL> alter package mypkg compile debug package;
    Warning: Package altered with compilation errors.
    SQL> show errors;
    No errors.
    If I perform another alter command without the debug parameter, then it compiles fine:
    SQL> alter package mypkg compile package;
    Package altered.
    Also, if I compile this package using the "Compile for Debug" button in SQL Developer then I actually get an error message:
    Error(1): PLS-00707: unsupported construct or internal error [2603]
    Does anyone have any idea what's going on here? I've spent the past couple days searching for a solution and while I've seen many cases of people having the PLS-00707 error, I wasn't able to find anyone who only receives it when compiling for debug.

    SQL> CONN SCOTT
    Connected.
    SQL> SELECT * fROM V$VERSION;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE 9.2.0.1.0 Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    SQL> ALTER PACKAGE P1 COMPILE DEBUG;
    Package altered.
    SQL> alter session set events='10938 trace name context level 14';
    Session altered.
    SQL> SELECT P1.ADD_NUM(5,6) FROM DUAL;
    SELECT P1.ADD_NUM(5,6) FROM DUAL
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    SQL> SELECT NAME FROM V$DATABASE;
    SELECT NAME FROM V$DATABASE
    ERROR at line 1:
    ORA-03114: not connected to ORACLE
    SQL> SELECT SYSDATE FROM DUAL;
    SELECT SYSDATE FROM DUAL
    ERROR at line 1:
    ORA-03114: not connected to ORACLE
    can one tell me how to solve this problem? thanks in advance.

  • Database Hung problem in Oracle9i Enterprise Edition Release 9.2.0.7.0

    Hello,
    I am using the Oracle9i Enterprise Edition Release 9.2.0.7.0. Our database suddenly get hung and we need to give a Hard reset.
    Following are errors are in listener log.
    TNS-12571: TNS:packet writer failure
    27-OCT-2008 00:33:00 * service_died * nm45 * 12571
    TNS-12571: TNS:packet writer failure
    27-OCT-2008 00:33:13 * CONNECT_DATA=(SERVICE_NAME=<Service>)(SID=NM45)(SDU=2048)(CID=(PROGRAM=<EXE>)(HOST=<Host>(USER=<User>))) * (ADDRESS=(PROTOCOL=tcp)(HOST=<IP>)(PORT=<Port>)) * establish * <DB> * 12560
    TNS-12500: TNS:listener failed to start a dedicated server process
    TNS-12537: TNS:connection closed
    TNS-12560: TNS:protocol adapter error
    TNS-00507: Connection closed
    32-bit Windows Error: 109: Unknown error
    Error in Oracle trace:
    ORACLE V9.2.0.7.0 - Production vsnsta=0
    vsnsql=12 vsnxtr=3
    Windows 2000 Version 5.2 Service Pack 1, CPU type 586
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    Windows 2000 Version 5.2 Service Pack 1, CPU type 586
    Instance name: <SID>
    Redo thread mounted by this instance: 1
    Oracle process number: 30
    Windows thread id: 1172, image: ORACLE.EXE
    *** 2008-10-27 00:54:04.300
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    *** 2008-10-27 01:14:38.175
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    *** 2008-10-27 01:22:48.894
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    *** 2008-10-27 01:39:21.800
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    *** 2008-10-27 01:50:40.910
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    *** 2008-10-27 02:39:51.285
    async error encountered when answering new connection:
    NS Primary Error: TNS-12560: TNS:protocol adapter error
    What could be the reason.
    Regards
    Hemant

    Hello Hemant,
    Thanks for the response. Following error are in sqlnet.log. We are using the static id.
    Fatal NI connect error 12560, connecting to:
    (LOCAL=NO)
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 9.2.0.7.0 - Production
         Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 9.2.0.7.0 - Production
         Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 9.2.0.7.0 - Production
    Time: 27-OCT-2008 00:33:13
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    Regards
    Hemant.

  • SQL 2012 AlwaysOn cluster IP not moving after failover, causing database to be read-only

    SQL Server Cluster Name: SQLDAG01
    SQL Server Cluster IP: 10.0.0.50
    Cluster Listener IP: 10.0.0.60
    Node 1 Name: SQL01
    Node 1 IP: 10.0.0.51
    Node 2 Name: SQL02
    Node 2 IP: 10.0.0.52
    Everything is fine when SQL01 is the primary. When failing over to SQL02, everything looks fine in the dashboard but for some reason the cluster IP, 10.0.0.50, is stuck on node 1. The databases are configured to provide secondary read access. When executing
    a query on SQLDAG01, I get an error that the database is in read-only mode. Connectivity tests verify that SQLDAG01, 10.0.0.50, connects to SQL01 even though SQL02 is now the primary.
    I've been Googling this for the better part of the day with no luck. Any suggestions? Is there a Powershell command force the cluster IP to move to the active node or something? Also I'm performing the failover as recommended, from Management Studio connected
    to the secondary node.

    This was the answer, it had been setup to use the cluster name instead of the application name. Whoever installed Sharepoint connected it to SBTSQLDAG01 instead of SHAREPOINT01. Once we changed Sharepoint to connect to SHAREPOINT01, the failover worked as
    expected. We did have a secondary issue with the ARP cache and had to install the hotfix from http://support.microsoft.com/kb/2582281 to resolve it. One of the Sharepoint app servers was failing to
    ping the SQL node after a failover, the ARP entry was stuck pointing to the previous node. This article actually helped a lot resolving that: http://blog.serverfault.com/2011/05/11/windows-2008-and-broken-arp/
    One thing I did notice is that the SQL failover wizard does not move cluster groups "Available Storage" and "Cluster Group", I had to move those through the command line after using the wizard. I'm going to provide the client with a Powershell script that
    moves all cluster groups when they need to do a manual failover. This also happens to be why the Sharepoint issue started, "Cluster Group" is what responds to the cluster name SBTSQLDAG01. Moving that group over to the node that has the active SQL cluster
    group also made it work properly, but using the application name is the correct method.
    Thanks everyone for all your help. Although the nitpicking about terminology really didn't help, that was a pointless argument and we really could have done without it. Yeah I know 2008 called is "Failover Cluster Manager" and MSCS is the "2003 term" but
    really, they're basically the same thing and we don't really need to derail the conversation because of it. Also, If you look at the screenshot below you can clearly see "AlwaysOn High Availability" in SQL Management Studio. That's what it's called in SQL,
    that's where you do all the work. Trying to tell me it's "not a feature" is wrong, pointless, and asinine, and doesn't get us anywhere.
    Sorry it took so long to get back, I was off the project for a couple weeks while they were resolving some SAN issues that caused the failover to happen in the first place.

  • Bad performance: Xpath View causes database server almost 100% cpu

    Hi there,
    Since I am rather inexperienced in using the Oracle XML DB I wonder If I am doing wrong with the following:
    I created a table with a xmltype column in it:
    CREATE TABLE LPD_LOAD_XML
    FILENAME VARCHAR2(50 BYTE) NOT NULL,
    XML_CONTENT SYS.XMLTYPE,
    DATE_CREATED DATE DEFAULT sysdate NOT NULL,
    CREATED_BY VARCHAR2(30 BYTE) DEFAULT user NOT NULL
    and I am using a xpath query to retrieve the data which is stored in the xmltype column:
    select extractvalue(value(p),'/medobj@barcode') barcode
    , extractvalue(value(p),'/medobj@VJ') vj
    , extractvalue(value(p),'/medobj@FNF') fnf
    , extractvalue(value(p),'/medobj@GLB') glb
    , cast ( multiset ( select extractvalue(value(q),'/author@cap') cap
    , extractvalue(value(q),'/author/name/addpre') addpre
    , extractvalue(value(q),'/author/name/fname') fname
    , extractvalue(value(q),'/author/name/prefix') prefix
    , extractvalue(value(q),'/author/name/lname') lname
    , extractvalue(value(q),'/author/name/addapp') addapp
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/author'))) q
    ) as authors_type_nst
    ) as authors_type
    , cursor(select extractvalue(value(q),'/corp.author') corp_author
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/corp.author'))) q
    , extractvalue(value(p),'/medobj/isbd/auti') auti
    , extractvalue(value(p),'/medobj/isbd/edition') edition
    , cursor(select extractvalue(value(q),'/impressum/pofpublication') pofpublication
    , extractvalue(value(q),'/impressum/publisher') publisher
    , extractvalue(value(q),'/impressum/pyr') pyr
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/isbd/impressum'))) q
    , extractvalue(value(p),'/medobj/isbd/collation/extent') extent
    , extractvalue(value(p),'/medobj/isbd/collation/illustration') illustration
    , extractvalue(value(p),'/medobj/isbd/collation/size') size_
    , extractvalue(value(p),'/medobj/isbd/collation/enclosure') enclosure
    , cursor(select extractvalue(value(q),'/series/series.title') series_title
    , extractvalue(value(q),'/series/series.nr') series_nr
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/isbd/series'))) q
    , extractvalue(value(p),'/medobj/isbd/part') part
    , extractvalue(value(p),'/medobj/isbd/annotation') annotation
    , extractvalue(value(p),'/medobj/isbdblock') isdbblock
    , extractvalue(value(p),'/medobj/isbn/t') isbn_t
    , extractvalue(value(p),'/medobj/isbn/d') isbn_d
    , extractvalue(value(p),'/medobj/isbn/uh') isbn_uh
    , cursor(select extractvalue(value(q),'/isbn2/t') isbn2_t
    , extractvalue(value(q),'/isbn2/d') isbn2_d
    , extractvalue(value(q),'/isbn2/uh') isbn2_uh
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/isbn2'))) q
    , cursor(select extractvalue(value(q),'/label') label
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/label'))) q
    , extractvalue(value(p),'/medobj/ppn') ppn
    , cursor(select extractvalue(value(q),'/note') note
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/note'))) q
    , extractvalue(value(p),'/medobj/sysreq') sysreq
    , extractvalue(value(p),'/medobj/mat') mat
    , extractvalue(value(p),'/medobj/lang.content') lang_content
    , cursor(select extractvalue(value(q),'/siso@type') siso_type
    , extractvalue(value(q),'/siso@rank') siso_rank
    , extractvalue(value(q),'/siso') siso
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/siso'))) q
    , cursor(select extractvalue(value(q),'/subject@rank') rank
    , extractvalue(value(q),'/subject') subject
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/subjectheading/subject'))) q
    , cursor(select extractvalue(value(q),'/genre/genre.full') genre_full
    , extractvalue(value(q),'/genre/genre.abbr') genre_abbr
    , extractvalue(value(q),'/genre/genre.cd') genre_cd
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/genre'))) q
    , extractvalue(value(p),'/medobj/agecat') agecat
    , extractvalue(value(p),'/medobj/readinglevel') readinglevel
    , extractvalue(value(p),'/medobj/avi') avi
    , extractvalue(value(p),'/medobj/review') review
    , extractvalue(value(p),'/medobj/reviewer') reviewer
    , cursor(select extractvalue(value(q),'/cover') cover
    from TABLE(xmlsequence(EXTRACT(value(p),'medobj/cover'))) q
    from lpd_load_xml i
    , TABLE(xmlsequence(EXTRACT(i.xml_content,'bmo/medobj'))) p
    where i.filename = b_FileName
    You can see that I am using both CAST MULTISET and a cursor, since I am finding out the best way. I have to use either one because the xml is stored in a hierarchical way. But now i am lost. What is most surprising to me is that the database server is really 100% dedicated in mastering this query. Is there anyway to avoid this? How can I retrieve the data in the xml file from within the database without causing a slow performance?
    Greets,
    William de Ronde

    Have you created indexes on the XMLtype Column? Either way, if i am not mistaken then your XMLType column will default to XMLType CLOB storage. This will cause that your XML data will be put completly into memory regarding the inbetween resultsets. Use dmbs_xplan procedure, autotrace on (in sqlplus) or tkprof tools to find out whats happening. Did you generate statistics on your table via DBMS_GATHER_STATS package (don't use the analyze statment) ?

  • Too many open files in system cause database goes down

    Hello experts I am very worry because of the following problems. I really hope you can help me.
    some server features
    OS: Suse Linux Enterprise 10
    RAM: 32 GB
    CPU: intel QUAD-CORE
    DB: There is 3 instances RAC databases (version 11.1.0.7) in the same host.
    Problem: The database instances begin to report Error message: Linux-x86_64 Error: 23: Too many open files in system
    and here you are other error messages:
    ORA-27505: IPC error destroying a port
    ORA-27300: OS system dependent operation:close failed with status: 9
    ORA-27301: OS failure message: Bad file descriptor
    ORA-27302: failure occurred at: skgxpdelpt1
    ORA-01115: IO error reading block from file 105 (block # 18845)
    ORA-01110: data file 105: '+DATOS/dac/datafile/auditoria.519.738586803'
    ORA-15081: failed to submit an I/O operation to a disk
    At the same time I search into the /var/log/messages as root user and I the error notice me the same problem:
    Feb 7 11:03:58 bls3-1-1 syslog-ng[3346]: Cannot open file /var/log/mail.err for
    writing (Too many open files in system)
    Feb 7 11:04:56 bls3-1-1 kernel: VFS: file-max limit 131072 reached
    Feb 7 11:05:05 bls3-1-1 kernel: oracle[12766]: segfault at fffffffffffffff0 rip
    0000000007c76323 rsp 00007fff466dc780 error 4
    I think I get clear about the cause, maybe I need to increase the fs.file-max kernel parameter but I do not know how to set a good value. Here you are my sysctl.conf file and the limits.conf file:
    sysctl.conf
    kernel.shmall = 2097152
    kernel.shmmax = 17179869184
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 6553600
    net.ipv4.ip_local_port_range = 1024 65000
    net.core.rmem_default = 4194304
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 4194304
    limits.conf
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536

    process limit
    bcm@bcm-laptop:~$ ulimit -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 20
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 16382
    max locked memory       (kbytes, -l) 64
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) 8192
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) unlimited
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited

  • Creating trigger using database link

    I need to create the trigger from local server B using Dblink(whereas the dblink points to the remote server A)
    Action of the trigger:
    After every insertion of the record in the 'Table1' from the Remote DB Server A , the newly inserted record should parallely inserted into the 'Table 2' of the local server B
    Kindly help me out to do
    _ BY
    Rajan

    I tried to create the trigger but it throws like DDL operations are not allowed in the remote database.
    Following is the script, I have tried
    CREATE OR REPLACE TRIGGER ROUTE_TRIGGER AFTER INSERT ON ROUTEDECISION@DBLINK1
    FOR EACH ROW
    DECLARE
    BEGIN
    INSERT INTO routedecision_rptdb(a1,a2) values(:new.a1,:new2.a2);
    END;

Maybe you are looking for