DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: ora-04021 during import

  1. #1
    Join Date
    Oct 2005
    Posts
    90

    ora-04021 during import

    Hi Guys,
    I am doing an import during which i got this error .

    IMP-00017: following statement failed with ORACLE error 4021:
    "GRANT EXECUTE ON "VCP_PMC_PKG" TO "HERNANDEZO""
    IMP-00003: ORACLE error 4021 encountered
    ORA-04021: timeout occurred while waiting to lock object NCC.VCP_PMC_PKG.

    SQL> SELECT * FROM v$access WHERE object = 'VCP_PMC_PKG';

    SID OWNER
    ---------- ----------------------------------------------------------------
    OBJECT
    --------------------------------------------------------------------------------
    TYPE
    ------------------------
    174 NCC
    VCP_PMC_PKG
    PACKAGE

    SQL> select oracle_username, os_user_name,locked_mode,object_name,object_type
    from v$locked_object a, dba_objects b
    where a.object_id=b.object_id;
    2 3
    no rows selected.

    how to get rid of this error?

    Thanks in advance.

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    somoene is trying to use it, stop all sessions before your import

  3. #3
    Join Date
    Oct 2005
    Posts
    90
    No users are connected to it as its not live (db) yet.So should i bounce the db and reimport once again.My parfile is
    userid='/ as sysdba'
    buffer=500000000
    full=y
    ignore=y
    rows=n
    indexes=y
    constraints=y
    grants=y
    log=imp_VCP01I2.log
    statistics=none
    commit=y
    do i have to drop indexes and reimport it once again?

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Assuming the only error you got was the GRANT EXECUTE... one you do not have to re-import everything, specially 'cause it looks like a full exp/imp

    Just import NCC schema fromuser/touser with ROWS=NO, IGNORE=YES options

    By the way... somebody was using that package at the time you attempted to grant the privilege.
    Last edited by PAVB; 04-30-2007 at 04:47 PM.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    Oct 2005
    Posts
    90
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width