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