测试机上一个老的DB2数据库在正常停库后,在启库时报SQL1042C错误。具体信息如下:
# su - db2inst1
$ db2start
2013-04-23 13:23:08 0 0 SQL1042C An unexpected system error occurred.
SQL1032N No start database manager command was issued. SQLSTATE=57019
这个错误必须要检查的信息:
o 看看文件系统的空间是否足够
o 查看是否有足够的内存和交换/调页空间可用
o 系统时间和日期设置正确,关系到db2授权许可的过期
o 查看跟踪文件,db2diag.log里面的内容来确认问题的所在
经过检查,前三个问题正常。现在查看DB2DIAG.LOG日志,有如下信息需注意
PID : 1388642 TID : 1 PROC : db2star2
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, base sys utilities, LicCheckProcessors, probe:20
MESSAGE : ADM12017E The number of processors on this machine exceeds the
defined entitlement of "1" for the product "DB2 Enterprise Server
Edition". The number of processors on this machine is "2". You should
purchase additional processor based entitlements from your IBM
representative or authorized dealer and update your license using the
License Center or the db2licm command line utility. For more
information on updating processor based licenses, refer to the Quick
Beginnings manual for your platform. For more information on the
db2licm utility, refer to the DB2 Command Reference.
这个问题CPU的授权许可,关于这个问题可以查看一下许可文件信息
$ db2licm -l
Product Name = "DB2 Enterprise Server Edition"
Product Identifier = "DB2ESE"
Version Information = "8.2"
Expiry Date = "Permanent"
Registered Connect User Policy = "Disabled"
Number Of Entitled Connect Users = "5"
Enforcement Policy = "Soft Stop"
Number of processors = "2"
Number of licensed processors = "1"
Database partitioning feature = "Not entitled"
Annotation = ""
Other information = ""
Product Name = "DB2 High Availability Disaster Recovery
Option"
Product Identifier = "DB2HADR"
Version Information = "8.2"
Expiry Date = "Permanent"
Annotation = ""
Other information = ""
Product Name = "DB2 Advanced Security Option"
Product Identifier = "DB2ASO"
Version Information = "8.2"
Expiry Date = "Permanent"
Annotation = ""
Other information = ""
$ db2licm -l
Product Name = "DB2 Enterprise Server Edition"
Product Identifier = "DB2ESE"
Version Information = "8.2"
Expiry Date = "Permanent"
Registered Connect User Policy = "Disabled"
Number Of Entitled Connect Users = "5"
Enforcement Policy = "Soft Stop"
Number of processors = "2"
Number of licensed processors = "2"
Database partitioning feature = "Not entitled"
Annotation = ""
Other information = ""
Product Name = "DB2 High Availability Disaster Recovery
Option"
Product Identifier = "DB2HADR"
Version Information = "8.2"
Expiry Date = "Permanent"
Annotation = ""
Other information = ""
Product Name = "DB2 Advanced Security Option"
Product Identifier = "DB2ASO"
Version Information = "8.2"
Expiry Date = "Permanent"
Annotation = ""
Other information = ""
$ db2start
2013-04-23 13:59:28 0 0 SQL1042C An unexpected system error occurred.
SQL1032N No start database manager command was issued. SQLSTATE=57019
1) 停止所有DB2进程
#ps -ef | grep db2
如有DB2进程,可以强制终止(kill),确保所有DB2进程已终止;
2) 执行以下语句
#/usr/opt/db2_08_01/instance/db2iupdt tstdb #实例名
or
#/usr/opt/db2_08_01/instance/db2iupdt -e
db2inst1
db2inst2
DBI1070I Program db2iupdt completed successfully.
注:更新实例,用于实例获得一些新的产品选项(特别是更改后)或修订包的访问权。
然后再启
$ db2start
2013-04-23 14:23:39 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
$ db2 connect to tstdb
Database Connection Information
Database server = DB2/6000 8.2.3
SQL authorization ID = DB2INST1
Local database alias = tstdb
最后数据库终于起来了,经测试一切正常。
微信二维码 51CTO滴水穿石