Steps for installing the sample database and TOLLSDB In the DB2 database

Source: Internet
Author: User

This article describes how to install the sample database and the TOLLSDB database in the DB2 database, and how to install the sample database and the TOLLSDB database, the following describes the main content of the article.

Database, sample, TOLLSDB database, sample, TOLLSDB

Install the sample database and TOOLSDB database:

After the installation is complete, log on to the sample database and toolsdb and find the error:

 
 
  1. db2 => connect to sample  
  2. SQL1031N The database directory cannot be found on the indicated file system.  
  3. db2 => connect to toolsdb  
  4. SQL1031N The database directory cannot be found on the indicated file system.  

1. Assume that the DB2 database is not installed. Check that only the sqllib folder is in the/hom/db2inst1 directory:

 
 
  1. [db2inst1@localhost ~]$ ls  
  2. sqllib  

Compared with other students, I found that my server has a db2inst1 directory missing:

 
 
  1. [db2inst1@localhost ~]$ ls  
  2. db2inst1 sqllib  

2. Create two databases manually as follows:

2.1 create a sample database:

 
 
  1. [db2inst1@localhost ~]$ db2sampl  
  2. Creating database "SAMPLE"...  
  3. Connecting to database "SAMPLE"...  
  4. Creating tables and data in schema "DB2INST1"...  
  5. Creating tables with XML columns and XML data in schema "DB2INST1"...  
  6. 'db2sampl' processing complete.  

2.2 create a toolsbd database:

 
 
  1. [db2inst1@localhost NODE0000]$ db2 create tools catalog systools create new database toolsdb  
  2. DB20000I The CREATE TOOLS CATALOG command completed successfully.  

2.3 confirm the creation of the corresponding DB2 database file:

 
 
  1. [db2inst1@localhost NODE0000]$ cd  
  2. [db2inst1@localhost ~]$ ls  
  3. db2inst1 sqllib  
  4. [db2inst1@localhost ~]$ cd db2inst1/  
  5. [db2inst1@localhost db2inst1]$ ls  
  6. NODE0000  
  7. [db2inst1@localhost db2inst1]$ cd NODE0000/  
  8. [db2inst1@localhost NODE0000]$ ls  
  9. SAMPLE SQL00001 SQL00002 sqldbdir TOOLSDB  

2.4. log on to the database. Log on to the sample, disconnect the database, and connect to toolsdb:

 
 
  1. [db2inst1@localhost NODE0000]$ db2  
  2. (c) Copyright IBM Corporation 1993,2007  
  3. Command Line Processor for DB2 Client 9.7.1  
  4. You can issue database manager commands and SQL statements from the command  
  5. prompt. For example:  
  6. db2 => connect to sample  
  7. db2 => bind sample.bnd  
  8. For general help, type: ?.  
  9. For command help, type: ? command, where command can be  
  10. the first few keywords of a database manager command. For example:  
  11. ? CATALOG DATABASE for help on the CATALOG DATABASE command  
  12. ? CATALOG for help on all of the CATALOG commands.  
  13. To exit db2 interactive mode, type QUIT at the command prompt. Outside  
  14. interactive mode, all commands must be prefixed with 'db2'.  
  15. To list the current command option settings, type LIST COMMAND OPTIONS.  
  16. For more detailed help, refer to the Online Reference Manual.  
  17. db2 => connect to sample  
  18. Database Connection Information  
  19. Database server = DB2/LINUX 9.7.1  
  20. SQL authorization ID = DB2INST1 
  21. Local database alias = SAMPLE 
  22. db2 => disconnect sample  
  23. DB20000I The SQL DISCONNECT command completed successfully.  
  24. db2 => connect to toolsdb  
  25. Database Connection Information  
  26. Database server = DB2/LINUX 9.7.1  
  27. SQL authorization ID = DB2INST1 
  28. Local database alias = TOOLSDB   

The above content is an introduction to the installation of the sample database and the TOLLSDB database in the DB2 database. I hope you will gain 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.