--1.查看是否有活動(dòng)的鏈接
db2 list applications for db DB_NAME
--2.關(guān)閉連接
db2 force application all
--3.再執(zhí)行一次步驟1中的命令产艾,查看鏈接是否全部關(guān)閉。
--4.執(zhí)行停止實(shí)例命令 注意:命令中沒(méi)有空格
db2stop
--5.執(zhí)行實(shí)例啟動(dòng)命令
db2start
--6.如果此時(shí)搀崭,發(fā)現(xiàn)連接不了數(shù)據(jù)庫(kù)佑稠,莫慌秒梅,需要激活目標(biāo)數(shù)據(jù)庫(kù)
--首先查看是否有活躍的數(shù)據(jù)庫(kù)
db2 list active databases
--如果沒(méi)有,需要對(duì)目標(biāo)數(shù)據(jù)庫(kù)進(jìn)行激活設(shè)置
db2 activate database DB_NAME
--快速方法 不建議
db2stop force
--查看系統(tǒng)數(shù)據(jù)庫(kù)目錄
db2 list db directory
--查看節(jié)點(diǎn)名
db2 list node directory
--節(jié)點(diǎn)編目
db2 catalog tcpip node node_name remote IP server PROT
--數(shù)據(jù)庫(kù)編目
db2 catalog db db_name as db_alias at node node_name