Results 1 to 6 of 6

Thread: Stored proc

  1. #1
    Join Date
    Jun 2009
    Posts
    272

    Unanswered: Stored proc

    Environment Details: DB2 Version 9.7, operating system AIX
    Multi partition environment

    I work on command line.

    How do I get the entire SQL text of a stored proc. When I try to select the text column from syscat. procedures, some part of it is getting truncated. Is there any other way I can grab the DDL of a stored proc ?

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jun 2009
    Posts
    272
    Does db2look give the SQL present in a stored proc ? If so, can you please provide the syntax. I am unable to figure out.

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    is the doc not clear ? have you tried ?
    according the doc : -e ---> Stored procedures
    db2look -d xxx -e -o oo.oo
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Jun 2009
    Posts
    272
    Okay. Thats fine. I was assuming that there is a way to get SQL for just one stored procedure. If -e is the only options then it is fine.

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You could also use EXPORT ... MODIFIED BY LOBSINFILE to select a single SP's source text and save it into a file.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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