dbTalk Databases Forums  

Update two files with one WRITE command

comp.databases.pick comp.databases.pick


Discuss Update two files with one WRITE command in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mdsi2000
 
Posts: n/a

Default Update two files with one WRITE command - 08-21-2006 , 02:48 PM






Hello gang,
I'm trying to come up with a full proof method of replicating a system
for disaster recovery. The system is Universe NT. I also plan on
creating this same scenario for QM Win.

Is possible to update two files with one WRITE command? (I think D3 has
such a feature)One file would be local the other a networked file. This
way two machines will be TOTALY synchronize. What will happen when one
system goes down? Will the WRITE command abort?

I could write a SUBROUTINE to handle all the WRITE commands and have it
check for connectivity just before writing. Or I could trap the WRITE
failure error messages so I the program won't abort.

I have looked at the Universe Replication, but don't think it will work
for what I want to do. There will be gaps between the replications.

Any suggestions appreciated.

Peter


Reply With Quote
  #2  
Old   
Ron White
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-21-2006 , 04:38 PM






mdsi2000 wrote:
Quote:
Hello gang,
I'm trying to come up with a full proof method of replicating a system
for disaster recovery. The system is Universe NT. I also plan on
creating this same scenario for QM Win.

Is possible to update two files with one WRITE command? (I think D3 has
such a feature)One file would be local the other a networked file. This
way two machines will be TOTALY synchronize. What will happen when one
system goes down? Will the WRITE command abort?

I could write a SUBROUTINE to handle all the WRITE commands and have it
check for connectivity just before writing. Or I could trap the WRITE
failure error messages so I the program won't abort.

I have looked at the Universe Replication, but don't think it will work
for what I want to do. There will be gaps between the replications.

Any suggestions appreciated.

Peter

If you are on Uv-Nt 10.1.x or maybe 10.0.x you can read up on file
triggers in the System Description manual. You would be able to control
what your program does should the second file be unavailable at write time.

Ron White

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDem


Reply With Quote
  #3  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-21-2006 , 05:36 PM



Goo'day,

On Mon, 21 Aug 2006 16:38:21 -0500, Ron White <ron (AT) eckel (DOT) com> wrote:

Quote:
mdsi2000 wrote:
Any suggestions appreciated.

Peter


If you are on Uv-Nt 10.1.x or maybe 10.0.x you can read up on file
triggers in the System Description manual. You would be able to control
what your program does should the second file be unavailable at write time.

Ron White
And, there is always Transactions - write everything or Rollback......

Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #4  
Old   
Albino Timberwolf
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-21-2006 , 05:59 PM



You could rename the WRITE verb to something like MYWRITE. Then create your
own program to replace the WRITE verb. Your new WRITE program should
capture the account name, file name, record ID, and record data. Execute
MYWRITE using the captured parameters. This will release any locks in a
timely manner. Create an NFA pointer to the other system. Execute MYWRITE to
the NFA pointer to the remote system to pass the data. If NFA fails you can
log any relevant information since you will have it all. This type of set up
allows you to bypass files or records that you may not want sent to the
redundant system. Many temporary files could be skipped. This method does
not rely on triggers, there is no need to re-enable triggers after a
re-boot. Also triggers may only be established by an administrator or
equivalent. If no one is on site that has the required security you could be
in a sticky situation. The primary system could be restarted but no data is
being sent to the remote with no log as to which records were missed.

There are several versions of the write verb. All will have to be dealt with
to insure an air tight system.

"mdsi2000" <mdsi2000 (AT) yahoo (DOT) com> wrote

Quote:
Hello gang,
I'm trying to come up with a full proof method of replicating a system
for disaster recovery. The system is Universe NT. I also plan on
creating this same scenario for QM Win.

Is possible to update two files with one WRITE command? (I think D3 has
such a feature)One file would be local the other a networked file. This
way two machines will be TOTALY synchronize. What will happen when one
system goes down? Will the WRITE command abort?

I could write a SUBROUTINE to handle all the WRITE commands and have it
check for connectivity just before writing. Or I could trap the WRITE
failure error messages so I the program won't abort.

I have looked at the Universe Replication, but don't think it will work
for what I want to do. There will be gaps between the replications.

Any suggestions appreciated.

Peter




Reply With Quote
  #5  
Old   
mdsi2000
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-21-2006 , 08:36 PM



Writting the SUBROUTINE is an option, but there are too many programs
to modify and like Albino mentioned too many types of write, WRITE,
MATWRITE, WRITEV, ...

I was reading the UV manual and there is a way to create a VOC that
uses MULTIFLES files. Is in the CREATE-FILE section of the DPF. The
VOC is 10 attributes and the last attribute is multivalued. These
multivalues holds the multiple data files. I'll be creating a few files
and testing it. I'll report back to the group.

tbw: QM has a simular option in the CREATE-FILE section.

Pete


Albino Timberwolf wrote:
Quote:
You could rename the WRITE verb to something like MYWRITE. Then create your
own program to replace the WRITE verb. Your new WRITE program should
capture the account name, file name, record ID, and record data. Execute
MYWRITE using the captured parameters. This will release any locks in a
timely manner. Create an NFA pointer to the other system. Execute MYWRITE to
the NFA pointer to the remote system to pass the data. If NFA fails you can
log any relevant information since you will have it all. This type of set up
allows you to bypass files or records that you may not want sent to the
redundant system. Many temporary files could be skipped. This method does
not rely on triggers, there is no need to re-enable triggers after a
re-boot. Also triggers may only be established by an administrator or
equivalent. If no one is on site that has the required security you could be
in a sticky situation. The primary system could be restarted but no data is
being sent to the remote with no log as to which records were missed.

There are several versions of the write verb. All will have to be dealt with
to insure an air tight system.

"mdsi2000" <mdsi2000 (AT) yahoo (DOT) com> wrote in message
news:1156189726.336593.237280 (AT) m73g2000cwd (DOT) googlegroups.com...
Hello gang,
I'm trying to come up with a full proof method of replicating a system
for disaster recovery. The system is Universe NT. I also plan on
creating this same scenario for QM Win.

Is possible to update two files with one WRITE command? (I think D3 has
such a feature)One file would be local the other a networked file. This
way two machines will be TOTALY synchronize. What will happen when one
system goes down? Will the WRITE command abort?

I could write a SUBROUTINE to handle all the WRITE commands and have it
check for connectivity just before writing. Or I could trap the WRITE
failure error messages so I the program won't abort.

I have looked at the Universe Replication, but don't think it will work
for what I want to do. There will be gaps between the replications.

Any suggestions appreciated.

Peter



Reply With Quote
  #6  
Old   
Tom deL
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-21-2006 , 09:47 PM



Hi Pete,

<snip>

Quote:
I was reading the UV manual and there is a way to create a VOC that
uses MULTIFLES files. Is in the CREATE-FILE section of the DPF. The
VOC is 10 attributes and the last attribute is multivalued. These
multivalues holds the multiple data files. I'll be creating a few files
and testing it. I'll report back to the group.

tbw: QM has a simular option in the CREATE-FILE section.
AP/D3 also support multifiles but this doesn't seem to be what you
sought in your OP: Multifiles are simply two or more data files all of
which share a common dictionary (are all 'under' the same dict). Beside
the fact that these are normally all local, one would still need to
issue a separate WRITE for each data segment of the multifile - or use
triggers to accomplish this.

The suggestions about using triggers (perhaps with the addition of
Bruce's suggestion of transactions) will probably lead you closer to
your goal - you should be able to accomplish everything including error
trapping/recovery using that approach.

JMTCW,
-Tom



Reply With Quote
  #7  
Old   
Tom deL
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-21-2006 , 09:49 PM



Something that I meant to mention in my previous post: You might
contact Ashley Chapman of Billabong Services and ask about his data
replication system.


Reply With Quote
  #8  
Old   
Albino Timberwolf
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-22-2006 , 07:55 AM



Adding or updating is part of the problem. Don't forget about the deletes.

"mdsi2000" <mdsi2000 (AT) yahoo (DOT) com> wrote

Quote:
Writting the SUBROUTINE is an option, but there are too many programs
to modify and like Albino mentioned too many types of write, WRITE,
MATWRITE, WRITEV, ...

I was reading the UV manual and there is a way to create a VOC that
uses MULTIFLES files. Is in the CREATE-FILE section of the DPF. The
VOC is 10 attributes and the last attribute is multivalued. These
multivalues holds the multiple data files. I'll be creating a few files
and testing it. I'll report back to the group.

tbw: QM has a simular option in the CREATE-FILE section.

Pete


Albino Timberwolf wrote:
You could rename the WRITE verb to something like MYWRITE. Then create
your
own program to replace the WRITE verb. Your new WRITE program should
capture the account name, file name, record ID, and record data. Execute
MYWRITE using the captured parameters. This will release any locks in a
timely manner. Create an NFA pointer to the other system. Execute MYWRITE
to
the NFA pointer to the remote system to pass the data. If NFA fails you
can
log any relevant information since you will have it all. This type of set
up
allows you to bypass files or records that you may not want sent to the
redundant system. Many temporary files could be skipped. This method does
not rely on triggers, there is no need to re-enable triggers after a
re-boot. Also triggers may only be established by an administrator or
equivalent. If no one is on site that has the required security you could
be
in a sticky situation. The primary system could be restarted but no data
is
being sent to the remote with no log as to which records were missed.

There are several versions of the write verb. All will have to be dealt
with
to insure an air tight system.

"mdsi2000" <mdsi2000 (AT) yahoo (DOT) com> wrote in message
news:1156189726.336593.237280 (AT) m73g2000cwd (DOT) googlegroups.com...
Hello gang,
I'm trying to come up with a full proof method of replicating a system
for disaster recovery. The system is Universe NT. I also plan on
creating this same scenario for QM Win.

Is possible to update two files with one WRITE command? (I think D3 has
such a feature)One file would be local the other a networked file. This
way two machines will be TOTALY synchronize. What will happen when one
system goes down? Will the WRITE command abort?

I could write a SUBROUTINE to handle all the WRITE commands and have it
check for connectivity just before writing. Or I could trap the WRITE
failure error messages so I the program won't abort.

I have looked at the Universe Replication, but don't think it will work
for what I want to do. There will be gaps between the replications.

Any suggestions appreciated.

Peter





Reply With Quote
  #9  
Old   
Symeon
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-22-2006 , 09:04 AM



Sounds like you want data replication which comes standard with U2 .


Reply With Quote
  #10  
Old   
mdsi2000
 
Posts: n/a

Default Re: Update two files with one WRITE command - 08-22-2006 , 10:07 AM




Symeon wrote:
Quote:
Sounds like you want data replication which comes standard with U2 .
Symeon,
Have you used the Universe data replication? Will it replicate all data
files from the publishing system to the subscriber system, instantly? I
have not tested it, but if you say that it will, then I'll invest the
time.

Quote:
From what I read in the docs, it only updates at set times. This gives
me gaps in the synchronization. This will cause record counters and
dollar amounts to be off. Not a solution that we are looking for. But I
appreciate you responding.

Peter



Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.