Batch import of DB2 stored procedures

Source: Internet
Author: User

There are two methods for batch import of DB2 stored procedures. The following describes the two methods for batch import of DB2 stored procedures in detail. If you are interested in the DB2 stored procedure, take a look.

Import command

Db2-td! C: \ 1. SQL

For the compilation of DB2 stored procedures, we should pay attention to the sequence.

The general idea is to first compile the inner layer process and then compile the outer layer.

We recommend that you use the batch method:

Method 1:
Store the background DB2 stored procedures in one SQL file according to internal and external relationships, that is, associations. Note: delete the Stored Procedure DROP PRODUCE NAME before each process !)

Enter the DB2CMD command window, connect to the database, and run
Db2-td! -F process path + SQL file name; all files can be compiled at one time. Note that each process should end! End)

Method 2:
Write a BAT script by yourself. This method is similar to above, but it can process both SQL scripts and background processes. The basic syntax is the same as above.

Export to procudure. del OF del modified by lobsinfile select 'set CURRENT scheme' | rtrim (procschema) | '@' | chr (10) | 'set current path = SYSIBM, SYSFUN, SYSPROC, '| rtrim (procschema) |' @ '| chr (10) | text | chr (10) |' @ '| chr (10) FROM syscat. procedures where procname like 'np _ % 'order by create_time;

DB2 connection Server Configuration

Learn about the DB2 lock types

Solution to db2 tablespace lock

How to Create a tablespace in DB2

Introduction to the DB2 user group in Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.