下面是我解决这个问题看到的一个帖子,不错!我就是照着来的(给新手看的):
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了!!!希望对初学者有用!共勉