Basic concepts of DB2

Source: Internet
Author: User

The concepts related to DB2 are confusing. It is not a system, but it will be placed here. With these basic concepts of DB2, we can find the context for subsequent learning.

Search sequence of environment variables:

When DB2 is started, it starts to search for variables at the instance level based on the sequence of environment variables, registration variables at the local level, and instance-level registration variables.

DB2 environment variable file:

# Find. -name db2profile. /home/db2inst1/sqllib/db2profile # find. -name db2cshrc. /home/db2inst1/sqllib/db2cshrc add db2profile (Bourne or Korn shell) or db2cshrc (C shell). login or. it takes effect in the profile UNIX initialization file.

Instance: in Windows, db2 sets the initial instance of the job database manager during installation. this instance is defined by the db2instance environment variable. when a service exists, you must ensure that the created instance name is different from the existing service name. in Linux. to create an instance, you must first create a user and a group with the same name as the instance. this is mainly because the user's home directory is used to store the job instance directory to the instance directory structure. if the user does not exist, an error is returned when you create an instance.

About the architecture: System --> multiple db2 instances --> each instance can manage one or more databases. One database only belongs to one instance. each instance is an independent operating environment. you can catalog databases and set configuration parameters. About block: Windows 1KB UNIX/Linux 512 bytes while the minimum storage unit of the operating system is data page (datapage) to ensure the throughput of multiple pages --> extent --> containers --> tablespace.

About nodes: the function of the node directory is equivalent to that of the netca netmgr client to connect to one or more remote databases. A node directory must be maintained. the node directory is in the instance directory by default. SQLNODIR and SQLNOBAK. SQLNOBAK is the previous backup. related commands: db2 list node directory db2 catalog TCPIPnode n1 remote 17.18.2.11 server 5000 uncatalog node n1 about the system db directory: the system database directory is the portal to access the database. Check whether the database exists in the directory first, then the local or remote db2 list db directory db2 catalog db mydbas yourdb at node mynode db2 uncatalog db sample1

The system database directory is in the instance directory by default. sqldbdir sqldbbak sqldbins sqldbbak is a backup of sqldbdir. Only the partitioned database will use the local system database directory content db2 list db directory on c:

Client-server communication steps: client-> node directory (identify the machine, Connection Service name, Port)-> database directory (determine the Database Name of the machine corresponding to the node directory)

MAIL: xcl_168@aliyun.com Blog: http://blog.csdn.net/xcl168

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.