Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007
    Posts
    4

    Unanswered: How to execute a DB2 DDL File from a shell script?

    Hi

    I am having DB2 DDl file which contains SQL statements.

    Can anybody help on how to execute that DDL file from a Unix Shell script.

    Thanks

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    db2 -tvf file-name > file-name.out

    The above assumes you want to pipe the output to a different file. It also assumes that your statement delimeter is a semi-colon (.

    See the Command Reference manual for other options for using the CLI.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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