Procedure crashes while create or replace!

Dear all,

My Oracle 11 g RAC database is.

I made some changes in one of my procedure and tried to recreate it using the CREATE or REPLACE procedure...

The statement hangs for a long time and simultaneity in OEM increases up to a very high level. I tried to find blocking sessions, but for some time, there was no session blocking.

I also tried to stop the activities on the tables used in this procedure.

Please suggest me what can I do in this situation. I also tried directly from the server running the query.

Best regards, Imran

Oh, layout of the dining Forum, I copied correctly ;)

In fact, it is not equal to '<>' operator & no '=' equql, please correct & let me know if useful

Once again his lack below, will give you session killin commnd

Select / * + CHOOSE * / ' alter system kill session "' | a.SID | ',' | a.Serial #| " « ; »
session v$, $ v b access
where a.sid = select
and b.type<>'does not EXIST.
and (b.owner is not null) and (b.owner<>'SYSTEM') and (b.owner<>'SYS') and serial No. <> 1
and upper (b.object) like '% VSNL_CORP_TASK_READY_CMPL % ';

Thank you
Ajay more
http://moreajays.blogspot.com

Tags: Database

Similar Questions

  • Procedure crashes and closes with ORA-04021: timeout period exceeded while waiting for

    Hello

    I am facing a problem in which calling a procedure in a package hangs in "EXECUTE IMMEDIATE" and after a long time out with ORA-04021: timeout period exceeded while waiting.
    I faced the problem in an existing package. Then, I tried a little test and could reproduce the problem.
    Test script is:
    kallo:DZHLHFC1> cat test.sql
    
    CREATE OR REPLACE PACKAGE BODY timeout_test AS
        PROCEDURE execute_immediate( p_cmd VARCHAR2 );
    
        PROCEDURE execute_immediate( p_cmd VARCHAR2 ) IS
        BEGIN
            EXECUTE IMMEDIATE p_cmd;
        EXCEPTION
            WHEN OTHERS THEN
                dbms_output.put_line( 'Command failed: '||p_cmd );
                dbms_output.put_line( 'SQL error message is: ' || SQLERRM );
        END;
    
        PROCEDURE revoke_priv(p_object_name VARCHAR2) IS
            l_cmd VARCHAR2(1000);
        BEGIN
            l_cmd := 'REVOKE EXECUTE ON "TIMEOUT_TEST" FROM "CSG_SUPP_LHOWNER_WRITE"';
            execute_immediate(l_cmd);
        END;
    
    END timeout_test;
    /
    show err
    TIMING START
    REVOKE EXECUTE ON "TIMEOUT_TEST" FROM "CSG_SUPP_LHOWNER_WRITE"; -- Check if command is syntactically correct
    TIMING SHOW
    
    set serverout on size 100000
    TIMING SHOW
    exec timeout_test.revoke_priv('TIMEOUT_TEST');
    TIMING SHOW
    When it is running, I get after release:
    Package created.
    
    Package body created.
    
    REVOKE EXECUTE ON timeout_test FROM "CSG_SUPP_LHOWNER_WRITE"
    *
    ERROR at line 1:
    ORA-01927: cannot REVOKE privileges you did not grant
    
    Elapsed: 00:00:00.01
    Elapsed: 00:00:00.02
    Command failed: REVOKE EXECUTE ON "TIMEOUT_TEST" FROM "CSG_SUPP_LHOWNER_WRITE"
    SQL error message is: ORA-04021: timeout occurred while waiting to lock object
    LHOWNER.TIMEOUT_TEST
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:15:03.03
    I did some analysis and conclusions next concluded that it hangs in "EXECUTE IMMEDIATE".
    1 TOAD "browser session" shows the current statement for this session as a course of execution with "EXECUTE IMMEDIATE"
    2. no lock appear in "browser"->"tab locks session."
    3. If I comment "EXECUTE IMMEDIATE", it comes quickly.

    Is - this problem with a programming or an oracle bug?

    Thank you and best regards,
    Hey

    Hello

    I think I found the reason.
    I'm changing the grants on the same package (TIMEOUT_TEST) which I am running.
    If I change object_name in order that it works.

    Kind regards
    Hey

  • SQL &gt; create or replace procedure sp_Validate3 (p_acr_no IN varchar2 2)

    Hi all

    11.2.0.1

    Can you help me to debug what is that pl/sql code error? Thank you
    SQL> create or replace procedure sp_Validate3(p_acr_no    IN  varchar2
      2                                         ,p_recordset OUT sys_refcursor
      3                                         ) as
      4  begin
      5   open p_recordset for
      6      select am.acr_no as acr_no
      7            ,'TEST' as lastname
      8            ,nvl(a.or_no,'0') as ecc_orno
      9            ,nvl(b.or_no,'0') as rp_orno
     10            ,nvl(c.or_no,'0') as ar_orno
     11      from   tab t
     12                        join acr_master     am on (trim(acr_no) = p_acr_no)
     13             left outer join payment_master a  on (payment_type = 'ECC' and trim(acr_no) = p_acr_no)
     14             left outer join payment_master b  on (payment_type = 'RP'  and trim(acr_no) = p_acr_no)
     15             left outer join payment_master c  on (payment_type = 'AR'  and trim(acr_no) = p_acr_no);
     16  end;
     17  / 
     
    Warning: Procedure created with compilation errors.
     
    SQL> show error
    Errors for PROCEDURE SP_VALIDATE3:
     
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    6/5      PL/SQL: SQL Statement ignored
    13/80    PL/SQL: ORA-00918: column ambiguously defined
    SQL>
    create table acr_master(acr_no varchar2(10))
    
    drop table payment_master
    
    create table payment_master(or_no varchar2(10),acr_no varchar2(10),payment_type varchar2(10))
    
    /* Formatted on 06/06/2013 6:06:58 PM (QP5 v5.126.903.23003) */
    CREATE OR REPLACE PROCEDURE sp_Validate3 (p_acr_no      IN     VARCHAR2,
                                              p_recordset      OUT sys_refcursor)
    AS
    BEGIN
       OPEN p_recordset FOR
          SELECT   am.acr_no AS acr_no,
                   'TEST' AS lastname,
                   NVL (a.or_no, '0') AS ecc_orno,
                   NVL (b.or_no, '0') AS rp_orno,
                   NVL (c.or_no, '0') AS ar_orno
            FROM               tab t
                            JOIN
                               acr_master am
                            ON (TRIM (acr_no) = p_acr_no)
                         LEFT OUTER JOIN
                            payment_master a
                         ON (payment_type = 'ECC' AND TRIM (acr_no) = p_acr_no)
                      LEFT OUTER JOIN
                         payment_master b
                      ON (payment_type = 'RP' AND TRIM (acr_no) = p_acr_no)
                   LEFT OUTER JOIN
                      payment_master c
                   ON (payment_type = 'AR' AND TRIM (acr_no) = p_acr_no);
    END;
    /
    
    SQL> show error
    Errors for PROCEDURE SP_VALIDATE3:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    6/5      PL/SQL: SQL Statement ignored
    13/80    PL/SQL: ORA-00918: column ambiguously defined
    SQL>
    
    --In the below code after keeping alias names of the tables, the procedure compiled successfully 
    
    /* Formatted on 06/06/2013 6:06:58 PM (QP5 v5.126.903.23003) */
    CREATE OR REPLACE PROCEDURE sp_Validate3 (p_acr_no      IN     VARCHAR2,
                                              p_recordset      OUT sys_refcursor)
    AS
    BEGIN
       OPEN p_recordset FOR
          SELECT   am.acr_no AS acr_no,
                   'TEST' AS lastname,
                   NVL (a.or_no, '0') AS ecc_orno,
                   NVL (b.or_no, '0') AS rp_orno,
                   NVL (c.or_no, '0') AS ar_orno
            FROM               tab t
                            JOIN
                               acr_master am
                            ON (TRIM (acr_no) = p_acr_no)
                         LEFT OUTER JOIN
                            payment_master a
                         ON (a.payment_type = 'ECC' AND TRIM (a.acr_no) = p_acr_no)
                      LEFT OUTER JOIN
                         payment_master b
                      ON (b.payment_type = 'RP' AND TRIM (b.acr_no) = p_acr_no)
                   LEFT OUTER JOIN
                      payment_master c
                   ON (c.payment_type = 'AR' AND TRIM (c.acr_no) = p_acr_no);
    END;
    /
    
  • Ampersand substitution in create or replace procedure statement

    Hi guys,.

    I wonder why my replacement ampersand works in a create or replace statement of the stored procedure.

    CREATE OR REPLACE PROCEDURE UPDATE_DIM_SALES AS


    Cancel the DEFINITION DimSales;
    Cancel the DEFINITION FactTable;
    SET DimSales = 'TESTTAB;
    SET FactTable = myfact;


    BEGIN
    *...*

    Error (5,20): PLS-00103: encountered the symbol "=" when expected as follows: =. (@ %; not null default range character)


    If I assign the value with: = I get the error "invalid table" thereafter for the statemnt of INSERTION:

    CREATE OR REPLACE PROCEDURE UPDATE_DIM_SALES AS


    Cancel the DEFINITION DimSales;
    Cancel the DEFINITION FactTable;
    SET DimSales: = ' x 2';
    SET FactTable: = ' x 1';


    BEGIN
    INSERT INTO & DimSales (column1, column2,...)

    Why not the ampersand substitution work in a stored procedure?

    No problem with the carpet. Display. But you don't need to create and drop them again. Simply create a time and refresh just before departure if necessary. I expect the creation and updating of points of view is fast comparibly. Also access to the seller_id should be indexed.

    Your original pl/sql block is slow due to several reasons. One might be that you agree to each line. Engage is an extremely slow process. He avoid as much as possible. Another part might be that you make all the changes of context of pl/sql. The obvious way to avoid this would be to BULK operations (bulk-select + Forall). It is not so difficult. The size of the collection must be limited to a lower amount.

    Best way would be to measure the performance of pl/sql parts using a tool such as DBMS_PROFILER. Then you can decide what part is slow and must be granted.

    A simple insert could be faster. Did you test that?

    example not tested

    INSERT /*+append */
    INTO &DimSales (K_Sales,REG,BVL,DS, VS,RS,GS,VK)
    (SELECT trim(leading '0' from RS||GS) ,REG, BVL,DS, VS,RS,GS,VK
    from &FactTable f
    join &testsales s on f.SellerNo =s.Seller_No;
    
    commit;
    

    You can run the other issues, but this is generally the fastest approach. Try to avoid the separate if possible. This requires a sort and will slow down the insert of a lot.

    Published by: Sven w. on November 30, 2010 17:10

  • iMovie crashes while editing video clip

    Hello

    Whenever I try to edit a video clip in the library on imovie, just put my cursor over them to view the clip causes my imovie crashing. It's a lenghy-er clip, long of only 6 min. except that everything works fine. I have imovie and the latest OS. Any suggestion would be great, thanks.

    iMovie crashes while I have it change. Any ideas on how to solve this problem?

    "If the accident happens when you change a particular clip then remove and re-import the clip. If it happens on several clips then I copy all the items in the timeline panel, create a new project and paste there the clips. If it persists in the new project try to open iMovie, hold down the command and option and delete the preferences. "(Jim Wanamaker - June 8, 2016)

  • iMovie crashes while I have it change. Any ideas on how to solve this problem?

    iMovie crashes while I have it change. Any ideas on how to solve this problem? It may be a file corrupted in the movie, but I still wouldn't be able to delete it in iMovie because it crashes. I'm pretty well stuck unless one of you could help out. I would really appreciate it.

    I tried also to edit a very old video and no crashes here so I don't know if it is a corrupt file. I don't know how to access.

    If the failure occurs when you change a particular clip then remove it and re-import that clip. If it happens on several clips then I copy all the items in the timeline panel, create a new project and paste there the clips. If it persists in the new project try to open iMovie, hold down the command and option and delete the preferences.

  • five out of six times (approximately) to start outlook express 6, it crashes while trying to access the first message

    five out of six times (approximately) to start outlook express 6, it crashes while trying to access the first message. This happens several times, and each time the first message (even) appears in the Inbox, even if the process is not complete. sometimes clear the cache, or cleaning IE temp. the files seems to help - but not always.

    It's VERY frustrating!

    Do a household.
     
    1: do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.
     
    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095
     
    2: after you're done, followed by compacting your folders manually while working * off * and do it often.
     
    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.
     
    3: disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the processors and causes a multitude of problems such as time-outs and account setting changes. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3
     
    For some programs, turning it off is not enough. You may need to uninstall and reinstall in custom Mode and remove the analysis when e-mail messages.
  • Synonym of ALTER with Create or replace synonym

    Oracle 9i Release 2 database

    I need to change the thesaurus during execution to point to a new owner of the table. But I'm running into errors of "insufficient privileges".

    SQL> select grantee,owner,table_name,privilege from dba_tab_privs
      2  where table_name IN ('OE4PNFGETDATA','OEBGGETDATA','OEGETDATA');
    
    GRANTEE       OWNER     TABLE_NAME        PRIVILEGE
    ------------- --------- ----------------- -----------
    OEMUSER       OEM2      OE4PNFGETDATA     EXECUTE
    OEMUSER       OEM2      OEBGGETDATA       EXECUTE
    OEMUSER       OEM2      OEGETDATA         EXECUTE
    OEMUSER       OEM1      OEBGGETDATA       EXECUTE
    OEMUSER       OEM1      OEGETDATA         EXECUTE
    OEMUSER       OEM1      OE4PNFGETDATA     EXECUTE
    
    SQL> sho user
    USER is "OEMUSER"
    SQL> select synonym_name,table_owner,table_name from user_synonyms ;
    
    SYNONYM_NAME                   TABLE_OWNER                    TABLE_NAME
    ------------------------------ ------------------------------ ------------------------------
    OE4PNFGETDATA                  OEM1                           OE4PNFGETDATA
    OEBGGETDATA                    OEM1                           OEBGGETDATA
    OEGETDATA                      OEM1                           OEGETDATA
    
    

    I need to change the owner of the table to OEM2. Using create or replace synonym in a procedure:

    CREATE OR REPLACE PROCEDURE oemuser.p_switch_users (  i_nonactive_user  IN  VARCHAR2
                                                        , o_msg             OUT VARCHAR2 )
    AS
       v_synonym_name VARCHAR2(30) ;
       v_table_owner  VARCHAR2(30) := i_nonactive_user ;
       v_table_name   VARCHAR2(30) ;
       v_sql          VARCHAR2(255);
    BEGIN
       FOR   rec   IN   ( select synonym_name, table_owner, table_name from user_synonyms )
       LOOP
          v_synonym_name := rec.synonym_name ;
          v_table_name   := rec.table_name   ;
          v_sql := 'CREATE OR REPLACE SYNONYM ' || v_synonym_name || ' FOR ' || v_table_owner || 
                   '.' || v_table_name ;
          EXECUTE IMMEDIATE v_sql ;
    
       END LOOP ;
       
       o_msg := 'Completed successfully' ;
       
       EXCEPTION
          WHEN  others  THEN
             o_msg := 'Error_Stack...' || Chr(10) ||
                      DBMS_UTILITY.FORMAT_ERROR_STACK ;
             RAISE ;
    END p_switch_users ;
    /
    
    var o_msg varchar2(512)
    var i_user varchar2(10)
    exec :i_user := 'OEM2'
    
    exec p_switch_users(:i_user,:o_msg)
    
    ORA-01031: insufficient privileges
    ORA-06512: at "OEMUSER.P_SWITCH_USE
    RS", line 
    
    

    I have not tried to drop the synonyms and re - create, but I expect the same error. Any suggestions?

    Hello

    the owner of the procedure should the privilege of creating its own synonyms if i_nonactive_user is defined on its own behalf (this case has no interest), and he has the privilege to create ANY synonym in other... At first glance, I would say that this is not a good idea.

    Note: you can also save a job: no need to redefine a synonym to point to the same thing, so I would limit synonyms selected in the loop:

    FOR rec IN (SELECT u.synonym_name, u.table_owner, u.table_name

    U user_synonyms

    WHERE u.table_owner! = v_table_owner

    )

    Best regards

    Bruno Vroman

  • How to create multiple thumbnail images while creating the Image assets

    Hi all!


    I have a requirement to create several thumbnail images (of different sizes), while creating new assets of image. These vignettes must be associated with different attributes after the recording of assets. I thought you used miniature filter, but I read that it uses a library of swing, it's very very inefficient memory-wise and we can experience the memory leak and crashes with only a very limited number of images... Another solution is to set up the filter citing ImageMagick with a system exec: it's fast, it does not have the memory and it also generates a much greater quality of thumbnail image resizer that comes with swing.


    What do you think, and how can I implement this?


    Thank you very much!

    Hello Elena,

    We noticed some performance issues in our current client, so we changed the miniature filter by default:

    A temporary file is no longer used for the input image. The source image is used directly, because it is not changed by the thumbnail generator.

    This avoids some performance issues, we have detected. First of all, because of the way the image has been copied (a byte is read and written each time), and second, because of some file systems environments run badly.

    In addition, it relies on "deleteOnExit", which can produce an impact on the performance of the application server, as the JAVA virtual machine must maintain a list of files to delete when leaving, and which consumes memory. It is even more problematic on servers that are not restarted very often.  And if at the end the application server is not normally off, these files would not be removed.

    On the other hand it seems that the thumbnail generator is not necessary that the image source file ends with the extension of the right.

    Now we use the provided source image directly, it's a ".tmp" instead of a file (for example) the file ".gif".

    It will be useful,

    Gerardo

  • ORA-00600 while creating the queue table

    Hello
    I'm getting
    ERROR on line 1:
    ORA-00600: internal error code, arguments: [kcbz_check_objd_typ], [0], [0,]
    [1], [], [], [], []
    ORA-06512: at "SYS." DBMS_AQADM_SYS', line 2830
    ORA-06512: at "SYS." DBMS_AQADM', line 58
    ORA-06512: at line 2
    When creating table queue.
    The problem seems to be the name of the created object. Here's the script:

    CREATE OR REPLACE TYPE BNA_CHG_EVENT AS OBJECT
    (
    NUMBER (2),
    INTEGER ID
    );
    /

    (it works fine)

    BEGIN
    SYS. DBMS_AQADM. CREATE_QUEUE_TABLE
    (
    QUEUE_TABLE = > 'BNA_CHG_EVENT_QT '.
    , QUEUE_PAYLOAD_TYPE = > 'BNA_CHG_EVENT '.
    "Compatible = > ' 10.0.0 '.
    , SORT_LIST = > 'ENQ_TIME, PRIORITY '.
    , MULTIPLE_CONSUMERS = > TRUE
    , MESSAGE_GROUPING = 0 >
    , SECURE = > FALSE
    );
    End;
    /

    (it crashes with ora-600).
    When I change the name of BNA_CHG_EVENT_QT to the BNA_CHG_EVENT_OT object is created without errors.
    Database is Oracle Database 10 g Enterprise Edition Release 10.2.0.4.0.

    Any suggestions on the cause of the error?
    Thanks in advance

    ARO
    Kuba Gasiorowski

    ERROR on line 1:
    ORA-00600: internal error code, arguments: [kcbz_check_objd_typ], [0], [0,]
    [1], [], [], [], []
    ORA-06512: at "SYS." DBMS_AQADM_SYS', line 2830
    ORA-06512: at "SYS." DBMS_AQADM', line 58
    ORA-06512: at line 2

    Check on the support of Oracle
    If you have upgraded DB to 10g, check 8247215 Bug

    Workaround
    A temporary workaround is to set dbblock_check_objtyp = false

  • While creating a slide show with pictures, can you assign music to a specific set of photos? I would use 5 different pieces of music for every 5 parts of my slide show.

    While creating a slide show with pictures, can you assign music to a specific set of photos? I would use 5 different pieces of music for every 5 parts of my slide show.

    No, you can't.  One solution is to create 5 different slideshows and export them to the office where you can bring together them in a single quicktime movie file and use it.

    If you have a copy of iMovie 6 HD, it can be hacked to work with El Capitan. With it you can assign exactly music groups of slides in the slide show:

  • TDMS Create or Replace returns an error

    This example using FPGA (towards the end of the page):

    http://zone.NI.com/DevZone/CDA/tut/p/ID/11198#toc4

    Step #26 under FPGA section implements the open or create TDMS files.

    It always returns error #7 of the PDM create or replace VI.  When you create a new file, it should not return error "file not found".

    You are receving error 7 the path of the file that you specify. Make sure you use the correct path to the file. If you still have problems is an article in the knowledge base that may shed more light on what goes wrong.

    http://digital.NI.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF?OpenDocument

    Kind regards

    David has.

  • Win Server 2003 SP2. Backup starts and see errror message "error returned while creating the volume shadow copy: 0x8004230f.»

    Win Server 2003 SP2. Backup starts and see errror message "error returned while creating the volume shadow copy: 0x8004230f.» All solutions? CPP, Volume Shadow Copy Stallion are started.

    Thank you for visiting the Microsoft answers community.

    The question you have posted is related to Windows Server and would be better suited in the MS TechNet Windows Server Forum. Please visit this link to find a community that will provide the support you want.

  • . Help copying images - "cannot create or replace family photos. Access is denied.

    When I try to copy pictures from my computer to a Lexar removable I get this message. "Cannot create or replace family photos. Access is denied. Make sure that the disk is not full or write protected and this file is not currently in use. Please help, but keep it simple that I am barely computer literate

    Just a guess... but maybe you copied too
    files in the directory root of the card. (Root directory
    simply means level 1 with no folder)

    Remove files from the media, and then try again.

    For example I just tested a 1 GB SD card and the
    maximum number of files I can copy to the root
    Directory is 180. If I add a file more I get a dialog box
    who says: "cannot copy IMG_4321; The directory
    or file cannot be created. And if I try to add a file
    before removing a file to make room for it... I have
    Get the following message: "unable to create the folder.
    "New folder" failed to create the directory or file.

    If I make space by deleting files and add empty
    files to the card... I can copy as many files as I have
    here in the files (up to the limit of memory of)
    the card).

    I don't know if you noticed but most digital
    Cameras to create folders with 100 photos per folder.
    They do not image files in the root directory
    of the card.

  • My hard drive crashed and he was replaced. However, Windows 7 Premium replaced instead of Windows Pro. I now need a product code for windows 7 Premium. Can you help me, please?

    Original title: product key

    My hard drive crashed and he was replaced. However, Windows 7 Premium replaced instead of Windows Pro. I now need a product code for windows 7 Premium. Can you help me, please?

    See instructions to reinstall the correct version:

    How to: What are my options for Windows 7 reinstall media?

Maybe you are looking for