List:General Discussion« Previous MessageNext Message »
From:Sydney Puente Date:October 22 2009 9:32am
Subject:Re: ad hoc replication for 3 X 40 000 rows
View as plain text  
> However sync's  from  MS SQL to MYSQL are required every 24 hours after the initial
> dataload.
> And this has me puzzled.
> Advice anyone?
> Please ;-)

If there's a auto-inc key, you can find the last one from the
MySQL_table then
> SELECT ... from MSSQL_table where key > found_key.

Otherwise, add a field to the
> tables:
seen ENUM('NEW', 'GET', 'GOT') default 'NEW';

At update time:
UPDATE MSSQL_table
> SET seen='GET' WHERE seen='NEW';
SELECT ... FROM MSSQL_table WHERE seen='GET';
INSERT INTO
> MySQL_table ...
UPDATE MSSQL_table SET seen='GOT' WHERE seen='GET'; 

lather, rinse,
> repeat.


-- 
Don Read                                        don_read@stripped
     It's
> always darkest before the dawn. So if you are going to
     steal the neighbor's
> newspaper, that's the time to do it.

Thanks very much Don, I think that shows the
> way.
However I cannot make any changes to the MSSQL db. 
So as I only have 3 tables I am
> thinking of populating a 3 shadow tables in the mysql db.
The network to the MSSQL db and
> the MSQSL db itself is unreliable, hence the need to do an extract.

Any quick wins spring
> to mind? (Or gotchas?)

Syd


      
Thread
ad hoc replication for 3 X 40 000 rowsSydney Puente21 Oct
  • Re: ad hoc replication for 3 X 40 000 rowskabel21 Oct
  • Re: ad hoc replication for 3 X 40 000 rowsDon Read21 Oct
Re: ad hoc replication for 3 X 40 000 rowsSydney Puente22 Oct