签到成功

知道了

CNDBA社区CNDBA社区

db2 SQL5035N

2024-01-18 16:47 688 0 原创 DB2
作者: hbhe0316

Question & Answer

Question
In DB2 v10.x why receiving SQL5035N when connecting to database even if the database level is the same as the instance level?http://www.cndba.cn/hbhe0316/article/131504http://www.cndba.cn/hbhe0316/article/131504

Cause
In DB2 v10.x if the file ownership of the local database directory is wrong when connecting to database, SQL5035N will be received.http://www.cndba.cn/hbhe0316/article/131504

The following example shows that the database release level is v10 but the ownership of SQL00001 is incorrectly changed to root. When connect to the database it gives confusing error SQL5035N and upgrade db command will not help.

drwxr-x—- 6 root system 4096 May 23 2013 SQL00001

http://www.cndba.cn/hbhe0316/article/131504
http://www.cndba.cn/hbhe0316/article/131504http://www.cndba.cn/hbhe0316/article/131504

$ db2 list db directory

System Database Directory

Number of entries in the directory = 1

Database 1 entry:

http://www.cndba.cn/hbhe0316/article/131504

Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home2/db2ins10
Database release level = f.00

$ db2 connect to sample
SQL5035N The database must be upgraded to the current release.
SQLSTATE=55001

In db2diag.log, the following message will report that the file permission issue happens when db2 is trying to access the local database directory.

2014-02-05-16.22.35.772324+660 I2960A3540 LEVEL: Error (OS)
PID : 34734080 TID : 8998 PROC : db2sysc 0
INSTANCE: db2ins10 NODE : 000 DB : SAMPLE
APPHDL : 0-46 APPID: *LOCAL.db2ins10.140205052235
AUTHID : DB2INS10 HOSTNAME: server1
EDUID : 8998 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
CALLED : OS, -, realpath
OSERR : EACCES (13) “Permission denied”
DATA #1 : String, 151 bytes
A total of 2 analysis will be performed :

  • User info
  • Path access permission

Target file = /home2/db2ins10/db2ins10/NODE0000/SQL00001/MEMBER0000
DATA #2 : String, 184 bytes
Real user ID of current process = 228
Effective user ID of current process = 228
Real group ID of current process = 300
Effective group ID of current process = 300
DATA #3 : String, 41 bytes
current sbrk(0) value: 0x00000001112a4400
DATA #4 : String, 324 bytes
Information of each subdirectory leading up to the first inaccessible one is shown in the format below :

: : (subdirectories)

0:0:755 (home2)
228:300:755 (db2ins10)
228:300:775 (db2ins10)
0:0:775 (NODE0000)
0:0:750 (SQL00001)

Cannot descend any further than the above subdirectory.
CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol)
[0] 0x090000006744F5A4 oss_logFP9OSSLogFacUiN32UlN26iPPc + 0x1C4
[1] 0x090000006744FA5C ossLogSysRC + 0x9C
[2] 0x0900000067476180 ossErrorIOAnalysis
FCPC21OSSErrorAnalysisParam + 0xC40
[3] 0x09000000674781E8 ossErrorAnalysis@AF12_1 + 0x48
[4] 0x09000000696B3E50 sqloSystemErrorHandler + 0x524
[5] 0x090000006AA2D870 sqloqualifydir + 0x5D4
[6] 0x090000006AA2C710 sqleSetupDatabasePathForNodeFP8SQLE_BWAPcsT2P5sqlca + 0x3F8
[7] 0x090000006AA2C158 sqleSetupDatabasePath
FP8SQLE_BWAPcP5sqlca + 0x45C
[8] 0x090000006AA2E480 sqlePrepareForSerializationFP8SQLE_BWAP8sqeAgentP10SQLER_GLOBP5sqlcaT4 + 0x2F0
[9] 0x090000006AA2952C StartUsingLocalDatabase
8sqeDBMgrFP8SQLE_BWAP8sqeAgentRccP8sqlo_gmtPb + 0x2C8
[10] 0x090000006A1A8094 AppStartUsing14sqeApplicationFP8SQLE_BWAP8sqeAgentcT3P5sqlcaPc + 0x36C
[11] 0x090000006A0ADE84 AppLocalStart
14sqeApplicationFP14db2UCinterface + 0x4C8
[12] 0x090000006A0ACC68 sqlelostWrpFP14db2UCinterface + 0x3C
[13] 0x090000006A0AC960 sqleUCengnInit
FP14db2UCinterfaceUs + 0x29C
[14] 0x090000006A09AA9C sqleUCagentConnect + 0x2A4http://www.cndba.cn/hbhe0316/article/131504http://www.cndba.cn/hbhe0316/article/131504http://www.cndba.cn/hbhe0316/article/131504

版权声明:本文为博主原创文章,未经博主允许不得转载。

DB2

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:1038064次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ