新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
DB2如何安裝實例數(shù)據(jù)庫和TOLLSDB數(shù)據(jù)庫
安裝完成后,欲登陸sample數(shù)據(jù)庫和toolsdb,發(fā)現(xiàn)出錯:

創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供云和網(wǎng)站建設(shè)、云和做網(wǎng)站、云和網(wǎng)站設(shè)計、云和網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、云和企業(yè)網(wǎng)站模板建站服務,十年云和做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務。
- 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、 猜想數(shù)據(jù)庫未安裝,查看/hom/db2inst1目錄下的,僅有sqllib文件夾:
- [db2inst1@localhost ~]$ ls
- sqllib
對比下其他學員的情況,發(fā)現(xiàn)本人的服務器上少了一個db2inst1目錄:
- [db2inst1@localhost ~]$ ls
- b2inst1 sqllib
2、下面手動對兩個數(shù)據(jù)庫進行創(chuàng)建:
2.1、創(chuàng)建示例數(shù)據(jù)庫:
- [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、創(chuàng)建toolsbd數(shù)據(jù)庫:
- [db2inst1@localhost NODE0000]$ db2 create tools catalog systools create new database toolsdb
- DB20000I The CREATE TOOLS CATALOG command completed successfully.
2.3、確認相應數(shù)據(jù)庫文件創(chuàng)建的情況:
- [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、登陸數(shù)據(jù)庫。首先登陸到sample,然后斷開與該數(shù)據(jù)庫的連接,再連接到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
【編輯推薦】
- 在DB2中正確導出LOB數(shù)據(jù)
- DB2外部文件格式淺析
- DB2數(shù)據(jù)庫設(shè)計的三個建議
- 解析DB2與非DB2數(shù)據(jù)庫之間遠程復制
- DB2數(shù)據(jù)庫基本操作指令30條
網(wǎng)站欄目:DB2如何安裝實例數(shù)據(jù)庫和TOLLSDB數(shù)據(jù)庫
URL鏈接:http://www.5511xx.com/article/djpdcih.html


咨詢
建站咨詢
