Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2012
    Posts
    3

    Unanswered: Calling one DDL script from another

    If I have to DDL scripts, A, and B, is it possible to call script B from script A, and retain the current connection/user context?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Are they shell scripts or DB2 command scripts?

    Andy

  3. #3
    Join Date
    Jan 2012
    Posts
    3
    They're both DB2 command scripts. The desired architecture is to have one script that sets up the current schema and schema user, grants permissions, creates tablespaces, etc, and have that call out to others to create tables, etc, within the context of the same connection.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What DB2 version and OS are you using?

    Andy

  5. #5
    Join Date
    Jan 2012
    Posts
    3
    We have to support v9.7, on Windows & Linux primarily. Does the OS version impact the db2 CLI syntax?

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I cannot think of a way to do it with normal DDL type scripts. Usually I would just use a shell script that ran the first script and then the second.

    But with v9.7, you now have CLPPlus which may work for you. I have not used it yet as we are not totally on V9.7 yet.

    Andy

Tags for this Thread

Posting Permissions

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