UNIX: 直接切换实例用户,su - instxxx
windows: 设置环境变量db2instance
# su - inst14
$ db2 get instance
The current database manager instance is: inst14
$
$ exit
# su - inst15
$ db2 get instance
The current database manager instance is: inst15
$
$ exit
#
windows: 设置环境变量db2instance
E:/> set db2instance=db2
E:/>db2 get instance
当前数据库管理器实例是:DB2
E:/> set db2instance=db2_wzgl
E:/>db2 get instance
当前数据库管理器实例是:DB2_WZGL
E:/>