Frequently used DB2 commands (2)

Source: Internet
Author: User
Tags db2 db2 connect db2 connect to

Catalog Database:
Catalog INDIRECT:DB2 Catalog Database On/db2sys[dir_name]
Catalog REMOTE:DB2 catalog Database as at node    Case:        DB2 catalog TCPIP node Nodesun remote 192.168.1.1 server 50000 ostype Aix        DB2 Catalog db sundb as SUN at node Nodesun
Uncatalog Database:
DB2 Uncatalog Database

The best way to view your local database:
DB2 List DB directory On/db2sys[dir_name]

To change the DB2 archive path:
DB2 Update DB CFG for CMSDB using LOGARCHMETH1 disk:/home/db2inst1/archlog

query DB2 under schema:
DB2 "SELECT * FROM Sysibm.sysschemata"

DB2 table Space Extension (Join container):
DB2 "Alter tablespace USERSPACE1 Add (file '/db2data/db2inst1/cmsdb/db2data/userspacefs01/c00000006. LRG ' 114688) "



db2 when doing a migration recovery, from 32-bit to 64-bit instances.

Need to do the following:
1, the source-side instance needs to be upgraded to 64-bit by using the DB2IUPDT command
root>./db2iupdt-w db2inst1
2, the source-side database is cold prepared
3, Change the source-side DB instance to 32-bit
Root>./db2iupdt-w db2inst1
4, transfer the backup to the target
5, restore on the target side, and upgrade the database
DB2 Migrade DB sundb

After the migration of the database, a large number of I/O waits occurred, and the analysis was caused by a small buffer pool setting in the DB2 database. Here's a case for querying and changing the buffer pool:
DB2 connect to SUNDB
DB2 "select Bpname,npages from Sysibm.sysbufferpools"
DB2 "Alter Bufferpool IBMDEFAULTBP immediate size 10000"
can participate: http://liqian-84.blog.163.com/blog/static/ 8813102010101562837232/
set up a federated database query (similar to Oracle Dblink): DB2 update dbm CFG using Federated Yesdb2stopdb2start

Frequently used DB2 command (2)

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.