Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2008
    Posts
    14

    Error "file sharing violation" in DB2 executing rollforward from mirrorlog active db

    Hi everyone,

    I have a DB2 server that is configured parameter mirrorlogpath to a separate disk.

    In another DB2 server (standby), I did restore the image backup, ran the rollforward using the archived logs and scheduled at intervals of 15 minutes a script to run the process using rollforward the logs contained in mirrorlogpath Production Server .

    The rollforward command is:
    db2 rollforward db MYDB to end of logs overflow log path (\ \ 10.0.0.10 \ mirrorlog)

    The command works, but occasionally returns the following error:
    SQL1042C An unexpected system error occurred. SQLSTATE=58004

    I checked the db2diag.log and contains the following:

    ----------------------------------------------------------------------

    2013-03-18-14.40.05.028000-180 I1444H456 LEVEL: Error
    PID : 4552 TID : 2940 PROC : db2syscs.exe
    INSTANCE: DB2 NODE : 000
    FUNCTION: DB2 UDB, recovery manager, sqlpCopyLogsFromOverflow, probe:710
    RETCODE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing violation."
    DIA8519C A file sharing violation has occurred, filename was
    "E:\databases\MYDB\mirrorlog\S0028870.LOG".

    2013-03-18-14.40.05.043000-180 I1902H404 LEVEL: Error
    PID : 4552 TID : 2940 PROC : db2syscs.exe
    INSTANCE: DB2 NODE : 000
    FUNCTION: DB2 UDB, recovery manager, sqlpgSwitchFromRedoToUndo, probe:4470
    RETCODE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing violation."
    DIA8519C A file sharing violation has occurred, filename was "".

    2013-03-18-14.40.05.043000-180 I2308H394 LEVEL: Error
    PID : 4552 TID : 2940 PROC : db2syscs.exe
    INSTANCE: DB2 NODE : 000
    FUNCTION: DB2 UDB, data protection services, sqlpgasn, probe:650
    RETCODE : ZRC=0x870F0016=-2029060074=SQLO_SHAR "File sharing violation."
    DIA8519C A file sharing violation has occurred, filename was "".

    2013-03-18-14.40.05.043000-180 I2704H423 LEVEL: Error
    PID : 4552 TID : 772 PROC : db2syscs.exe
    INSTANCE: DB2 NODE : 000 DB : BDPROD
    APPHDL : 0-61 APPID: *LOCAL.DB2.130318173945
    AUTHID : DB2ADMIN
    FUNCTION: DB2 UDB, data protection services, sqlpgPostLoggrWithoutLatching, probe:930
    MESSAGE : db2logger: rc=-2029060074 sem rc=0 type=27

    2013-03-18-14.40.05.059000-180 I3129H143 LEVEL: Error
    PID:4552 TID:772 NODE:000 Title: SQLP_DBCB
    Dump File:E:\ADM\dump\4552772.000

    ----------------------------------------------------------------------

    Already rolled the internet and can not figure out the problem ...

    The version of DB2 is 9.1 FP7, with Windows 2003 Server R2 (enterprise) on both servers.

    I've tried setting the mirrorlog straight on the road network, pointing to the standby server in a directory and then perform rollforward processes using the local directory (the standby server), but it is the same situation ...

    Thanks to anyone who can help me!

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,461
    Quote Originally Posted by gabrielatme View Post
    a script to run the process using rollforward the logs contained in mirrorlogpath Production Server .
    My guess would be that you are trying to access logs that have not been archived yet.

    What you're trying to achieve is actually implemented using the HADR functionality, which automates the processing of logs and gives you other advantages.

    If for some reason you are averse to using HADR, you could, instead of using the mirror log path, define a separate archived log path using the LOGARCHMETH[1|2] configuration parameter -- that way you'd be sure the files in that location are not active.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Nov 2008
    Posts
    14
    Hello, thanks for the help ...

    Currently now apply the logs directory LOGARCHMETH, but the idea of ​​applying the logs mirrorlogpath standby database is to keep as current as possible.

    Where I am, I have no license to use the HADR
    =(

    I am suspicious that DB2 can not apply the log contained in MIRRORLOG (please note that this problem is intermittent) when the same log is being written just when the primary server ...

    Something like "the file is already being used and for some reason the primary server locks even reading the log chain"

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,461
    So, suppose DB2 lets you read an active log file and you rollforward through it on your standby database, after which time a transaction in that log file is rolled back on the primary. What would you do?
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Nov 2008
    Posts
    14
    dammit! I had not thought of that! but a rollback operation does not generate a record in the log? telling which way that DB2 has to follow to undo the operation?

    IBM Web site:
    The Basics of DB2 Log Shipping

    In this site they mention (there at the end) which is a strategy used mirrorlog and apply the logs active in secondary database and thus does not present data loss in case of failure of the primary ...

    Now in case of rollback, I was really confused, because DB2 must somehow control this ...

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,649
    Quote Originally Posted by n_i View Post
    So, suppose DB2 lets you read an active log file and you rollforward through it on your standby database, after which time a transaction in that log file is rolled back on the primary. What would you do?
    When you issue ROLLFORWARD COMPLETE, isn't there a phase that rolls back uncommitted transactions?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,461
    Quote Originally Posted by sathyaram_s View Post
    When you issue ROLLFORWARD COMPLETE, isn't there a phase that rolls back uncommitted transactions?
    There is, of course, but rollforward relies on an archived log, which does not change, while in this scenario the log contents may change.

    Anyway, if someone is just looking for a way to inflict most damage while shooting himself in the foot, who am I to interfere.
    ---
    "It does not work" is not a valid problem statement.

  8. #8
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,649
    Quote Originally Posted by n_i View Post
    There is, of course, but rollforward relies on an archived log, which does not change, while in this scenario the log contents may change.

    Anyway, if someone is just looking for a way to inflict most damage while shooting himself in the foot, who am I to interfere.
    Sorry, my question was a distraction to the original thread.

    I agree with n_i. it is not advisable to use active logs in the scenario by the OP.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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