具体解决方案:
在建立数据库时遇到数据库别名已存在的问题时,可以:
1)首先用 db2 list database directory 命令查看系统数据库目录(System Database
Directory)中有没有该数据库。如果有,应该再确定该数据库是没有用的数据库之后用 db2
drop database 数据库名将其删除。
2)如果没有,再用 db2 list database directory on location 看在本端数据库目录(Local
Database Directory)中有没有该数据库,location指定数据库的位置(如Windows下的C: ,Unix
下的/home/db2inst1)。如果有,先用 db2 catalog database 数据库名 on location 将数据库
catalog到节点上,再对其进行删除处理。