DB2 programming skills (9)

Source: Internet
Author: User

The db2 tutorial is: DB2 programming skills (9 ). 4.8 check which databases under this instance
Db2 list database directory [on/home/db2inst1]
4.9 view and modify the configuration of the database head
Note that, in most cases, after the data configuration is changed, it takes effect only after all connections are disconnected.

View database head preparation
Db2 get db cfg for head


Change the value of a database head setting.
4.9.1 change the size of the sorting heap
Db2 update db cfg for head using SORTHEAP 2048
Change the size of the sorting heap to 2048 pages. It is better to set this value to a greater value for applications with more queries.
4.9.2 modify the transaction log size
Db2 update db cfg for head using logfilsiz 40000
The size of this item must be compatible with the transaction processing of the database. if the transaction is large, it should be changed to a larger value. Otherwise, it is easy to handle errors with full log files.

4.9.3 modify the program heap memory size when the program heap memory is insufficient
Db2 update db cfg for head using applheapsz 40000
The value cannot be too small, otherwise there will be insufficient memory to run the application.

4.10 view and modify database instance configurations
View database instance configurations
Db2 get dbm cfg
Change database instance Configuration

4.10.1 enable monitoring of lock conditions.
Db2 update dbm cfg using dft_mon_lock on
4.10.2 change the diagnostic error capture level
Db2 update dbm cfg using diaglevel 3
0 indicates that no information is recorded.
1 indicates that only errors are recorded.
2. Record service and non-service errors
The default value is 3, which records db2 errors and warnings.
4. Record all information, including information about successful execution.
Generally, do not use 4, which will lead to a very slow running speed of db2.


<

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.