Reputation: 2914
I don't really ask a lot of questions but This time, it's too much. Here's the problem. I have these two database (Sybase) servers and there's this database with over 90 tables but i need to archive only 20 tables.
These tables are however quite large and can contain up to 90million records. So here's the deal. Currently, what I do is that
Now, I've tried other methods like for instance.
Kindly advice on any other solution, approach or thought you'd think can help. Please not that all solutions are welcome.
Thanks in advance.
Upvotes: 1
Views: 3307
Reputation: 4462
select
statement and create insert/update
statements:String query = "UPDATE OR INSERT INTO TABLE (ID, VALUE) VALUES (9, 2) MATCHING (IDPRODUCT, COUNT); "+
"UPDATE OR INSERT INTO TABLE (ID, VALUE) VALUES (10, 1) MATCHING (IDPRODUCT, COUNT); "+
"COMMIT WORK;";
ON EXTERNAL
and EXECUTE PROCEDURE
with procedure name as parameter instructions.The users need to monitor and know how the tool is running.
For each commited table update user interface.
Upvotes: 1
Reputation: 9
Do not copy such amount of data by yourself. Create database jobs to copy/archive tables. And monitor the output/logs of those jobs in your application. It will be much faster.
Upvotes: 1