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?
Cause
In DB2 v10.x if the file ownership of the local database directory is wrong when connecting to database, SQL5035N will be received.
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
$ db2 list db directory
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
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 :
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 ossErrorIOAnalysisFCPC21OSSErrorAnalysisParam + 0xC40
[3] 0x09000000674781E8 ossErrorAnalysis@AF12_1 + 0x48
[4] 0x09000000696B3E50 sqloSystemErrorHandler + 0x524
[5] 0x090000006AA2D870 sqloqualifydir + 0x5D4
[6] 0x090000006AA2C710 sqleSetupDatabasePathForNodeFP8SQLE_BWAPcsT2P5sqlca + 0x3F8
[7] 0x090000006AA2C158 sqleSetupDatabasePathFP8SQLE_BWAPcP5sqlca + 0x45C
[8] 0x090000006AA2E480 sqlePrepareForSerializationFP8SQLE_BWAP8sqeAgentP10SQLER_GLOBP5sqlcaT4 + 0x2F0
[9] 0x090000006AA2952C StartUsingLocalDatabase8sqeDBMgrFP8SQLE_BWAP8sqeAgentRccP8sqlo_gmtPb + 0x2C8
[10] 0x090000006A1A8094 AppStartUsing14sqeApplicationFP8SQLE_BWAP8sqeAgentcT3P5sqlcaPc + 0x36C
[11] 0x090000006A0ADE84 AppLocalStart14sqeApplicationFP14db2UCinterface + 0x4C8
[12] 0x090000006A0ACC68 sqlelostWrpFP14db2UCinterface + 0x3C
[13] 0x090000006A0AC960 sqleUCengnInitFP14db2UCinterfaceUs + 0x29C
[14] 0x090000006A09AA9C sqleUCagentConnect + 0x2A4
版权声明:本文为博主原创文章,未经博主允许不得转载。
DB2