Existing "SAMPLE" database found...

下面是我解决这个问题看到的一个帖子,不错!我就是照着来的(给新手看的):

I am trying to open up sample database but i cannot go through and it pop up with these message : Existing "SAMPLE" database found...    The "-force" option was not specified...  Attempt to create the database "SAMPLE" failed.  SQL1005N  The database alias "SAMPLE" already exists in either the localdatabase directory or system database directory.

Is there anyone who can help me on it 

Thank you 

STEP 1: Check first on system db directory >db2 list db directory.  if you find the SAMPLE here just uncatalog it through the command>db2 uncatalog db sample. This should solve the problem because the entry is removed from system db directory. Now you can freshly create a SAMPLE database and work with it.

If you don't find SAMPLE in system db directory then go to STEP 2

STEP 2:  Check in local db directory >db2 list db directory on <directory path (or) drive name>

if you find the entry SAMPLE here, then catalog the db SAMPLE first , using the command

>db2 catalog db sample as sample , this will make an entry into system db directory. Now the SAMPLE is in both System directory and local directory. So it shouldn't give you "databe not found" error. you can connect and work with it.

If you wish you can drop the database SAMPLE. Then again create it afresh and work with it.

try it, good luck!

我把DB2装在D盘,刚开始看一些网上的解决问题的办法,说找到磁盘上数据库存储文件,然后删了就搞定了。但是对于一个初学者,这也不是一件简单的事啊!(菜鸟懂的)

因为根本不知道那个文件夹存储着数据库的文件,怎么删啊???因此纠结了半天。我也是这样,但是通过了上面的帖子,我找到了,一个名为DB2的文件夹,删了O了!!!希望对初学者有用!共勉

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值