Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Posts
    246

    Unanswered: Access denied try to write on read only file

    db2 10.5 on linux redhat 2.6

    SQL0970N The system attempted to write to a read-only file.
    SQLSTATE=55009

    Diag log getting this error.

    2015-10-31-09.51.29.582429-240 E5224E1163 LEVEL: Error (OS)
    PID : 22711 TID : 140736985032448 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: vatprod
    EDUID : 19 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80
    MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
    DIA8701C Access denied for resource "", operating system return code
    was "".
    CALLED : OS, -, open OSERR: EACCES (13)
    DATA #1 : Codepath, 8 bytes
    4:11:15:20:24:40
    DATA #2 : File name, 72 bytes
    /udb/home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/S0000000.LOG
    DATA #3 : SQO Open File Options, PD_TYPE_SQO_FILE_OPEN_OPTIONS, 4 bytes
    SQLO_REVISE, SQLO_READWRITE, SQLO_SHAREREAD, SQLO_FORCE_NON_CIO_NON_BUFFERED, SQLO_WRITETHRU
    DATA #4 : Hex integer, 4 bytes
    0x00000180
    DATA #5 : signed integer, 4 bytes
    0
    DATA #6 : Hex integer, 4 bytes
    0x00004000
    DATA #7 : String, 105 bytes
    Search for ossError*Analysis probe point after this log entry for further
    self-diagnosis of this problem.

    2015-10-31-09.51.29.594455-240 I6388E2395 LEVEL: Error (OS)
    PID : 22711 TID : 140736985032448 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: vatprod
    EDUID : 19 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
    CALLED : OS, -, open OSERR: EACCES (13)
    DATA #1 : String, 170 bytes
    A total of 2 analysis will be performed :
    - User info
    - Path access permission

    Target file = /udb/home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/S0000000.LOG
    DATA #2 : String, 184 bytes
    Real user ID of current process = 497
    Effective user ID of current process = 497
    Real group ID of current process = 499
    Effective group ID of current process = 499
    DATA #3 : String, 41 bytes
    current sbrk(0) value: 0x0000000000677000
    DATA #4 : String, 352 bytes
    Information of each subdirectory leading up to the first inaccessible one is shown in the format below :
    <UID>:<GID>:<permissions> (subdirectories)

    0:0:755 (udb)
    0:0:755 (home)
    497:499:755 (db2inst1)
    497:499:775 (db2inst1)
    497:499:775 (NODE0000)
    497:499:750 (SQL00001)
    497:499:750 (LOGSTREAM0000)
    497:499:600 (S0000000.LOG)
    CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol)
    [0] 0x00007FFFEC788E1B /udb/home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x221E1B
    [1] 0x00007FFFEC78A3A3 ossLogSysRC + 0xB3
    [2] 0x00007FFFEC77C244 /udb/home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x215244
    [3] 0x00007FFFEC77950D ossErrorAnalysis + 0x2D
    [4] 0x00007FFFF2D367CB sqloSystemErrorHandler + 0x71B
    [5] 0x00007FFFF0D49E9A sqloopenp + 0xA3A
    [6] 0x00007FFFF0D7CABE _Z8sqlpgolfPKcP10SQLPG_XHDRP9SQLP_LFCBm + 0xAE
    [7] 0x00007FFFF0DF86E4 _Z18sqlpgOpenLogExtentP9SQLP_DBCBPKcPP9SQLP_LECBjm Pc + 0x7F4
    [8] 0x00007FFFF0DD713A _Z29sqlpgCircularCleanAndOpenLogsP14sqlpMasterDbcb + 0x63A
    [9] 0x00007FFFF0DD5B39 _Z8sqlpgiclP15sqlpDbcbsHandle + 0xD9
    [10] 0x00007FFFF0DDE341 _ZN11sqpLoggrEdu14sqlpgLoggrInitEv + 0x451
    [11] 0x00007FFFF0E65E6B _ZN11sqpLoggrEdu10RunEDUInitEv + 0x10B
    [12] 0x00007FFFF1592A07 _ZN9sqzEDUObj9EDUDriverEv + 0xD7
    [13] 0x00007FFFF0D5E3A3 sqloEDUEntry + 0x303
    [14] 0x000000394D807A51 /lib64/libpthread.so.0 + 0x7A51
    [15] 0x000000394D4E89AD clone + 0x6D

    2015-10-31-09.51.29.616431-240 I8784E642 LEVEL: Warning
    PID : 22711 TID : 140736985032448 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: vatprod
    EDUID : 19 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, data protection services, sqlpgolf, probe:220
    MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
    DIA8701C Access denied for resource "", operating system return code
    was "".
    DATA #1 : <preformatted>
    Error opening: /udb/home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/S0000000.LOG.

    Tried creating in diff path, tried changing DFTDBPATH, permissions are same with other servers, tried manually creating the file able to create it. db2 is not able to create

    tried db2 create db test on /diff path same error.

    regards
    paul

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Post the output of these commands (running as db2inst1):

    id db2inst1

    umask

    grep 497 /etc/passwd

    grep 499 /etc/group

    As root:

    ls -l /udb/home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/S0000000.LOG

    ls -ld /udb/home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000

    # If the users/groups are incorrect or unknown, then as root run db2iupdt db2inst1 (you need to find the correct db2iupdt to match the version+fixpack you are using for db2inst1 )

    Also if the users/groups are correct, check how the file-system containing the active-log path is mounted.

  3. #3
    Join Date
    Oct 2007
    Posts
    246
    umask from id db2inst1

    0022

    grep 497 /etc/passwd

    db2inst1:x:497:499::/udb/home/db2inst1:/bin/ksh

    grep 499 /etc/group

    db2iurgrp:x:499:

    db2iupdt of instance have not tried.

    nothing is created after /udb/home/db2inst1 when it gets error it removes all the files and directories.

    regds
    paul

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    as indicated many times before : you are not the best debugger..
    why are you changing manually db2 objects ?
    do as it should be done
    provide filesystems owned by instance owner and his group
    create database - direct logs to correct path (also owned by uid/group)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Oct 2007
    Posts
    246

  6. #6
    Join Date
    Oct 2007
    Posts
    246
    Anit Virus was the Culprit in this case.

    Regds
    Paul

  7. #7
    Join Date
    May 2012
    Location
    Canberra, Australia
    Posts
    176
    Provided Answers: 6
    IBM has been saying to either not use antivirus products on DB2 servers or to at least exclude all directories containing DB2 files for about as long as I can recall, well at least since version 5
    Andy

    "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can’t get them together again, there must be a reason. By all means, do not use hammer.” — IBM maintenance manual, 1975 "

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •