$ db2 get instance
The current database manager instance is: db2inst1
如果不是想要使用的instance,下一步进行切换
$ export DB2INSTANCE=db2inst2
修改环境变量
$ db2 get instance
The current database manager instance is: db2inst1
还是db2inst1,这里需要terminate一次
$ db2 terminate
DB20000I The TERMINATE command completed successfully.
$ db2 get instance
The current database manager instance is: db2inst2