Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2004
    Posts
    7

    Unanswered: Does DB2 have SQL packages like Oracle?

    Hi,

    I am new to DB2 world, wanted to know whether DB2 have a similar concept of having SQL Packages like Oracle has where we can declare types, procedures and functions or anything global we want to keep?

    Thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    7
    any ideas, any answers??

    Thanks

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: Does DB2 have SQL packages like Oracle?

    Originally posted by vijpan
    Hi,

    I am new to DB2 world, wanted to know whether DB2 have a similar concept of having SQL Packages like Oracle has where we can declare types, procedures and functions or anything global we want to keep?

    Thanks
    Yes you can declare types and create procedures and functions. I'm not sure about "anything global" though.

  4. #4
    Join Date
    Mar 2004
    Posts
    6
    Yes we do have packages in db2

  5. #5
    Join Date
    Jan 2004
    Posts
    7
    could anyone put something more in detail or point me towards some material to look into?

    Thanks

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by vijpan
    could anyone put something more in detail or point me towards some material to look into?

    Thanks
    You can start with DB2 Application Development Guide. A link to the DB2 manuals can be found in the posting calle "Useful DB2 Stuff"

  7. #7
    Join Date
    Jan 2004
    Posts
    7
    actually i had looked at the "Application Development Guide", they really dont mention about Packages as such, hmm SP's are fine, we are making use of that , but i miss packages ,i wanted to know if DB2 has similar kind of capability like Oracle Packages have and if they do or is there another way thats implemented in DB2...any more ideas would be really appreciated.

    Thanks a lot guys!

  8. #8
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by vijpan
    actually i had looked at the "Application Development Guide", they really dont mention about Packages as such, hmm SP's are fine, we are making use of that , but i miss packages ,i wanted to know if DB2 has similar kind of capability like Oracle Packages have and if they do or is there another way thats implemented in DB2...any more ideas would be really appreciated.

    Thanks a lot guys!
    As you may have guessed not many people on this board are as familiar with Oracle as they are with DB2. If you could specify any particular features of Oracle packages that you are looking for then I'm sure more people will be able to help you out.

  9. #9
    Join Date
    Jan 2004
    Posts
    7
    Few questions like?

    a) How are they created? Is there something like "Create Package" kind of syntax ? or something very different?

    b)If somebody can refer to me some kind of link or documentation that how the body of DB2 Package is like?

    c)How to call a type,SP declared with in the package from another SP outside the package?

    4)Can a DB2 package have only sql statements?

    if someone can point me towards some material which can help me to know the answers of the above questions.

    Thanks a lot!

  10. #10
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by vijpan
    Few questions like?

    a) How are they created? Is there something like "Create Package" kind of syntax ? or something very different?

    b)If somebody can refer to me some kind of link or documentation that how the body of DB2 Package is like?

    c)How to call a type,SP declared with in the package from another SP outside the package?

    4)Can a DB2 package have only sql statements?

    if someone can point me towards some material which can help me to know the answers of the above questions.

    Thanks a lot!
    Well, after having read "Oracle concepts" I now better understand your question. The term "Package" has a different meaning in DB2.

    DB2 doesn't have a concept similar to Oracle's packages. All types, SPs, and functions are stand-alone database objects.

    From an SP you can refer to other types and SP, as you would in Oracle to stand-alone objects, provided that you are granted sufficient access. And yes, you can use various control statements in SPs and functions (see SQL Reference for details).

  11. #11
    Join Date
    Jan 2004
    Posts
    7
    Thanks n_i for the quick responses. But i am surely gonna miss the oracle package kinda thing in DB2.

Posting Permissions

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