Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2003
    Posts
    5

    Unanswered: How to view Stored procedures

    I have stored procedures on the system. But when I go and right click on the stored procedure name (for clicking on "Get source"), It does not allow me. cause it shows everything except "Run and Properties" in disabled mode.

    How can i view the Source of stored procedure. ?

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    Just fire this query:

    select PROCNAME,TEXT from SYSIBM.SYSPROCEDURES

    Cheers,
    Prashant

  3. #3
    Join Date
    Feb 2003
    Posts
    5
    Thanks for your Reply.!!

    I querried the sysibm.sysprocedures table. I have found that there exist a row each for the 10 procedures I see on control center. But the text column is empty.

    My concern here is. The backups taken on the database will not include any information on stored procedures. So how will I re create the SP in the event of a restore done on the database.

    I just started on this job. so I have little information on the stuff they did when the this was set up.

    I will probably do some more digging. And it seems to me that the procedures are null and void. That is an assumption I am making.

    Will appreciate additional input !!!

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What is the contents of the LANGUAGE column? I believe that to have data in the TEXT column, the LANGUAGE column has 'SQL' as a value.
    Any other LANGUAGE means that it is an EXTERNAL procedure and should be recreated also on RESTORE as long as the routines are where they are supposed to be (depends on the OS DB2 runs on top of).
    The contents of the IMPLEMENTATION column define to DB2 the OS name of the routine.

    HTH

    Andy


    Originally posted by Antony1018
    Thanks for your Reply.!!

    I querried the sysibm.sysprocedures table. I have found that there exist a row each for the 10 procedures I see on control center. But the text column is empty.

    My concern here is. The backups taken on the database will not include any information on stored procedures. So how will I re create the SP in the event of a restore done on the database.

    I just started on this job. so I have little information on the stuff they did when the this was set up.

    I will probably do some more digging. And it seems to me that the procedures are null and void. That is an assumption I am making.

    Will appreciate additional input !!!

  5. #5
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    Yes you need to rebuild the procedures....Can you see the procedures in the Control Center atleast or in the DB2 stored procedure builder.
    If yes just try to get the code from there and then compile them from command prompt.

    Cheers,
    Prashant

Posting Permissions

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