I'm tasked with providing a solution to move a group of tables from one database Sybase 11.9 to another Sybase 12 as a manual failover server. The only problem I am struggling with is how to move them.
These are some of the issues:
1.) Need to copy only data that has not already been copied or has changed.
2.) The solution need to be able to accept new entry without programmer intervention. (BCP requires the input/output file be created)
Is there a way to export XML from 11.9 and import it directly into 12.0? I was able to do this with SQL2000.
With BCP I don't think there is a way to identify records that changed before the update, this would mean that I would have to import the entire table into a temp table an then compare the tables, seems like a lot of overhead. If I'm going to import the whole table I should probably just do a complete replace of the existing table.
RS is not really your solution, because for each new table, you must add repdefs & subscriptions. HA module is an other possibility.
A shell script based on a table of configuration is an easy way to do this type of action. E.g.
1) each necessary table is added in this table
2) a trigger on insert/update/delete will mark this table in case of change
3) a defncopy/bcp is executed for each marked table, via crontab