HDR
Posted in 2003
A user running asynchronous HDR on IDS 9.40UC2 under Linux reported "DR: Send error" during a batch job that creates many tables and indexes: some indexes weren't replicated to the secondary and tables stayed locked, so the batch couldn't finish. Replies explained that during index replication the table is locked, and recommended SET LOCK MODE TO WAIT (with a timeout) in the batch code, creating each table/index in its own transaction with delays between statements, or running the setup job standalone before starting HDR. The poster said waits up to 120 seconds still left tables locked; no confirmed resolution is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication
Hi, I have an async HDR running under 940UC2 and linux! Wenn I am running a batchjob, a lot of tables are created and some indicies and so on, there is always a DR: Send error created, and some indicies are not transfered to secondary, and because of that some locks not disapear, so the batch is not able to complete. What I have to do to get all this running, any ideas? Thanks Sven
<color><param>0100,0100,0100</param>Sven, I think you have to set lock mode to wait <<<italic>number_of_seconds</italic>> Experiment with the number that will work for you. This is a known HDR *bug* when creating one index after another. RTFM on HDR for more info on why this happens. HTH, Zev Berezin IBM Informix DBA On 4 Aug 2003, at 12:17, Schuran, Sven wrote: <color><param>7F00,0000,0000</param>> Hi, > I have an async HDR running under 940UC2 and linux! > Wenn I am running a batchjob, a lot of tables are created and some > indicies and so on, there is always a DR: Send error created, and some > indicies are not transfered to secondary, and because of that some > locks not disapear, so the batch is not able to complete. > > What I have to do to get all this running, any ideas? > > Thanks Sven > > > >
Hi, Sven, I saw very similar error in HDR environment with 7.31 several years ago. The solution was: 1. Create each index and table in a separate transaction 2. Allow some delays (10-60 seconds) between statements. Please, let me know if this helps with 9.40uc2 ------------------------------------------ Alexey Sonkin Senior Database Administrator Grand Virtual, Inc. > -----Original Message----- > From: Schuran, Sven [mailto:sschuran@maske.de] > Sent: Monday, August 04, 2003 12:18 PM > To: ids@iiug.org > Subject: HDR [1629] > > Hi, > I have an async HDR running under 940UC2 and linux! > Wenn I am running a batchjob, a lot of tables are created and some > indicies and so on, > there is always a DR: Send error created, and some indicies are not > transfered to secondary, and because of that some locks not disapear, so > the batch is not able to complete. > > What I have to do to get all this running, any ideas? > > Thanks Sven >
Hi In addition to the suggestions given by below, you may consider running that batch job in a standalone server to create the tables and indices, then start up HDR afterwards (I'm assuming that the batch job is to setup/initialize your database). thanks. davis. "Alexey Sonkin " <alexeis@grandvir To: ids@iiug.org tual.com> cc: Sent by: Subject: RE: HDR [1631] forum.subscriber@ iiug.org 08/04/2003 10:58 AM Hi, Sven, I saw very similar error in HDR environment with 7.31 several years ago. The solution was: 1. Create each index and table in a separate transaction 2. Allow some delays (10-60 seconds) between statements. Please, let me know if this helps with 9.40uc2 ------------------------------------------ Alexey Sonkin Senior Database Administrator Grand Virtual, Inc. > -----Original Message----- > From: Schuran, Sven [mailto:sschuran@maske.de] > Sent: Monday, August 04, 2003 12:18 PM > To: ids@iiug.org > Subject: HDR [1629] > > Hi, > I have an async HDR running under 940UC2 and linux! > Wenn I am running a batchjob, a lot of tables are created and some > indicies and so on, > there is always a DR: Send error created, and some indicies are not > transfered to secondary, and because of that some locks not disapear, so > the batch is not able to complete. > > What I have to do to get all this running, any ideas? > > Thanks Sven >
I tried up to 120, but it won't work, even if I thought all indicies are = transferd correct, the tables are locked, and I am not able to lock them = again and insert data. -----Urspr=FCngliche Nachricht----- Von: Zev Berezin [mailto:zevb@bhphotovideo.com] Gesendet: Montag, 4. August 2003 19:19 An: Schuran, Sven Cc: ids@iiug.org Betreff: Re: HDR [1629]=20 Sven,=20 I think you have to set lock mode to wait <number_of_seconds>=20 Experiment with the number that will work for you. This is a known HDR = *bug* when creating one index after another.=20 RTFM on HDR for more info on why this happens.=20 HTH,=20 Zev Berezin=20 IBM Informix DBA=20 On 4 Aug 2003, at 12:17, Schuran, Sven wrote:=20 > Hi,=20 > I have an async HDR running under 940UC2 and linux!=20 > Wenn I am running a batchjob, a lot of tables are created and some=20 > indicies and so on, there is always a DR: Send error created, and some = > indicies are not transfered to secondary, and because of that some=20 > locks not disapear, so the batch is not able to complete.=20 >=20 > What I have to do to get all this running, any ideas?=20 >=20 > Thanks Sven=20 >=20 >=20 >=20 >=20
Hi, the cause for the error is that for the time needed for replicating the index, the table is being locked to prevent changes in the table (which in turn would require changes in the index itself, but we can't allow that during replication of the index). You can sort of reproduce the problem easily by running "dbaccessdemo7" on the primar of a functional HDR pair. The general solution to the problem is to do a "SET LOCK MODE TO WAIT;" which will let the client wait for the lock to be freed rather than producing the error that you get. Question of course is, whether you've control over the "source code" of the batch job. This is where you would have to add this statement, at best right after the connect to the database ... Regards, Martin -- Martin Fuerderer IBM Informix Development Munich Data Management Solutions Davis Kwong/Menlo Park/IBM@IBMUS Sent by: forum.subscriber@iiug.org 04.08.2003 23:59 To: ids@iiug.org cc: Subject: RE: HDR [1632] Hi In addition to the suggestions given by below, you may consider running that batch job in a standalone server to create the tables and indices, then start up HDR afterwards (I'm assuming that the batch job is to setup/initialize your database). thanks. davis. "Alexey Sonkin " <alexeis@grandvir To: ids@iiug.org tual.com> cc: Sent by: Subject: RE: HDR [1631] forum.subscriber@ iiug.org 08/04/2003 10:58 AM Hi, Sven, I saw very similar error in HDR environment with 7.31 several years ago. The solution was: 1. Create each index and table in a separate transaction 2. Allow some delays (10-60 seconds) between statements. Please, let me know if this helps with 9.40uc2 ------------------------------------------ Alexey Sonkin Senior Database Administrator Grand Virtual, Inc. > -----Original Message----- > From: Schuran, Sven [mailto:sschuran@maske.de] > Sent: Monday, August 04, 2003 12:18 PM > To: ids@iiug.org > Subject: HDR [1629] > > Hi, > I have an async HDR running under 940UC2 and linux! > Wenn I am running a batchjob, a lot of tables are created and some > indicies and so on, > there is always a DR: Send error created, and some indicies are not > transfered to secondary, and because of that some locks not disapear, so > the batch is not able to complete. > > What I have to do to get all this running, any ideas? > > Thanks Sven >
Are you still getting the DR error you described in your initial email? If you could, try at 300 seconds. - Zev On 5 Aug 2003, at 3:58, Schuran, Sven wrote: > I tried up to 120, but it won't work, even if I thought all indicies > are = transferd correct, the tables are locked, and I am not able to > lock them = again and insert data. > > -----Urspr=FCngliche Nachricht----- > Von: Zev Berezin [mailto:zevb@bhphotovideo.com] > Gesendet: Montag, 4. August 2003 19:19 > An: Schuran, Sven > Cc: ids@iiug.org > Betreff: Re: HDR [1629]=20 > > > > Sven,=20 > > > I think you have to set lock mode to wait <number_of_seconds>=20 > > Experiment with the number that will work for you. This is a known HDR > = *bug* when creating one index after another.=20 > > RTFM on HDR for more info on why this happens.=20 > > > > HTH,=20 > > > Zev Berezin=20 > > IBM Informix DBA=20 > > > On 4 Aug 2003, at 12:17, Schuran, Sven wrote:=20 > > > > Hi,=20 > > > I have an async HDR running under 940UC2 and linux!=20 > > > Wenn I am running a batchjob, a lot of tables are created and > > some=20 > > > indicies and so on, there is always a DR: Send error created, and > > some = > > > > indicies are not transfered to secondary, and because of that > > some=20 > > > locks not disapear, so the batch is not able to complete.=20 > > >=20 > > > What I have to do to get all this running, any ideas?=20 > > >=20 > > > Thanks Sven=20 > > >=20 > > >=20 > > >=20 > > >=20 > > > > > >