Re: multiple db vs 2 processes -
01-16-2006
, 03:01 AM
Sandy,
There are a couple of ways that you can do this:
a- A single shared environment, which both processes use that provides
shared access to all 4 databases.
b- Two environments:
* EnvironmentA, shared by both processes, which provides access to
db1, db2 and db3 (since there are mulitple processes involved, you need
them to share an environment),
* EnvironmentB, used only by process 2, which provides access to
db4.
If you choose the 2 environment design, you need to be aware that
transactions can't span environments. So, process2 can't include
operations on db1, db2, db3 and db4 in the same transaction (assuming
that you are using transactions). Also, if you are using transactions,
then you much make sure that each environment places the transaction
log in a different directory. If not, then both environments will
attempt to write to the same transaction log and log corruption will
occur.
I'm not sure why managing checkpoints separately is a design goal,
unless process1 and process2 are both write intensive processes and you
are trying to separate the checkpoint disk I/O so that one process will
not affect the other. Without understanding more about your
application, I can't comment on whether this is a useful exercise or
just a complication. You might try implementing the application using a
single environment which provides access to all for databases. If you
run into
disk I/O and checkpointing issues, it's easy enough to introduce a
second environment for db4 into process2 at a later time.
Hope that helps.
Regards,
Dave |