IBM Support

IT32011: DB ACTIVATION AFTER AN INSTANCE CRASH FAILS WITH SQL1042C DUE SQLO_SHAR ERROR OPENING TRANSACTION LOGS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • After an instance crash, database activation fails
    with SQL1042C error.
    
    The db2diag.log shows SQL1042C error is because Db2 failed to
    read a transaction log with SQLO_SHAR "File sharing violation."
    error:
    =====
    2020-01-22-13.00.07.721293+540 I159376211E591 LEVEL: Warning
    PID : 2246 TID : 47468892907264 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: host1
    EDUID : 662 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, data protection services, sqlpgolf, probe:220
    MESSAGE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing
    violation."
    DIA8519C A file sharing violation has occurred, filename was "".
    DATA #1 : <preformatted>
    Error opening:
    /db2/SAMPLE/log2/NODE0000/LOGSTREAM0000/S0000003.LOG.
    
    2020-01-22-13.00.07.722202+540 I159376803E610 LEVEL: Info
    PID : 2246 TID : 47468892907264 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: host1
    EDUID : 662 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, data protection services, sqlpgOpenLogExtent,
    probe:850
    MESSAGE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing
    violation."
    DIA8519C A file sharing violation has occurred, filename was "".
    DATA #1 : <preformatted>
    Error opening database log
    /db2/SAMPLE/log2/NODE0000/LOGSTREAM0000/S0000003.LOG.
    
    2020-01-22-13.00.07.723124+540 I159377414E607 LEVEL: Info
    PID : 2246 TID : 47468892907264 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: host1
    EDUID : 662 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, data protection services, sqlpgoleMergeRCs,
    probe:100
    MESSAGE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing
    violation."
    DIA8519C A file sharing violation has occurred, filename was "".
    DATA #1 : <preformatted>
    Open error on primary path
    /db2/SAMPLE/log1/NODE0000/LOGSTREAM0000/S0000003.LOG
    
    2020-01-22-13.00.07.724024+540 I159378022E606 LEVEL: Info
    PID : 2246 TID : 47468892907264 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: host1
    EDUID : 662 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, data protection services, sqlpgoleMergeRCs,
    probe:200
    MESSAGE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing
    violation."
    DIA8519C A file sharing violation has occurred, filename was "".
    DATA #1 : <preformatted>
    Open error on mirror path
    /db2/SAMPLE/log2/NODE0000/LOGSTREAM0000/S0000003.LOG
    
    2020-01-22-13.00.07.724923+540 I159378629E432 LEVEL: Error
    PID : 2246 TID : 47468892907264 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: host1
    EDUID : 662 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, data protection services, sqlpgOpenLogExtent,
    probe:1320
    DATA #1 : <preformatted>
    Error -2029060074 opening database log extent 3.
    
    2020-01-22-13.00.07.725714+540 I159379062E607 LEVEL: Error
    PID : 2246 TID : 47468892907264 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    HOSTNAME: host1
    EDUID : 662 EDUNAME: db2loggr (SAMPLE) 0
    FUNCTION: DB2 UDB, data protection services,
    sqlpgCircularOpenLogStreamForCrashRecovery, probe:193
    MESSAGE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing
    violation."
    DIA8519C A file sharing violation has occurred, filename was "".
    DATA #1 : <preformatted>
    Error opening log file S0000003.LOG on log stream 0.
    =====
    
    Normally SQLO_SHAR error is because some other process held the
    file with incompatible mode. But in this particular case, it's
    caused by this log file opened by edu db2loggr twice. The first
    open is successful. It failed at the second open due to that it
    couldn't get the file latch.
    
    The db2loggr opened this log file twice because it appeared
    twice in file array of the log control file.
    
    File Number [000] = 3
    File Number [001] = 1
    File Number [002] = 2
    File Number [003] = 3
    
    This particular case happened in circular logging scenario.
    
    If you acquire db2trc during connecting to the database, it will
    show SQLO_SHAR is actually from sqloThreadLevelFileLockUnlock()
    function as follows:
    =====
    22815 1.232248000 | | | | | | | | sqlpgolf entry [eduid 27
    eduname db2loggr] 2020-01-23-20.02.36.898379088
    22816 1.232249000 | | | | | | | | | sqloopenp entry [eduid 27
    eduname db2loggr] 2020-01-23-20.02.36.898380088
    22817 1.232250000 | | | | | | | | | |
    sqloFetchAndStoreFSInfoInFileHandle entry [eduid 27 eduname
    db2loggr] 2020-01-23-20.02.36.898381088
    22818 1.232252000 | | | | | | | | | | | ossGetDiskInfo entry
    2020-01-23-20.02.36.898383088
    22819 1.232252000 | | | | | | | | | | | ossGetDiskInfo data
    [probe 5] 2020-01-23-20.02.36.898383088
    22820 1.232255000 | | | | | | | | | | | | ossCheckForEXT4FS
    entry 2020-01-23-20.02.36.898386088
    22821 1.232259000 | | | | | | | | | | | | ossCheckForEXT4FS data
    [probe 20] 2020-01-23-20.02.36.898390088
    22822 1.232259000 | | | | | | | | | | | | ossCheckForEXT4FS data
    [probe 30] 2020-01-23-20.02.36.898390088
    22823 1.232262000 | | | | | | | | | | | | ossCheckForEXT4FS exit
    2020-01-23-20.02.36.898393088
    22824 1.232262000 | | | | | | | | | | | ossGetDiskInfo data
    [probe 200] 2020-01-23-20.02.36.898393088
    22825 1.232263000 | | | | | | | | | | | ossGetDiskInfo exit [rc
    = 0x10000006 = 268435462] 2020-01-23-20.02.36.898394088
    22826 1.232264000 | | | | | | | | | |
    sqloFetchAndStoreFSInfoInFileHandle data [probe 20]
    2020-01-23-20.02.36.898395088
    22827 1.232264000 | | | | | | | | | |
    sqloFetchAndStoreFSInfoInFileHandle exit
    2020-01-23-20.02.36.898395088
    22828 1.232264000 | | | | | | | | | sqloopenp data [probe 25]
    2020-01-23-20.02.36.898395088
    22829 1.232268000 | | | | | | | | | |
    sqlo_enable_dio_cio_using_ioctl entry [eduid 27 eduname
    db2loggr] 2020-01-23-20.02.36.898399088
    22830 1.232268000 | | | | | | | | | |
    sqlo_enable_dio_cio_using_ioctl data [probe 40]
    2020-01-23-20.02.36.898399088
    22831 1.232268000 | | | | | | | | | |
    sqlo_enable_dio_cio_using_ioctl exit
    2020-01-23-20.02.36.898399088
    22832 1.232269000 | | | | | | | | | |
    sqloThreadLevelFileLockUnlock entry [eduid 27 eduname db2loggr]
    2020-01-23-20.02.36.898400088
    22833 1.232271000 | | | | | | | | | |
    sqloThreadLevelFileLockUnlock exit [rc = 0x870F0016 =
    -2029060074 = SQLO_SHAR] 2020-01-23-20.02.36.898402088
    22834 1.232271000 | | | | | | | | | | sqloclose entry [eduid 27
    eduname db2loggr] 2020-01-23-20.02.36.898402088
    22835 1.232273000 | | | | | | | | | | sqloclose exit
    2020-01-23-20.02.36.898404088
    22836 1.232273000 | | | | | | | | | sqloopenp exit [rc =
    0x870F0016 = -2029060074 = SQLO_SHAR]
    2020-01-23-20.02.36.898404088
    =====
    

Local fix

  • When this problem occurs, users have to restore a backup or
    rebuild the DB for recovery.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * all                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1.4.6 or higher                            *
    ****************************************************************
    

Problem conclusion

  • Upgrade to Db2 11.1.4.6 or higher
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT32011

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-02-27

  • Closed date

    2021-03-31

  • Last modified date

    2021-03-31

  • APAR is sysrouted FROM one or more of the following:

    IT31902

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.1"}]

Document Information

Modified date:
01 April 2021