The following article mainly tells you about some daily practical operations of the DB2 database. I accidentally found a daily practical operation on the DB2 database on a website a few days ago, so I will share it with you today, the following is a description of the specific solution. I hope it will help you in your future study.
1. Load data:
Export to tempfile of del select * from TABLENAME where not clearing condition;
- load from tempfile of del modified by delprioritychar replace into TABLENAME nonrecoverable;
Note:
When the export data of unrelated data tables is export, it can be in the form of concurrency to improve efficiency;
TABLENAME indicates the name of the table to be cleared;
Modified by delprioritychar prevents the database records from being loaded due to line breaks;
Replace into replaces the content in the current DB2 database with the content of the data file;
Nonrecoverable load without logs;
2. Search for the current application:
- db2 list application |grep BTPDBS;
3. Delete the application currently in use:
- db2 "force application (Id1,Id2,Id3)"
Id1, Id2, and Id3 are the application numbers displayed in the List;
4. view the execution status of the current application number:
- db2 get snapshot for application agentid 299 |grep Row
5. view database parameters:
Db2 get db cfg for // The current DB2 database can be omitted
6. Modify the Database Log Data:
Db2 update db cfg using <Parameter Name> <parameter value>