Description of the actual operation solution for manually adding a database to DB2

Source: Internet
Author: User
Tags db2 client db2 express

This article mainly describes the actual operation scheme for manually adding a database to DB2, as well as the matters worth attention in its actual operations and the description of its actual application code, the following is a detailed description of the main content of the article. I hope you will have a better understanding of it after browsing.

Test environment: Windows XP

DB2 version information

D: DB2BIN> db2level

DB2 1085i instance "DB2" uses "32" bit and DB2 code release version "SQL09050", with the level ID "03010107 ".

Refer to "DB2 v9.5.0.808", "s071001", and "NT3295" with revision package "0 ".

The product uses the DB2 copy name "DB2COPY1" installed in "D: DB2.

 
 
  1. D: DB2BIN> db2licm-l
  2. Product name: "DB2 Express-C"
  3. License type: "unsecured"
  4. Expiry date: "permanent"
  5. Product identifier: "db2expc"
  6. Version info: "9.5"
  7. Max number of CPUs: "2"
  8. D: DB2BIN>

Create a database before manually adding a database to DB2

Step 1: Install DB2 (omitted)

Step 2: Configure related directories

 
 
  1. mkdir d:db2study  
  2. db2set DB2_CREATE_DB_ON_PATH=YES 

Note: The database I created should be stored in the d: db2study directory. Because I want to specify the database path in the create script, the DB2_CREATE_DB_ON_PATH registry key must be activated.

Step 3: Start a DB2 instance

 
 
  1. D:DB2BIN>db2  
  2. (c) Copyright IBM Corporation 1993,2007 

DB2 client 9.5.0 command line Processor

You can issue Database Manager commands and SQL statements from a command prompt. For example:

 
 
  1. db2 => connect to sample  
  2. db2 => bind sample.bnd 

For general help, enter :?.

For Command help, enter :? Command, where command can be

The first few keywords of the Database Manager Command. For example:

? Catalog database is used to help with the catalog database Command

? CATALOG is used to help all CATALOG commands.

To exit the db2 interaction mode, enter QUIT at the command prompt. In non-interactive mode, all commands must be prefixed with "db2.

To LIST the settings of the current command options, enter list command options.

For more help, see Online Reference Manual.

 
 
  1. Db2 => db2start
  2. The DB20000I DB2START command is successfully completed.
  3. Db2 =>

DB20000I drop database life

The above content is an introduction to manually adding a database to DB2. I hope you will get some benefits.

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.