此文章主要讲述的是在DB2数据库中安装sample数据库与TOLLSDB数据库的正确操作步骤,以及对安装sample数据库与TOLLSDB数据库是我的小的细节操作的介绍,以下就是文章的主要内容讲述。
成都创新互联公司专注于企业成都全网营销推广、网站重做改版、振兴网站定制设计、自适应品牌网站建设、H5高端网站建设、成都商城网站开发、集团公司官网建设、外贸营销网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为振兴等各大城市提供网站开发制作服务。
数据库, sample, TOLLSDB数据库, 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、 猜想DB2数据库未安装,查看/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、确认相应DB2数据库文件创建的情况:
- [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
以上的相关内容就是对DB2数据库中安装sample数据库和TOLLSDB数据库的介绍,望你能有所收获。
分享标题:DB2数据库中安装sample数据库与TOLLSDB的步骤描述
文章地址:http://www.shufengxianlan.com/qtweb/news8/248258.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联