Locks on Packages!

Hello everybody,
I'm having a problem with a session that hung while running a process in which a package was invoked. The function of the package did nothing else than a SELECT on a table. Is the calling process the one that makes UPDATES/SELECTS/INSERTS...
Now, I tried to kill the session but it is onle "marked for kill", and I don't seem to be able to do anything with the package in question (the DB tells me the package is locked by session 'x'). How can a package be locked? Is there a way to unlock it? How could I force this session to be killed (it's been more than 12 hours since I tried to kill it).
Thank you very much. I really need some help here,
--oswaldo.
There's quite a lot info about detecting table/row lock. How about for package/procedure locking? I've encounting the problem many times when I try to recompile a package, but it's locked somewhere, and the recompilation just hang there till time out.
Does any one know how to detect the lock on package/procedure?
Thanks in advance.
/Minny

Hello,
Here you can find an article about the view DBA_DDL_LOCKS:
[http://www.praetoriate.com/int_40.htm]
If you don't have this view on the Data Dictionary, you may have
to execute the "OH/rdbms/admin/catblock.sql" script first.
Hope it can help.
Best regards,
Jean-Valentin

Similar Messages

  • Lock a package version ??

    Hi,
    I have to use wine version 20040615-1 for certain applications ( a must for me) to run. I cannot use any later version of wine, those applications will not work. Installing wine 20040615-1 was easy -- thanks to arch forum, however, now I cannot do a system upgarade.
    When I do pacman -Syu it tries to upgrade wine too.. Now I do not want wine to be upgraded and at present have to do "pacman -Syu --ignore wine".
    Now there can be some more packages which I do not want to upgrade, it will be really difficult to add all in the ignore list.
    Is there a better way ?  Can we lock a package version as we can do in synaptic ( debian/Ubuntu) ?
    Thanks in advance.
    Regards,
    Abhay

    Thanks tomk,
    Ignorepkg is definately a better way of retaining packages.
    Thanks again

  • Pkgchk command gives a message "Couldn't lock the package database"

    Hi All,
    I have observed that whenever my script file executes pkgchk command on Solaris 10 it gives the error message "Couldn't lock the package database". This was not the case with Solaris 9.
    I would like to know if this is a bug with Solaris 10 ? Does it impact on functionality ? Is there anyway to stop this message getting displayed ?
    Thanks.
    Regards,
    Hemil

    I think the error is referring to the /var/sadm/install/contents file. It may be because you have a confused packaging command still running, like pkgadd or pkgrm. In any case, this is not the right forum. For Solaris 10 problems you should contact Sun Support, though install-discuss at opensolaris.org might help.

  • Lock on package

    Hi All,
    I am unable to compile my package because of a lock being held on it . Let me provide the details for better clarity .
    select * from dba_ddl_locks where session_id=111 and owner='RAHUL';
    session_id  owner       name                type                           mode_held         mode_requested
    111           RAHUL     RAHUL_PKG        BODY                          NULL              None
    111           RAHUL     RAHUL_PKG     Table/Procedure/Type      NULL              NoneThe session details of the session id 111 is as below
    select sid,serial#,user#,username,command,status,process,sql_exec_start from v$session where sid=122
    sid          serial#          user#                   username                     command                             status                     process      SQL_EXEC_START
    111          3558             222                         RAHUL                      47                                   KILLED                   4420            13-DEC-12 02.00.00 AMThe strange this is that we have tried killing this session and the status above even shows ' 'KILLED', stilll the dba_ddl_locks is showing the lock details on the package RAHUL_PKG and we are unable to compile the package (the locking session is running since 13-Dec-2012 ) and we are unable to kill that . Also , is it like if i have executed a package that is referencing some other package then we wont be able to compile the referenced package until and unless the dependent package has completed its execution ??
    Thanks
    Edited by: Rahul K on Feb 13, 2013 10:59 PM

    The "+alter system kill session+" command does not terminate the session - it requests the session to terminate (likely via some IPC structure in the SGA).
    The session needs to be able to read this kill request - and terminate. So instead of killing the process, this command is more like a suicide request.
    In some cases the session itself is waiting on a call it made (blocking/synchronous call). Which means it simply cannot see that kill request. In which case the session is shown as killed, but still running, by the database.
    In such a case, one can kill the physical process (or thread on Windows) of that killed session. And at times, this is the only alternative when the blocking call on which that session waits, is stuck and not likely to ever return control back to the session.
    It is fairly safe to kill the (correct) physical process/thread this way. Oracle is pretty robust in that regard - and has its own internal management processes/threads that will detect that you have physically removed the session, and will clean up after it.

  • Locked incopy package

    Hi - I have made a mess, and hope you can help. Could not update my indesign file from the associated incopy package: it was one of my first attempts, and I think I may have moved location of my indesign file. Plus I could not check out file to make changes. So, I cancelled package, with the intention of 'placing' incopy file into indesign file, thereby achieving the same result. (I have done this before, when I ran into a similar problem.) However, when downloading the icap package I did not get the option to save contents, and they are effectively locked. I can open incopy, and then open the incopy file, but cannot use 'place' as I cannot open the package. How do I access the 'Contents' of the icap from indesign, so I can 'place'?
    Many thanks in anticipation!

    An InCopy package is just a glorified zip file. Just change the extension to zip and you'll be able to open it.
    Bob

  • Looking for package locking to avoid developing colisions

    Hi,
    I need a mechanism (either in database or some tool) which will allow me to lock the package for the time I am modifying it to prevent other developers from making changes at the same time. Is there such a mechanism built in Oracle it self or maybe you know some tool providing some functionality basing on some kind of repository?
    Thanks!
    Wojtek

    WojtusJ wrote:
    But if you are talking about version control software it's clear, I know that it is possiblethis way, I'm just looking for possible alternatives, becouse I don't need version control, the only thing needed is package locking mechanism for the modification time.There is no such thing (package locking mechanism) in the database.
    If you are using a tool that reads the source straight from the database (USER_SOURCE), allows you to edit it, and then save it by CREATE OR REPLACE - ing it back into the database, then yes you run a big risk that developers "overwrite" each others changes.
    The real solution to this problem is to not use the database as your environment of master sources, but instead use a version control system that uses a filesystem with lots of ascii-files as your master source environment.
    If you run into the problem only now and then, and find introducing a version control system a too heavy solution for your problem, then you could also look into developing a few DDL triggers (triggers that fire when you CREATE OR REPLACE something) that copy the current source into a 'backup'-table, before having it overwritten by the create-or-replace ddl command. Then you can always query your backup-table to get the overwritten source changes.
    Toon

  • Cannot import java.util.concurrent.locks ... WHY?

    Why is Xcode unable to find the java.util.concurrent.locks package. The class browser knows it exists. For example the entry for the ReentrantLock class looks like this in the browser class window:
    ReentrantLock (java.util.concurrent.locks)
    Xcode knows about other java.util packages such as java.util.ResourceBundle which I have been accessed successfully in other parts of my projecgt.
    Here is a source file and the resulting compiler error:
    The source file:
    // Foo.java
    import java.util.ResourceBundle;
    import java.util.concurrent.locks;
    public class Foo { }
    The compiler error:
    compile:
    Compiling 2 source files to /Users/Terry/Desktop/JAVA/PROJECTS/Logic/bin
    /Users/Terry/Desktop/JAVA/PROJECTS/Logic/src/Foo.java:3: cannot find symbol
    symbol : class locks
    location: package java.util.concurrent
    import java.util.concurrent.locks;
    ^
    1 error
    BUILD FAILED
    Help or hints would be greatly appreciated!

    Well the reason to your problem is very simple... java.util.concurrent.locks is a package... Not a class.
    if you want to import a specific class, the class should be written at the end like you did for import java.util.ResourceBundle; but if you want to import a whole package you need to add the little star at the end :
    import java.util.concurrent.locks.*;
    Or else, you only import the class you need :
    import java.util.concurrent.locks.ReentrantLock;

  • How to compile packge inside procedure which uses this package

    ORACLE 10g, 11g
    CREATE OR REPLACE PACKAGE PKG_TEST_COMMIT
    PROCEDURE Insert_into_table_T1;
    PROCEDURE Update_table_T1;
    END PKG_TEST_COMMIT;
    CREATE OR REPLACE PROCEDURE PROC_TEST_COMMIT As
    Begin
    PKG_TEST_COMMIT. Insert_into_table_T1; --insert data into table T1
    EXECUTE IMMEDIATE 'DROP table T1';
    EXECUTE IMMEDIATE
    'create table T1 as select ''1'', ''d'', ''s' from DUAL'; -- now package PKG_TEST_COMMIT in uncompiled stage
    -- compile package
    DBMS_DDL.alter_compile('PACKAGE', 'OWNER', 'PKG_TEST_COMMIT');
    PKG_TEST_COMMIT. Update_into_table_T1;
    End PROC_TEST_COMMIT;
    When I try to run PKG_TEST_COMMIT I’Ve got an error: can’t lock the package.
    I tried to create separate procedure for compilation, but result is the same.
    If I finish PROC_TEST_COMMIT before compiling, then compile – OK.
    Is there is a way to compile package inside the procedure?

    I need to automate the process which first call some procedure from the package, then invalidate this package by dropping and recreating the table (I didn't create the code, but I can see thepoint init - this is the farstest way to populate huge table) and then call another proc from the same package (using table just cretated).
    Otherwise I need human attention to this process. If it is imposible I can substitude "drop table and create table" for truncate and insert", but I am afraid it will take too long.

  • Timeout when I trying to compile Package

    Hi
    When I tried to compile package show me error:
    timeout ocurred while waiting to lock Schema.Mypackage

    1. Verify whether the package is locked by another user:
    SELECT * FROM v$access WHERE object = '<package>';
    If there a row is returned, the package is still locked.
    2. Use the SID which is returned and check in v$session which session is
    locking this package.
    SELECT SID, SERIAL#, OSUSER, USERNAME FROM V$SESSION WHERE sid = '<SID>
    3. If the session still is shown, use:
    ALTER SYSTEM KILL SESSION '<sid>, <serial#>';
    check the above work out.

  • Error 8 trying to open the free NI Lock-In download

    I downloaded the free NI Lock-In package to evaluate it for possible use with my multifunction DAQ card. I cannot open any of the VIs in the downloaded library. I get a LabVIEW load error code 8: could not load VI resource. I am running LabVIEW 5.0 on Windows NT4.0, but have the same problem on LabVIEW 5.1.1 on Windows 2000

    Hi,
    This error comes up when you try to open a VI that has been made with a version later than LabVIEW 5.1. And the Lock-IN amplifier Kit has been made for LabVIEW 6.1.
    Sincerely,
    Sastry V
    Applications Engineer
    National Instruments

  • Packages ASR(1.2) and SharedNetcofigIOSXR(1.0.1) for RME 4.1

    I can not install package ASR(1.2) because it require SharedNetconfigIOSXR(1.0.1) but in Download area I found only SharedNetconfigIOSXR(1.0).
    Is there any way to install it?

    My primary goal is to install latest ASR package, but when I try to install it I receive th next:
    C:\psu_download>psucli -p rme -i -src c:/psu_download/rme ASR
    Services might be restarted, as a result of install operation
    Would you like to continue ? ( Press y or n )
    y
    Proceeding with install..
    Loaded psu.properties..
    INFO: Installing for rme
    Locking the package repository...
    got all packages Repository
    Checking Dependencies...
    WARNING: ASR(1.2):Consistency check failed for base package SharedNetconfigIOSXR
    There are no Packages to be installed
    Released the Lock...
    No package(s) to install for Resource Manager Essentials
    C:\psu_download>psucli -p rme -d -dst c:/psu_download/rme SharedNetconfigIOSXR
    NMSROOT  = C:\Program Files\CSCOpx
    directory specified :C:\psu_download\rme
    Proxy Server is configured in CiscoWorks.
    If the Proxy Server requires authentication, you must enter Proxy Server Username and Password.
    Do you need to enter the Proxy Server Username and Password? (Press 'y' for Yes or 'n' for No)
    n
    Please specify Cisco.com credentials to connect to Cisco.com
    Enter Cisco.com Username: aserov
    Enter Cisco.com Password:
    Loaded VDS  Properties..
    Number of packages to be downloaded = 1
    None of the packages that you have specified for rme are available for download.
    I can download package SharedNetconfigIOSXR manualy thru the browser, but there is only version (1.0) and ASR(1.2) require (1.0.1)
    C:\psu_download>psucli -p rme -pdep -src c:/psu_download/rme ASR
    Checking for [rme] packages in c:/psu_download/rme ...
    got all packages Repository
    Package              Version    Depends on
    ASR                  1.2        SharedCdaIOSXR(1.0)
                                    SharedConfigNegatIOSRule(1.1)
                                    SharedInventoryRouter(2.2.7)
                                    SharedNetshowIOS(2.0.3)
                                    SharedConfigNegatIOSXRRule(1.0.1)
                                    SharedCredentialUpdaterIOSRule(1.2)
                                    SharedDcmaIOSXR(1.0.2)
                                    SharedPollerRouter(1.0)
                                    SharedCredentialUpdaterIOSXRRule(1.0.1)
                                    SharedCfgEditNegation(1.0)
                                    SharedNetconfigIOSXR(1.0.1)
                                    SharedNetconfigIOS(2.1)
                                    SharedSwimIOS(2.2.12)
                                    SharedNetshowIOSXR(1.0)
                                    SharedDcmaIOS(2.1.8)
                                    SharedSwimIOSXR(1.0.3)
                                    LibInventory(2.2.11)
                                    SharedCdaIOS(2.0)
                                    SharedCfgEditDiff(1.2)
    Thanks

  • How to use master locks in a process chain with planning sequence

    Hi,
    when I start a process chain which contains a planning sequence there is no master lock set. The chain stops and I get the message "Data in InfoProvider XYZ is locked by user TIMMAY". What can i do to enable the master locks?
    Thanks for your help!

    Hello,
    When a planning sequence is triggered via process chain system first first tries to set a normal lock and if this is possible, these selections are stored as master locks and then the normal locks are released.
    In your case if some data is already locked by another user the lock conflict will occur in teh first step only where system tries to create a normal lock before creating master locks.
    If Administrator wants to trigger the process chain he should ask other users to come out of the planning layouts so that all the locks are released and then trigger the chain and after this the system will set the master locks. Packaging in planning sequence process type won't help in setting master locks even if the data is locked by other user.
    Also, after master locks are deleted in RSPLSE, the transaction data remains protected by normal data locks during runtime. Nevertheless, without master locks it is no longer guaranteed that parts of planning sequences can be carried out without encountering lock conflicts with other users.
    Regards,
    Deepti

  • Serialized access for package compilation

    hi all,
    Especially for development environments i strongly need a concurrency mechanism for package, procedure, function, trigger compilation. I want to lock package, so that no one else can compile while i hold that lock. This will provide serialized access.
    Mostly developers use same database user for development, so grant will not do what i want. I assume there has to be a custom solution, ie using dbms_lock.
    Any help will be appreciated.

    Goman how are you, world is so little these days :)
    check these out, I hope they assist you -
    Is it Possible to lock a Package
    http://psoug.org/reference/dbms_lock.html
    http://asktom.oracle.com/pls/asktom/f?p=100:11:1044585173011869::::P11_QUESTION_ID:340617419132

  • Why does pacman lock the database during downloads?

    Something that's always irked me about pacman is the fact that it locks the package database during the download stages of package installation, before anything has actually been installed/committed. Is there a reason for this, and if not, would a suggestion/patch be acceptable?
    Here's the scenario I'm encountering right now:
    * Downloading large package in background
    * Need to upgrade flash player (YouTube no longer accepts an older version I suppose, and lolcats are a necessity)
    * I cannot do this quick upgrade due to the lock pacman has on the database while downloading said large package
    Last edited by itsbrad212 (2012-03-24 00:36:31)

    krigun wrote:
    Sounds reasonable, but the following scenario may or may not be a problem:
    You have package A B and C installed:
    Run pacman -Syu (huge download, all three packages updated)
    Simultaneously, you execute pacman -R A (basically modify the pacman DB)
    Package A updated (reinstalled) by first process
    Not sure how pacman is built, but it probably locks and reads the DB when started, and then does it's thing without worries. In any case, it does support resuming downloads, so you could just end the long running process, install whatever, and resume.
    I think it's the same with apt-get.
    That's an interesting point, although I'm guessing the package manager could check to make sure that all packages that it wants to update are present on the system right after it locks the db, and if for some (rare) reason that one is missing, skip it.
    hadrons123 wrote:
    What is that large package which you think is that big?
    I think locking is present in all package managers in all distributions and it is  a good Idea, so that someone can't install and uninstall a package at different terminals at the same time, and end up with a messed up package manager .
    Well in this case, it is eclipse (>200 MB), but there are a variety of other large packages in the repositories. What may be small to you may seem massive to those with slower connections.
    How could it become messed up? I'm not proposing the database lock be eliminated, but rather wait until the actual installation process begins before locking it. It's no skin off anybody's ass if someone simply downloads packages simultaneously.

  • Is Arch the best distro for a friend with a "computer curse?"

    Hey, guys!  I need some advise.  I have a friend who has a "computer curse."  It runs in his family as well.  Computers break down FAST in his house.  He was running Windows initially, but he switched to Linux because he kept getting NASTY viruses.  Viruses so nasty, I would often have to use Windows Repair Install.  Linux, obviously, eliminated that problem.  It created a new problem, though.  Linux constantly BREAKS on him!  To be more specific, he's been using Debian-based distros.  Ubuntu, Linux Mint, etc.  All of them have been breaking on him.  It's incredibly frustrating.
    I've used Arch many times before.  I absolutely love it, and I'm beginning to wonder if it would work for him (after I set it up for him, of course).  I'm worried, though, about two things directly related - package management, and the system breaking.  He ALWAYS finds a way to break the system.  ALWAYS.  I can lock down package management, but if I do that, he will go months and months without an update; increasing his chances of a breakage if a major security update is needed.  Is there a way to balance this out?

    I agree, debian stable is the winner choice for him. That's unbreakable without root perms. And I think anyone who uses linux for more then  a year, finishes at arch, debian or gentoo (and some insists on slackware). Reason is: full customizability, no company background (mp3 in fedora/suse add repos issue) basic configs didn't variated, gentoo+arch:stable rolling release (innovations 5 years later even with this install, imagine you installed an xp in 2001 and now that install is a win7), debian: stable till die (but out of date)
    I killed my first 2 ubuntus one and a half a year ago, and I made panicing kernel half a year ago in gentoo, which even paniced other linux installers if that hard drive was plugged in
    If the guy loves innovations, you can set him up arch (or maybe the chakra project) but I basically say, the perfect solution is debian lenny with stable kde3. Old but more stable then anything I've ever seen, and fast (even on an 800Mhz 128 mb ram laptop)
    And another advise: don't install him sudo. He may know google too well to use it
    Last edited by Vegita (2010-01-02 19:47:03)

Maybe you are looking for