免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6559 | 回复: 6
打印 上一主题 下一主题

请教:关于删除DB2实例下的数据库的问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-01-19 17:06 |只看该作者 |倒序浏览
本人在Linux安装DB2,因要使用sample数据库,发现无法连上sample,打算删除后再用db2sampl重建这个库,但无法重建,操作如下,向高手请教。

拜谢

这个库好像被同事非正常地删除过。

$ db2 list database directory

System Database Directory

Number of entries in the directory = 8

Database 1 entry:

Database alias                       = SETTLE
Database name                        = SETTLE
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

Database 2 entry:

Database alias                       = TMP
Database name                        = TMP
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

Database 3 entry:

Database alias                       = ALLWEB
Database name                        = ALLWEB
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

Database 4 entry:

Database alias                       = TRADE
Database name                        = TRADE
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

Database 5 entry:

Database alias                       = SINGLEE
Database name                        = SINGLEE
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

Database 6 entry:

Database alias                       = DBTMP
Database name                        = DBTMP
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

Database 7 entry:

Database alias                       = SAMPLE
Database name                        = SAMPLE
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

Database 8 entry:

Database alias                       = KSDBS
Database name                        = KSDBS
Local database directory             = /home/db2inst1
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0

$ db2 drop db sample
SQL1013N  The database alias name or database name "SAMPLE  " could not be
found.  SQLSTATE=42705

$ db2sampl
SQL1005N  The database alias "sample" already exists in either the local database directory or system database directory.
SQL1013N  The database alias name or database name "SAMPLE" could not be found.  SQLSTATE=42705

论坛徽章:
0
2 [报告]
发表于 2005-01-20 08:59 |只看该作者

请教:关于删除DB2实例下的数据库的问题?

把sample先 CATEGORY上,应该是没有被删除,只是把category信息删除了

论坛徽章:
0
3 [报告]
发表于 2005-01-20 10:31 |只看该作者

请教:关于删除DB2实例下的数据库的问题?

谢huyuhui001了,做以下尝试,不成功:

$ db2 catalog db sample
SQL1005N  The database alias "sample" already exists in either the local database directory or system database directory.

论坛徽章:
0
4 [报告]
发表于 2005-01-20 13:12 |只看该作者

请教:关于删除DB2实例下的数据库的问题?

Database 7 entry:

Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/db2inst1
Database release level = a.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0

不是已经有了么?直接用db2 connect to sample不行么?

论坛徽章:
0
5 [报告]
发表于 2005-01-23 19:45 |只看该作者

请教:关于删除DB2实例下的数据库的问题?

不是有sample吗?
不能用吗?

先drop后再重建!

论坛徽章:
0
6 [报告]
发表于 2012-01-11 14:52 |只看该作者
db2 uncatalog db sample

论坛徽章:
0
7 [报告]
发表于 2012-01-26 19:09 |只看该作者
学习学习啊。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP