[DB2 learning document 2] verification and Installation

Source: Internet
Author: User
Tags db2 error db2 installation ibm db2

Author: gnuhpc
Source: http://www.cnblogs.com/gnuhpc/

1. Access the data in the sample database to verify whether the DB2 server is successfully installed.
Process

  1. Log on to the system as the instance owner on Linux.
  2. On Windows, clickStartAnd then selectProgram> IBM DB2> [DB2 copy name]-> Setting tools> Step 1. In Linux and Windows, you can also enterDb2fsCommand to start "Step 1 ".
  3. SelectCreate a database. On the "create database" page, you will see the link to the DB2 information center used to create the sample database andCreate a sample databaseButton. ClickCreate a sample databaseTo start the "Create Sample Database" window.
  4. You can use some options to select the type and location of the database object to be created. You can choose to createSampleDatabase drive (on Windows) and used to createSampleDatabase directory (on Linux ).
  5. It may take several minutes to process this command. WhenSampleThe database receives the completion message. ClickOK.
  6. Start "control center ". On Windows, clickStartAnd then selectProgram> IBM DB2> [DB2 copy name]-> General Management Tools --> Control Center. In Linux, enterDb2ccCommand
  7. In the left pane of the Control Center screen, expand the object tree to viewSampleDatabases andSampleDatabase object. Select a table object to view it in the right pane of the Control Center screen.SampleDatabase table. Right-click the table name staff and select "query ". In the "command Editor" window, click the run button to execute the query and view the result set.

2. Use the CLP command line processor to verify installation:
1. log on to the system as a user with sysadm permissions.
2. Enter the db2start command to start the Database Manager.
3. Enter the db2sampl command to create the sample database.
It may take several minutes to process this command. The message is not completed. When a command prompt is returned, the process is completed.
When you create a sample database, the database is automatically catalogued with the database alias sample.
4. Connect to the sample database, retrieve the list of all employees working in department 20, and reset the database connection. Enter the following command from the command line processor (CLP:
Connect to the sample database
DB2 => connect to sample
List related tables
DB2 => List tables
Select all employees in department 20 using the SQL SELECT statement shown in
DB2 => select * from staff where dept = 20
Reset existing connections:
DB2 => connect Reset
Create a samp2 Database
DB2 => Create Database samp2
After the DB2 command line processor, you can useterminateCommand to exit
DB2 => terminate
After verification and installation, you can remove the sample database to release disk space. Enter the DB2 drop database sample command to delete the sample database.
3. directory structure of the installed DB2 database product (Linux)

Directory structure-default local database directory information of DB2 instance db2inst1

  1. Local Database directory.
  2. Database Configuration File

Directory structure-directory information of DB2 instance db2inst1

  1. The db2diag. log file in this directory records DB2 error messages.
  2. System database directory
  3. The db2nodes. cfg file is used to partition the database environment.
  4. Database Manager Configuration File

Dasusr1The directory contains the DAS configuration file and symbolic links to the DB2 core file.

Directory structure-location of the Installation Log File of the DB2 product installed in/opt/IBM/DB2/v9.1

This figure illustrates the location of the Installation Log File. If there are multiple installations under the same installation pathDb2install. HistoryFile index isDb2install. History. nWhere n represents the number of four digits, such as 0000 or 0001.

DB2 installation directory/Opt/IBM/DB2/v9.1Contains the installed DB2 file.

Author: gnuhpc
Source: http://www.cnblogs.com/gnuhpc/

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.