데이터 베이스 MySQL 튜토리얼 DB2数据库的SQL1042C错误解决案例

DB2数据库的SQL1042C错误解决案例

Jun 07, 2016 pm 05:41 PM

测试机上一个老的DB2数据库在正常停库后,在启库时报SQL1042C错误。具体信息如下:#su-db2inst1$db2start2013-04-2313:23:0800SQL1042CAnunexpectedsystemerroro

 测试机上一个老的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    查看跟踪文件,香港服务器,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 -n “DB2ESE” 2 (注:2对应系统的处理器个数)即可。

命令如下:

#/home/db2inst1/sqllib/adm/db2licm -n "DB2ESE" 2

DBI1418I The number of licensed processors on this system has 

          been updated successfully.  
 

然后再看,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           = "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                       = ""   

 

再启数据库发现依然报SQL1042C错误

 

$ 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

 

继续查看日志发现有如下信息:

PID     : 315522               TID  : 1           PROC : db2sysc 0

INSTANCE: db2inst1             NODE : 000

FUNCTION: DB2 UDB, oper system services, sqloRunInstance, probe:210

CALLED  : OS, -, unspecified_system_function

OSERR   : EPERM (1) "Not owner"

 

针对这个问题,可以用如下方法解决:

1) 停止所有DB2进程

#ps -ef | grep db2

如有DB2进程,可以强制终止(kill),确保所有DB2进程已终止;

 

2) 执行以下语句

#/usr/opt/db2_08_01/instance/db2iupdt tstdb   #实例名

or

 

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滴水穿石

  

本文出自 “滴水穿石” 博客,请务必保留此出处

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

Docker에서 MySQL 메모리 사용을 줄입니다 Docker에서 MySQL 메모리 사용을 줄입니다 Mar 04, 2025 pm 03:52 PM

Docker에서 MySQL 메모리 사용을 줄입니다

Alter Table 문을 사용하여 MySQL에서 테이블을 어떻게 변경합니까? Alter Table 문을 사용하여 MySQL에서 테이블을 어떻게 변경합니까? Mar 19, 2025 pm 03:51 PM

Alter Table 문을 사용하여 MySQL에서 테이블을 어떻게 변경합니까?

MySQL의 문제를 해결하는 방법 공유 라이브러리를 열 수 없습니다. MySQL의 문제를 해결하는 방법 공유 라이브러리를 열 수 없습니다. Mar 04, 2025 pm 04:01 PM

MySQL의 문제를 해결하는 방법 공유 라이브러리를 열 수 없습니다.

Linux에서 MySQL을 실행합니다 (Phpmyadmin이있는 Podman 컨테이너가 포함되지 않음) Linux에서 MySQL을 실행합니다 (Phpmyadmin이있는 Podman 컨테이너가 포함되지 않음) Mar 04, 2025 pm 03:54 PM

Linux에서 MySQL을 실행합니다 (Phpmyadmin이있는 Podman 컨테이너가 포함되지 않음)

sqlite 란 무엇입니까? 포괄적 인 개요 sqlite 란 무엇입니까? 포괄적 인 개요 Mar 04, 2025 pm 03:55 PM

sqlite 란 무엇입니까? 포괄적 인 개요

MacOS에서 여러 MySQL 버전을 실행 : 단계별 가이드 MacOS에서 여러 MySQL 버전을 실행 : 단계별 가이드 Mar 04, 2025 pm 03:49 PM

MacOS에서 여러 MySQL 버전을 실행 : 단계별 가이드

인기있는 MySQL GUI 도구는 무엇입니까 (예 : MySQL Workbench, Phpmyadmin)? 인기있는 MySQL GUI 도구는 무엇입니까 (예 : MySQL Workbench, Phpmyadmin)? Mar 21, 2025 pm 06:28 PM

인기있는 MySQL GUI 도구는 무엇입니까 (예 : MySQL Workbench, Phpmyadmin)?

MySQL 연결에 대한 SSL/TLS 암호화를 어떻게 구성합니까? MySQL 연결에 대한 SSL/TLS 암호화를 어떻게 구성합니까? Mar 18, 2025 pm 12:01 PM

MySQL 연결에 대한 SSL/TLS 암호화를 어떻게 구성합니까?

See all articles