su - db2inst1 切换到实例用户
mkdir -p /tmp/dbbak 创建目录
db2 backup db teps to /tmp/dbbak 备份数据库
db2 drop db teps 删除数据库
/opt/IBM/ITM/bin/itmcmd agent start cq 启动cq
cd /opt/IBM/ITM/logs
tail -f hejun_cq_4af388ef-01.log 有以下错误
(4AF3891C.0034-1:ctsqlconnectionsql1.cpp,732,"CTSQLEvaluatorSQL1_i::Connection::_init") KFW1013W SQL1: Hub lookup and connection failed. rc: 5
(4AF3891C.0035-1:ctsqlconnectionsql1.cpp,739,"CTSQLEvaluatorSQL1_i::Connection::_init") KFW1010I SQL1: Sleeping 10 seconds...
(4AF38926.0000-1:ctsqlconnectionsql1.cpp,666,"CTSQLEvaluatorSQL1_i::Connection::_init") KFW1007I SQL1: Looking for hub: 'ip.pipe:hejun', retry 1 ...
(4AF38926.0001-1:kdcc1sr.c,460,"rpc__sar") Connection failure: "ip.pipe:#127.0.0.1:1918", 1C010001:1DE00045, 0, 5(2), FFFF/2, d65200:1.1.1.10, tms_ctbs62fp1:d8129a
(4AF38926.0002-1:kdcl0cl.c,129,"KDCL0_ClientLookup") status=1c020006, "location server unavailable", ncs/KDC1_STC_SERVER_UNAVAILABLE
(4AF38926.0003-1:kdsnccns.c,260,"NCSErrorMessage") CT/DS RPC Error: DSR040 - lb__lookup_annotation abnormal return
需要启动TEMS,启动后出现以下错误
(4AF3893A.000C-8:ctsqlconnectionodbc.cpp,138,"CTSQLEvaluatorODBC_i::Connection::sqlErrorCheck") [IBM][CLI Driver] SQL1013N The database alias name or database name "TEPS" could not be found. SQLSTATE=42705
+4AF3893A.000C ERR: -1013,
+4AF3893A.000C SQLDriverConnect rc=-1: SQL_ERROR
(4AF3893A.000D-8:ctpropertysequence.cpp,639,"CTPropertySequence::Dump") ---> name = SQL Exception: dsn = TEPS
(4AF3893A.000E-8:ctpropertysequence.cpp,639,"CTPropertySequence::Dump") -----> -2101a = -1 L
(4AF3893A.000F-8:ctpropertysequence.cpp,639,"CTPropertySequence::Dump") -----> -2102 = "[IBM][CLI Driver] SQL1013N The database alias name or database name "TEPS" could not be found. SQLSTATE=42705
+4AF3893A.000F ERR: -1013,
+4AF3893A.000F SQLDriverConnect rc=-1: SQL_ERROR"
(4AF3893A.0010-8:ctsqlaccessodbc.cpp,288,"CTSQLEvaluatorODBC_i::IssueStatementWorker::run") ERROR: unable to establish database connection to 'TEPS'
(4AF3893A.0011-1:ctpropertysequence.cpp,639,"CTPropertySequence::Dump") ---> name = EXCEPTION: Previous SQL Exception: connection = 0x44454008
(4AF3893A.0012-1:ctpropertysequence.cpp,639,"CTPropertySequence::Dump") -----> -2101a = 99 L
(4AF3893A.0013-1:ctpropertysequence.cpp,639,"CTPropertySequence::Dump") -----> -2102 = "ERROR: unable to establish database connection to 'TEPS'"
提示找不到TEPS database ,不能建立连接. 错误出现.
开如修复
停止cq (/opt/IBM/ITM/bin/itmcmd agent stop cq)
/opt/IBM/ITM/itmcmd config -A cq 重新配置
[root@hejun /opt/IBM/ITM/bin]# ./itmcmd config -A cq
Agent configuration started...
Edit "Common event console for IBM Tivoli Monitoring" settings? [ 1=Yes, 2=No ] (default is: 1):
Edit 'ITM Connector' settings? [ 1=Yes, 2=No ] (default is: 1):
Enable this connector [ 1=Yes, 2=No ] (default is: 1):
Connector name (default is: ITM1):
Maximum number of events for this connector (default is: 100):
View closed events [ 1=Yes, 2=No ] (default is: 2):
Edit 'Names of Extra Columns' settings? [ 1=Yes, 2=No ] (default is: 1):
Name of extra column 1 (default is: ):
Name of extra column 2 (default is: ):
Name of extra column 3 (default is: ):
Name of extra column 4 (default is: ):
Name of extra column 5 (default is: ):
Will this agent connect to a TEMS? [1=YES, 2=NO] (Default is: 1): TEMS Host Name (Default is: hejun):
Network Protocol [ip, sna, ip.pipe, or ip.spipe] (Default is: ip.pipe):
Now choose the number of next protocol from one of these:
- ip
- sna
- ip.spipe
- 0 for none
Network Protocol 2 (Default is: 0):
IP.PIPE Port Number (Default is: 1918):
Enter name of KDC_PARTITION [type 0 for null] (Default is: 0):
Enter Optional Primary Network Name or 0 for "none" (Default is: 0):
Enable SSL for TEP Clients (1=Yes, 2=No)(Default is: 2):
Enter the DB2 instance name(Default is: db2inst1):
Enter the DB2 admin ID(Default is: db2inst1):
Enter the password for the DB2 admin ID(Default is: ******):
Re-type: Enter the password for the DB2 admin ID(Default is: ******):
Enter the TEPS DB2 database name(Default is: TEPS):
Enter the TEPS DB2 database login ID(Default is: itmuser):
Enter the password for the TEPS DB2 database login ID(Default is: ******):
Re-type: Enter the password for the TEPS DB2 database login ID(Default is: ******):
Is it OK to create the TEPS login ID if not found (1=Yes, 2=No)(Default is: 1):
Are you using DB2 or Oracle(JDBC) for Warehouse? [D=DB2, J=JDBC] (Default is: D):
Enter the Warehouse database name(Default is: WAREHOUS):
Enter the Warehouse user ID(Default is: itmuser):
Enter the password for the Warehouse user ID(Default is: ******):
Re-type: Enter the password for the Warehouse user ID(Default is: ******):
LDAP Security: Validate User with LDAP ? (1=Yes, 2=No)(Default is: 2):
Tivoli Enterprise Portal server configuration was updated to reflect Eclipse Help Server configuration changes.
... running InstallPresentation.sh
... InstallPresentation.sh completed
Agent configuration completed...
[root@hejun /opt/IBM/ITM/bin]#
[db2inst1@hejun ~]$ db2 list db directory
System Database Directory
Number of entries in the directory = 2
Database 1 entry:
Database alias = TEPS
Database name = TEPS
Local database directory = /home/db2inst1
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = WAREHOUS
Database name = WAREHOUS
Local database directory = /home/db2inst1
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
[db2inst1@hejun ~]$
启动后能登录,但是数据全掉.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22775238/viewspace-618284/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22775238/viewspace-618284/