DB2中安裝sample資料庫和TOLLSDB資料庫
安裝示例資料庫和TOOLSDB資料庫:
安裝完成後,欲登陸sample資料庫和toolsdb,發現出錯:
db2 => connect to sample
SQL1031N The database directory cannot be found on the indicated file system.
db2 => connect to toolsdb
SQL1031N The database directory cannot be found on the indicated file system.
1、 猜想資料庫未安裝,檢視/hom/db2inst1目錄下的,僅有sqllib資料夾:
[db2inst1@localhost ~]$ ls
sqllib
對比下其他學員的情況,發現本人的伺服器上少了一個db2inst1目錄:
[db2inst1@localhost ~]$ ls
db2inst1 sqllib
2、下面手動對兩個資料庫進行建立:
2.1、建立示例資料庫:
[db2inst1@localhost ~]$ db2sampl
Creating database "SAMPLE"...
Connecting to database "SAMPLE"...
Creating tables and data in schema "DB2INST1"...
Creating tables with XML columns and XML data in schema "DB2INST1"...
'db2sampl' processing complete.
2.2、建立toolsbd資料庫:
[db2inst1@localhost NODE0000]$ db2 create tools catalog systools create new database toolsdb
DB20000I The CREATE TOOLS CATALOG command completed successfully.
2.3、確認相應資料庫檔案建立的情況:
[db2inst1@localhost NODE0000]$ cd
[db2inst1@localhost ~]$ ls
db2inst1 sqllib
[db2inst1@localhost ~]$ cd db2inst1/
[db2inst1@localhost db2inst1]$ ls
NODE0000
[db2inst1@localhost db2inst1]$ cd NODE0000/
[db2inst1@localhost NODE0000]$ ls
SAMPLE SQL00001 SQL00002 sqldbdir TOOLSDB
2.4、登陸資料庫。首先登陸到sample,然後斷開與該資料庫的連線,再連線到toolsdb:
[db2inst1@localhost NODE0000]$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.1
You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
For more detailed help, refer to the Online Reference Manual.
db2 => connect to sample
Database Connection Information
Database server = DB2/LINUX 9.7.1
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
db2 => disconnect sample
DB20000I The SQL DISCONNECT command completed successfully.
db2 => connect to toolsdb
Database Connection Information
Database server = DB2/LINUX 9.7.1
SQL authorization ID = DB2INST1
Local database alias = TOOLSDB
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14600958/viewspace-668553/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- db2 資料庫DB2資料庫
- MongoDB資料庫安裝MongoDB資料庫
- Redis 資料庫安裝Redis資料庫
- oricle資料庫安裝資料庫
- GreenPlum資料庫安裝資料庫
- 下載和安裝MySQL資料庫MySql資料庫
- 在FreeBSD中安裝MySQL資料庫MySql資料庫
- PostgreSQL 資料庫學習 - 0. 資料庫安裝SQL資料庫
- Oracle 資料庫打包安裝Oracle資料庫
- Ubuntu安裝MySQL資料庫UbuntuMySql資料庫
- tar方式安裝資料庫資料庫
- 達夢資料庫安裝資料庫
- 「Oracle」Oracle 資料庫安裝Oracle資料庫
- Hbase資料庫安裝部署資料庫
- 【PG資料庫】PG資料庫的安裝及連線方法資料庫
- db2資料庫的啟動和關閉DB2資料庫
- Redis(1)- Redis資料庫的安裝和配置Redis資料庫
- oracle rac資料庫的安裝Oracle資料庫
- 講解Linux資料庫安裝Linux資料庫
- Linux下安裝Mysql資料庫LinuxMySql資料庫
- vgant 安裝oracle資料庫racOracle資料庫
- 安裝MySQL8資料庫MySql資料庫
- sqlserver資料庫下載安裝SQLServer資料庫
- Linux安裝MariaDB資料庫-1Linux資料庫
- 1. PostgreSQL 資料庫安裝SQL資料庫
- 如何在windows中安裝達夢資料庫?Windows資料庫
- 如何在FreeBSD 13中安裝MySQL資料庫MySql資料庫
- 帶你輕鬆接觸”DB2″資料庫中的資料型別DB2資料庫資料型別
- db2匯出資料庫定義及遷移資料DB2資料庫
- Alibaba Cloud Linux 安裝 PostgreSQL 資料庫CloudLinuxSQL資料庫
- MySQL資料庫安裝步驟-WindowsMySql資料庫Windows
- Oracle 12c資料庫安裝Oracle資料庫
- [20200102]資料庫安裝問題.txt資料庫
- python資料庫-MongoDB的安裝(53)Python資料庫MongoDB
- 在anlions os上安裝資料庫資料庫
- Vastbase G100資料庫安裝AST資料庫
- PG-pg資料庫安裝vector資料庫
- docker 安裝執行mysql資料庫DockerMySql資料庫
- RAC之資料庫軟體安裝資料庫