The DB2 tutorial being looked at is: DB2 Programming Tips (10). 4.11 DB2 environment variable
DB2 after reloading, set the DB2 environment variable in the following way to ensure that the SP can compile
Put the set_cpl on AIX, chmod +x set_cpl, and then run the
The content of Set_cpl
Db2set db2_sqlroutine_compile_command= "xlc_r-g \
-i$home/sqllib/include sqlroutine_filename.c \
-be:sqlroutine_filename.exp-e sqlroutine_entry \
-O sqlroutine_filename-l$home/sqllib/lib-lc-ldb2 "
Db2set Db2_sqlroutine_keep_files=1
4.12 DB2 Command Environment settings
Db2=>list command Options
db2=>update command options using C off--or on, only temporary changes
Db2=>db2set Db2options=+c----or-C, permanent change
4.13 Changing isolation Levels
Db2set db2_sqlroutine_prepopts=cs| rr| Rs|ur
The interaction environment changes the isolation level of the session,
DB2 Change Isolation to UR
Note that you can change the isolation level only if you are not connected to a database.
4.14 The parameters of management db\instance
Get DB CFG for Head (DB)
Get dbm CFG (instance)
4.15 Eliminate version problems after upgrade
DB2 bind @db2ubind. LST
DB2 bind @db2cli. LST
4.16 View the deadlock of a database table
When you use the command center to query the data, be aware that if you use interactive query data, the command center will give the recorded records added S lock. At this point, if you want to update the record, because update to use X lock, exclusive lock, will be locked waiting.
First, turn on the monitor switch
DB2 update dbm CFG using Dft_mon_lock on
Snapshot
DB2 get snapshot for Locks on Cleardb >snap.log
Tables
Bufferpools
Tablespaces
Database
Then look at the contents of the Snap.log.
Lock can look at the locks of each application according to the application handle (application handle).
After monitoring, don't forget to turn the monitor off
DB2 update dbm CFG using dft_mon_lock off
<