Common DB2 Commands (2)

Source: Internet
Author: User
Tags 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 (add container):
DB2 "Alter tablespace USERSPACE1 Add (file '/db2data/db2inst1/cmsdb/db2data/userspacefs01/c00000006. LRG ' 114688) "



DB2 When doing migration recovery, from 32-bit to 64-bit instances. The following processing is required:
1. The source-side instance needs to be upgraded to 64-bit using the DB2IUPDT command first
Root>./db2iupdt-w Db2inst1
2, the source-side database to do cold standby
3. Change the source-side DB instance to 32-bit
Root>./db2iupdt-w Db2inst1
4, transfer backup to the target side
5, on the target side to do recovery and upgrade the database
DB2 Migrade DB SUNDB

after the database is migrated, there is a large number of I/O waits, which is analyzed as the buffer pool setting of the DB2 database is too small, the following provides a query and changes to the buffer pool case:
DB2 Connect to Sundb
DB2 "Select Bpname,npages from Sysibm.sysbufferpools"
DB2 "Alter Bufferpool IBMDEFAULTBP immediate size 10000"
Refer to: 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

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.