Why use of package
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Why use of package

  1. #1
    Join Date
    Nov 2000
    Posts
    440

    Why use of package

    Could you tell me advantage of using personnalize package in a oracle application? Performance, use of package for library, is there other?

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    I once read an article (although I can't put my browser on it at the moment) by the great Thomas Kyte about this topic. One of the significant points he brought up was that when you recompile a procedure, it's dependancies become invalidated thereby ensuring an endless recompile nightmare. With packages, you only need to re-compile dependant objects when the package specification changes. As long as the interface to the package (specification) stays the same, you can change the logic (body) all you want without triggering massive recompilation.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333

  4. #4
    Join Date
    Jun 2001
    Posts
    40
    I too recall a similar article:

    http://asktom.oracle.com/pls/ask/f?p...D:286816015990

    Also, try

    http://asktom.oracle.com/pls/ask/f?p...7Brecompile%7D

    For additional info.

    Hope that helps

    Thanks

    Austin

  5. #5
    Join Date
    Jun 2001
    Posts
    40
    That second URL isn't working too well

    Go to

    http://asktom.oracle.com/pls/ask/f?p...1818834::NO:::

    and type

    procedure,fn &packages

    in the search box try

    procedure,fn &packages -- whats the main

    That should on return 1 article.

  6. #6
    Join Date
    Nov 2000
    Posts
    440
    Encapsulation, dependency, other reason why to use package?

  7. #7
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    From the non-technical perspective, I find it easier to manage a few (reasonably sized) packages rather than many procedures and functions. Configuration management is easier for one thing.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  8. #8
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by steeve123
    Encapsulation, dependency, other reason why to use package?
    It is good to logically group your PL/SQL code into packages.

    But there a several other reasons: You can pin just one package and thus no neeed to pin all procedures the application uses separately, etc..
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  9. #9
    Join Date
    Nov 2000
    Posts
    224
    I have not read it for a while, but what I remeber on packages, along with dependency explanation already given, You can share variables among functions/procedures in package.

  10. #10
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    well in a package I think you have global variables for whole package and local variables for each function/procedure

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