Greetings and salutations.
We are in a tough situation, where we are going to have two instances of our
application running on two different server:
Server1: The original server, will continue to handle projects that are
already opened until they are all closed and will not be able to open new
projects.
Server2: The new server, will handle all new projects.
These servers will be in two different servers and in two different parts of
the world, so network access will be very slow. What I am thinking in doing
is to copy the data on Server1 to Server2 and set the starting id at a
higher point than the last id on Server1. For example, Server1 highest
project id is 134000, so, I would set the start id for Server2 to 135000.
The Server two will continue to add new projects, so the next project id
will be 135001 and so forth. Sounds easy. The problem is that I will have
to update, every night, the DB on Server2 with the changes made to the DB in
Server1. I have a LastUpdateDate column that has the latest update date so
that just those that have been updated get changed. So, I am thinking in
copying the DB for Server1 to c:\temp\Server1.db to Server2, so that I can
do,
connect to Server2.db
ATTACH 'c:\temp\Server1.db' AS c;
BEGIN;
INSERT OR REPLACE INTO LSOpenProjects
SELECT * FROM c.LSOpenProjects
WHERE LastUpdateDate != c.LastUpdateDate AND c.id < 134000;
END;
Will someone tell me if this will update every record in Server2.db:
-- that LastUpdateDate in Server2.db does not equal to the LastUpdateDate in
Server1.db
-- it will no update any other record in Server2.db that is greater than
139999
Thanks for your help and feedback. If someone has any suggestions, please
feel free to comment. Thanks.
josé
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users