If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Error "file sharing violation" in DB2 executing rollforward from mirrorlog active db

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2008
Posts: 13
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!
Reply With Quote
  #2 (permalink)  
Old
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,399
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.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Nov 2008
Posts: 13
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"
Reply With Quote
  #4 (permalink)  
Old
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,399
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.
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Nov 2008
Posts: 13
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 ...
Reply With Quote
  #6 (permalink)  
Old
Super Moderator
 
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.
Reply With Quote
  #7 (permalink)  
Old
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,399
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.
Reply With Quote
  #8 (permalink)  
Old
Super Moderator
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On