Package dependency - recompile

Hi everybody,
I've got the following situation in a productive environment here:
- a package A with a procedure P1
- a package B with a procedure P2
If anybody knows about a possibility to recompile package A without making package B invalid - please give me a hint.
tia and have a nice weekend,
rk

--HELLO
--THIS MIGHT HELP YOU.
=========================================================
-- Compile all invalid objects in database
-- and produce report of objects compiled/
-- still requiring compilation
-- C Heroux
-- ported for 8.X
set serveroutput on
declare
cursor compiler is
select
object_type,
object_name
from
user_objects where status= 'INVALID'
order by
decode(object_type, 'VIEW', 1, 'PROCEDURE', 2, 'FUNCTION', 3,
'PACKAGE', 4, 'PACKAGE BODY', 5, 'TRIGGER', 6);
cursor end_compile is
select
object_name
from
user_objects
where
status= 'INVALID';
lv_object_name      user_objects.object_name%type;
lv_object_type      user_objects.object_type%type;
c_stat          integer;
c_handle          integer;
b_ct               integer;
e_ct               integer;
type object_table is table of varchar2(60) index by binary_integer;
object_array          object_table;
success_with_comp_error exception;
PRAGMA EXCEPTION_INIT(success_with_comp_error, -24344);
begin
dbms_output.enable(1000000);
b_ct := 0;
e_ct := 0;
open compiler;
LOOP
fetch compiler into lv_object_type, lv_object_name;
exit when compiler%notfound;
b_ct := b_ct + 1;
c_handle := dbms_sql.open_cursor;
BEGIN
IF lv_object_type = 'PACKAGE' THEN
dbms_sql.parse(c_handle, 'alter package '||lv_object_name||
' compile specification', dbms_sql.native);
dbms_output.put_line('Compiling package spec '||lv_object_name);
ELSIF lv_object_type = 'PACKAGE BODY' THEN
dbms_sql.parse(c_handle, 'alter package '||
lv_object_name||' compile body', dbms_sql.native);
dbms_output.put_line('Compiling package body '||lv_object_name);
ELSE
dbms_sql.parse(c_handle, 'alter '||lv_object_type||
' '||lv_object_name||' compile', dbms_sql.native);
dbms_output.put_line('Compiling '||lower(lv_object_type)||' '
||lv_object_name);
END IF;
c_stat := dbms_sql.execute(c_handle);
EXCEPTION
WHEN SUCCESS_WITH_COMP_ERROR THEN
-- Trap and ignore ORA-24344: success with compilation error
-- This only happens on ORACLE 8
null;
WHEN OTHERS THEN
null;
END;
dbms_sql.close_cursor(c_handle);
END LOOP;
close compiler;
open end_compile;
loop
fetch end_compile into lv_object_name;
exit when end_compile%notfound;
e_ct := e_ct + 1;
object_array(e_ct) := lv_object_name;
end loop;
close end_compile;
dbms_output.put_line('Compiled '||b_ct||' objects.');
if e_ct > 0 then
dbms_output.put_line(e_ct||' objects still require compilation. Rerun and/or review source code for:');
end if;
if e_ct > 0 then
for i in 1 .. e_ct
loop
dbms_output.put_line(' - '||object_array(i));
end loop;
end if;
end;
=======================================================
CHEERS

Similar Messages

  • Why does the 'cairo' package depend against 'mesa'?

    I get why the 'cairo' package depends on 'libgl', but does anyone know why it depends on 'mesa', too?
    As a nvidia user, I'd really prefer not to have to install all of 'mesa' (and everything that it depends on).
    P.S.: Lacking a better place I'm posting here since this was triggered by the recent 'libgl' merge with 'mesa'.

    Meyithi wrote:
    https://bbs.archlinux.org/viewtopic.php?id=158744
    I don't know, neither does anybody else...
    I'm guessing that nvidia-utils/lib32-nvidia-utils needs to somehow provide something that stops us having to pull in all of the crud but it's a guess as even the devs don't seem to have worked it out.
    I did read that thread but it didn't seem strictly relevant, though it does explain what mesa has to do with all this.
    What I'm actually asking is why we are requiring mesa for cairo (which we are compiling ourselves), since it is seems to be optional [1]. For example, neither Debian nor Ubuntu seem to require mesa for cairo.
    [1] http://www.linuxfromscratch.org/blfs/vi … cairo.html

  • Package body recompilation - needs BPEL process redeploy or Server restart

    Hi,
    I have a partner link which connects to a PL/SQL Package procedure using Database adapter.
    When i recompile the package body, and try a new instance of the process. I get the binding fault
    which indicates that the current state of the package is invalid.
    I have not recompiled the package specification, why should a package body recompilation cause
    problem in the binding?
    WSIF JCA Execute of operation 'AuthConfirmationService' failed due to: Error while trying to prepare and execute an API. An error occurred while preparing and executing the DEMF1BAR.DVPKS_BPEL_IRS.PR_CONFIRM_AUTH API. Cause: java.sql.SQLException: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "DEMF1BAR.DVPKS_BPEL_IRS" has been invalidated ORA-04065: not executed, altered or dropped package body "DEMF1BAR.DVPKS_BPEL_IRS" ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 1 ; nested exception is: ORABPEL-11811 Error while trying to prepare and execute an API. An error occurred while preparing and executing the DEMF1BAR.DVPKS_BPEL_IRS.PR_CONFIRM_AUTH API. Cause: java.sql.SQLException: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "DEMF1BAR.DVPKS_BPEL_IRS" has been invalidated ORA-04065: not executed, altered or dropped package body "DEMF1BAR.DVPKS_BPEL_IRS" ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 1 Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.</summary>
    <detail>ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "DEMF1BAR.DVPKS_BPEL_IRS" has been invalidated ORA-04065: not executed, altered or dropped package body "DEMF1BAR.DVPKS_BPEL_IRS" ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 1</detail>
    Is this is a bug or a limitation? Are there any workarounds?
    Thanks,
    Senthil L

    this is not intended behaviour, and an issue of the db pool (that holds open jdbc connections, for performance). You can try setting min and max connections to 0 (for development) - which ill have the pool creating a new connection every time.
    This is as mentioned not bpel related, but a feture of the jdbc driver.
    hth clemens

  • Oracle package needs recompilation off and on

    I am using Oracle 11.1.0.7.4 on HP UNIX. I have third party application which has several Oracle
    Packages. After a few days, a package gives error (i.e., a select is not returning data from table, even though there is data in table). If I just recompile the package, things start working. After a day or two, same problem happens, then I recompile everything works.
    This looks like some bug in Oracle. Can someone point what may be the cause? There are no messages generated in alert.log.

    user632098 wrote:
    I am using Oracle 11.1.0.7.4 on HP UNIX. I have third party application which has several Oracle
    Packages. After a few days, a package gives error (i.e., a select is not returning data from table, even though there is data in table). If I just recompile the package, things start working. After a day or two, same problem happens, then I recompile everything works.
    This looks like some bug in Oracle. Can someone point what may be the cause? There are no messages generated in alert.log.Could be something like, some dependency between packages goes bad, so other users already connected and running one of those packages get state errors. Are you doing DDL? Are there variables declared at the package level? What error are you getting? Are people getting privilege assigned or dropped? Does the application directly access Oracle x$ tables? It could be that some rarely executed code hits some obsolete definition if it tries to be that cute.
    See MOS ORA-04068 Errors from User-Written and Oracle Packages [ID 106206.1] for some details. I'm sure I've seen blogs talk about this sort of thing, perhaps in the context of the 11.2 editions feature fixing some of these kinds of errors.

  • Own PKGBUILDs - automatic dependency recompilation

    Hi all,
    any hint how to solve following?
    - you have base directory for your own repo -> /repo
    - you make 2 directories: /repo/LIBRARY1 and /repo/PROGRAM1 (with respective PKGBUILD files inside)
    - PROGRAM1/PKGBUILD has defined runtime dependency on LIBRARY1 (for example: LeafPad depends on GTK2)
    How the hell make PROGRAM1 automatically recompile if LIBRARY1 is specified as dependency and LIBRARY1 is rebuild with different build options ?
    Does ArchLInux have such a tool that solves package development like FreeBSD ports ?
    Regards,
      V.

    The Arch Build System is not intended to be a full-fledged ports system but merely a means of compiling individual packages to one's tastes. No equivalent to Portmaster or Poudriere exists for Arch for the same reason---the Arch Build System isn't intended to be a primary source of system software, just a supplement to the repositories. makepkg installs build and runtime dependencies from the repositories rather than building them from the ABS tree; if a library gets updated, the developers update the PKGBUILDs of all dependent packages and rebuild them. If you're maintaining your own PKGBUILDs then you'll need to update the "pkgver=" line of each PKGBUILD and then rebuild the packages yourself. If you want to build the libraries from source as well, you need to do the same for them.
    Incidentally, think FreeBSD has its own limitation: if you maintain your own port in a directory outside /usr/ports then dependency resolution will fail when you try to build it, and any custom ports in the ports tree get overwritten when the ports tree is updated. A third-party port/package (Portshaker) is needed to handle this. I could be wrong, though, as I haven't tried writing my own ports on FreeBSD.

  • View packages depending on selected package

    TL; DR: Is there a way to use pacman -Q to see what packages are depending on a particular package?
    Basically what's in the title.
    I'm always worried about removing packages in Arch here because I don't want to break (an)other package(s).
    I have made a file named "dependencies" that lists the dependencies selected by pacman for each package I've installed from the beginning, however it's not necessarily in chronological order, and you know that if you already have a particular package that a new package you're looking to install depends on, it won't tell you it's a dependency, because it's already there!
    I'm looking to remove avant-window-navigator and any useless packages left behind, if it matters.

    > pacman -Qi glibc
    Name : glibc
    Version : 2.12.1-2
    URL : http://www.gnu.org/software/libc
    Licenses : GPL LGPL
    Groups : base
    Provides : None
    Depends On : linux-api-headers>=2.6.34 tzdata
    Optional Deps : None
    Required By : a52dec aalib alsa-lib attr audiofile bash bash3
    binutils bison bzip2 cabextract calc cdparanoia
    coreutils cracklib dcron device-mapper dhcpcd diffutils
    dmidecode eject elfutils eventlog expat faac fakeroot
    file findutils flac flex foomatic-filters fuse gawk
    So that tells you which package need another package.   Pacman won't let you remove a package unless that list is empty anyway.
    Read the man page for details on how to remove a package and all its dependencies.

  • Packages depending on other repositories

    Hi,
    Is it reasonable for a package from a higher order reposeitory to depend on a package from a lower order repository?
    For example networkmanager from extra depends on libnewt from community.
    Or evolution from extra depends on gtkspell3 from community.
    So if we disable community then some packages from extra would have unresolvable dependencies.
    Thanks
    Last edited by zharf (2014-08-03 20:33:45)

    Hi,
    karol wrote:
    In https://bugs.archlinux.org/task/38227
    Allan wrote:It has been well established that we do not much care about the repo hierarchy.
    So why community or AUR exist and why not let trusted users maintain packages in core and extra?
    IMO obeying the law is mandatory for the ruler.
    Thanks

  • Automatic upgrade of AUR packages dependent on kernel version.

    I have an issue with upgrading AUR packages with pacaur. When I try to upgrade with one of the following commands:
    pacaur -u [package_name]
    pacaur -Su -a
    pacaur -Syu
    I keep getting the error 'no results found for dependencies)' 
    Here an example output:
    [ ~ ]$ pacaur -Syu
    :: Synchronizing package databases...
    core is up to date
    extra is up to date
    community is up to date
    :: Starting full system upgrade...
    resolving dependencies...
    looking for conflicting packages...
    error: failed to prepare transaction (could not satisfy dependencies)
    :: spl-git: requires linux=3.17.6-1
    :: zfs-git: requires linux=3.17.6-1
    :: Starting AUR upgrade...
    :: resolving dependencies...
    :: no results found for dependencies)
    As seen in this example, the system upgrade is failed due to two kernel packages which require the previous kernel version.
    I wonder, does the AUR upgrade fails after the failed system upgrade because of new spl-git and zfs-git packages require the new kernel version? And the message ":: no results found for dependencies)" is caused by this?
    It seems there is a kind of a circular dependency in this case - kernel doesn't upgrade because of zfs requires the older kernel, and zfs doesn't upgrade because the new version of zfs requires the new kernel.
    Previously I upgraded AUR packages manually, by first removing them, then upgrading the kernel and after that installing new versions of packages.
    Is it possible to automatically upgrade kernel packages? If so can this be done with pacaur?
    Last edited by nbd (2015-01-19 23:39:49)

    Hi, so I'm not the only newbie doing such things.
    here:
    https://bbs.archlinux.org/viewtopic.php?id=181717
    ukhippo wrote:Afterwards I also suggest using “pacman -Syyu” to update (note the double “y”, this forces a refresh of all packages)
    meaning first add the repository and the key for demz-repo-core https://wiki.archlinux.org/index.php/Un … -repo-core.
    I did that today but the output was just:
    [root@machine1 ~]# pacman -Syyu
    :: Synchronizing package databases...
    core 121.6 KiB 599K/s 00:00 [########################################################] 100%
    extra 1806.6 KiB 671K/s 00:03 [########################################################] 100%
    community 2.5 MiB 672K/s 00:04 [########################################################] 100%
    multilib 121.2 KiB 932K/s 00:00 [########################################################] 100%
    demz-repo-archiso 5.5 KiB 37.9K/s 00:00 [########################################################] 100%
    demz-repo-archiso.sig 287.0 B 0.00B/s 00:00 [########################################################] 100%
    demz-repo-core 7.8 KiB 48.6K/s 00:00 [########################################################] 100%
    demz-repo-core.sig 287.0 B 0.00B/s 00:00 [########################################################] 100%
    :: Starting full system upgrade...
    resolving dependencies...
    looking for conflicting packages...
    error: failed to prepare transaction (could not satisfy dependencies)
    :: spl-git: requires linux=3.17.6-1
    :: zfs-git: requires linux=3.17.6-1
    even though I read
    https://www.archlinux.org/packages/?sor … =&flagged=
    x86_64     Core     linux     3.18.2-2     The Linux kernel and modules     2015-01-15     2015-01-16
    and
    https://github.com/demizer/archzfs
        spl-git     Update git packages for kernel 3.18.2-2     4 days ago
        zfs-git     Update git packages for kernel 3.18.2-2     4 days ago
    I don't really know if I want to remove the package first, while running the machine from a zfs filesystem.
    If it runs automatically the chance of me making an error is a little smaller, don't really want to have a not bootable system.

  • Package Dependency

    Hi ,
    I have spent quite some time going thru all the forum post's. (Some quite old, since 1998, I believe..)
    Please do let me know if there is any way in which I can track the ("soft") dependency between procedures which are in different packages.
    I understand that there is no direct dependency (no re-compilation of other procedure on the change of a particular procedure)
    The problem here is that there are sections in the application which require that you call procedures which lie in other packages. (The other option being to create a replica of the procedure, which creates maintenance issues....changing of the code in multiple places , not to mention, basic reusability going for a toss..)
    Please do let me know if there is any way of generating a report of dependencies between procedures which lie in separate packages. This would greatly aide in huge projects.
    Also , this issue has been there long enough and I believe if it has not been addressed already, the same should be done so ASAP by Oracle...(Larry , are u listening ?)
    thanking in advance....

    pacman always tells you what packages are going to be installed when you update your system.
    Yes, sometimes dependencies do change.
    pacman -Qdt
    ...can be used to search for 'orphaned' dependencies... But be careful.
    Remember, pacman doesn't do 'everything'. It's your job to maintain your own system.

  • Package Dependancy

    Folks,
    Well, this is my second installation post. I'm new to Oracle - coming over from Informix/DB2. Thought I should learn Oracle. Seems the installation is a tad more difficult than Informix. I'm getting there. I've reduced the number of errors considerably - just a couple more to fix and I'm ready to go. I appreciate the help.
    I'm installing 11g on Linux Enterprise 5
    The installation complained about not having the following 2 packages:
    elfutils_libelf-devel-0.125-3.el5.i386.rpm
    elfutils_libelf-devel-static-0.125-3.el5.i386.rpm
    However, I'm not able to install them as they are dependant on one another.
    Also, does anyone know where package systat-700 can be found?
    Thanks in advance.
    Scott

    Well, you need to use Enterprise Linux manual to install the packages. You should actually read the pre-install requirements before you start to save you time.
    Oracle Database FAQs

  • PacmanDeps - recursive package dependency viewer

    Based on Pacman Dependency Tree I created pacmanDeps. If anyone is interested in the dependencies of his packages; now you can easily view it
    Features:
    Pass one or multiple packagenames to seeo, of pass nothing to see all packages installed
    Detects dependency-loops (use `pacmanDeps>/dev/null` to see only dep-loops)
    Has an internal cache to speedup the process of looking up dependencies
    Uses some colors; easy to modify in the head of the script
    ToDo:
    Fix branch and leaves visual
    Download: (updated - this is version 0.2)
    http://archlinux.spider007.net/pacmanDeps/pacmanDeps.sh
    Any feedback welcome

    nice work!
    [damir@Asteraceae cvsARCH]$ ./deptree_spider.sh readline
    readline
    +---glibc
    +---ncurses
    +---glibc
    funny output - it seems that glibc is listened 2ce ... but the second one is from ncurses
    [damir@Asteraceae cvsARCH]$ ./deptree_spider.sh cups
    cups
    +---libpng
    +---glibc
    +---zlib
    +---glibc
    +---libtiff
    +---gcc
    +---binutils
    +---glibc
    +---glibc
    +---libjpeg
    +---glibc
    +---zlib
    +---glibc
    +---openssl
    +---glibc
    +---pam
    +---db
    +---gcc
    +---binutils
    +---glibc
    +---glibc
    +---glibc
    +---filesystem
    +---bash
    +---glibc
    +---readline
    +---glibc
    +---ncurses
    +---glibc
    +---glibc
    seems that this bug is not always reproducable
    one more thing: please end your script with "exit 0" and name it with the extension .sh

  • Is there any restriction using pl/sql packages depending on Oracle Version?

    Hi everybody. Our company is using a mix of pl/sql packages to call web services and process xml inside stored procedures. We are using UTL_HTTP, UTL_DBWS and UTL_XML. Our client asks if there is any restriction using those packages on a Standard One licensed database? Does we need an upgrade p.e. enterprise edition to use those packages? I test all our development on a Express Edition, and there is no restriction. We run the same test on a Standard One and Enterprise Editions and the result was the same, no restrictions.
    To use those packages does we need an upgrade to enterprise edition?
    Xavier.

    the packages that you mention are not restricted to a particular version.

  • Reading Package Dependency File Information

    Hi All,
    I want to scan for depency file for a package before installtion and list those file information. How to achive this using java Code?
    Thanks in advance
    Sethu

    Try this code,
    import java.io.*;
    class ListFiles {
         public static void main(String a[]) {
              ListFiles lf = new ListFiles();
              File dir = new File("D:/"); //Input the mapped CD-ROM drive here. For me it is D:/
              File[] files = dir.listFiles();
              for(int count=0;count<files.length;count++) {
                   File file = files[count];
                   if(file.isDirectory()) lf.displayFiles(file);
                   if(file.isFile()) lf.checkAndDisplay(file);
         private void displayFiles(File dir) {
              File[] files = dir.listFiles();
              for(int count=0;count<files.length;count++) {
                   File file = files[count];
                   if(file.isDirectory()) displayFiles(file);
                   if(file.isFile()) checkAndDisplay(file);
         private void checkAndDisplay(File file) {
              String name=file.getName();
              if(name.endsWith(".txt")) {
                   System.out.println("Name of the file : "+name);
    }Sudha

  • Automatically recompile dependant objects in db proc

    I would like to know as to what to do to automatically recompile
    dependant objects in a database procedure without compiling the
    procedures again manually.
    for eg: if a table is altered the db procedure becomes invalid
    (uncompiled form).. Can anything be done to automatically
    recompile without compiling it manually.
    Same's the case with a procedure being changed the dependants if
    any or is parent ( another procedure being called or calling
    another procedure)
    null

    peter (guest) wrote:
    : kiran (guest) wrote:
    : : I would like to know as to what to do to automatically
    : recompile
    : : dependant objects in a database procedure without compiling
    the
    : : procedures again manually.
    : : for eg: if a table is altered the db procedure becomes
    invalid
    : : (uncompiled form).. Can anything be done to automatically
    : : recompile without compiling it manually.
    : : Same's the case with a procedure being changed the
    dependants
    : if
    : : any or is parent ( another procedure being called or calling
    : : another procedure)
    : I thougt recompile of invalid stored procedures/packages
    occurs
    : automatically as they are called? If not, this is not normal.
    Did
    : you alter objects in a way that your procedures cannot be
    : compiled at all ?
    : peter
    Invalid stored code should be recompiled automatically. However
    certain combinations of client software and the database don't
    work this way. We're running the base release of Forms 6 against
    a 7.3.4 database and we find that uncompiled program units on
    the server do not get recompiled automatically.
    Our temporary workaround, until we move either the client or
    server forward, is to loop through all invalid objects (views,
    functions, procedures and packages - not package bodies)
    recompiling them overnight after the processing which
    invalidates them has completed. We repeat this process until
    either the same number of objects are invalid between two
    invocations or upto an arbitrary count of 10, so we don't end up
    running it forever.
    Marc
    null

  • Install package as dependency of another package

    Suppose you want to install Package X, which depends on Package Y. You also want to install Package Z, which augments Package X, but is not a dependency of Package X. You run:
    pacman -S X Z
    Now suppose that you no longer want Package X on your system. You run:
    pacman -R X
    Package X is removed. Now you can run:
    pacman -Qdt
    To clean up packages orphaned by Package X. Provided nothing else depends on Package Y, Package Y will be removed.
    All is well and good, except Package Z was not orphaned by Package X. Even though Package Z is (in this hypothetical example) useless without Package X, it won't be removed automatically because it was installed with pacman -S.
    So... is there a way to install Package Z as a dependency of Package X such that, when Package X is removed, Package Z will be orphaned if no other packages depend on it?

    Thank you, rwd, that does the trick. Editing the PKGBUILD is quite reasonable when Package X is in AUR, and for official packages, editing /var/lib/pacman/local/X/depends (not Z/depends) works. The downside is that I have to remember that I want Package Z to behave as a dependency of Package X and tweak Package X every time it is updated. So yes, an --asdepof option would be really swell.
    For venky80 and anyone else who may be interested in this, here's a real-world example. Suppose you want to install loudmouth for use with amarok. If you later decide to uninstall amarok, you would like for loudmouth to be automatically uninstalled as well (unless some other package depends on it). loudmouth is not a depedency of amarok (incidentally it is an optional dependency, but this will work with any package that is not a dependency).
    1. Install amarok
    $ pacman -S amarok
    2. Install loudmouth with --asdeps
    $ pacman -S --asdeps loudmouth
    3. Edit amarok's depends file to make it depend on loudmouth
    3a. Open the file in a text editor
    $ nano /var/lib/pacman/local/amarok*/depends
    3b. Add "loudmouth" under the DEPENDS section; e.g.
    %DEPENDS%
    loudmouth
    mysql>=5.1.34
    kdebase-runtime>=4.2
    taglib
    3c. If loudmouth is an optional dependency of amarok (and it is), remove it from the OPTDEPENDS section.
    3d. Save and close the depends file.
    4. Test to see if it worked
    $ pacman -Qtd
    $ # loudmouth should not be listed
    $ pacman -Rs amarok
    $ # loudmouth should be listed

Maybe you are looking for