1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Difference between STANDARD and DBMS_STANDARD default packages?

Discussion in 'SQL PL/SQL' started by jamuna_j, Sep 14, 2012.

  1. jamuna_j

    jamuna_j Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    100
    Hi

    I was reading up on built-in packages today and read about the STANDARD and DBMS_STANDARD package. I understand that they are both default packages meant for internal use by Oracle, with information on datatypes, built-in functions, etc. But I could not find any information on how they are different from each other.

    If there are two separate packages, surely some basic difference must exist between the two? Anyone who can shed light on this?

    Thanks!
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    I expect you have an Oracle installation available to you? $ORACLE_HOME/rdbms/admin houses the scripts that create STANDARD (stdspec.sql, stdbody.sql) and DBMS_STANDARD (dbmsstdx.sql); you should really take a look at those scripts to see what they do. DBMS_STANDARD provides kernel extensions to the STANDARD package, such extensions are predominantly functionality used by triggers. The latter extends the formers functionality and are special in that no function or procedure in either package need be prefixed by the package name.
     
    jamuna_j likes this.
  3. kimipatel

    kimipatel Active Member

    Messages:
    53
    Likes Received:
    1
    Trophy Points:
    140
    STANDARD and DBMS_STANDARD declare and define base types, VAR CHAR2 and NUMBER. If your database has PL/Scope identifier data for these packages, PL/Scope can track your usage of the identifiers that these packages create.

    You can use PL/Scope without STANDARD and DBMS_STANDARD identifier data. You need this data only if you must know where your code uses the base types or subprograms that these packages create.

    A newly created Oracle 11.1.0.7 database or upgraded 11.1.0.7 from 10.2, has PL/Scope identifier data for the packages STANDARD and DBMS_STANDARD. A database that was upgraded to 11.1.0.7 from 11.1.0.6 does not have this data.
     
  4. jamuna_j

    jamuna_j Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    100
    Sure I will check out the scripts. I just wanted it on a nutshell to get the basic idea. Thanks! :)
     
  5. jamuna_j

    jamuna_j Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    100
    @kimipatel: PL/Scope is a topic I am yet to touch, I will remember to check it out when I get to it. Many thanks for the information