how to merge or copy one database to another at Midnight every day
-
-
Hi All, I am trying to find a solution on gettting records from One database in to another one.So that i can only rely on one database for any information instead of having to login in to two databases. Any idea will be much appreciated. Many thanks
You can write a program to do the job, then schedule it using the scheduler (get access to it from Control Panel) to make it run every day at midnight.
-
Hi All, I am trying to find a solution on gettting records from One database in to another one.So that i can only rely on one database for any information instead of having to login in to two databases. Any idea will be much appreciated. Many thanks
To supplement my previous answer, I suggest you taking a look at the article about copying tables between two databases: http://69.10.233.10/KB/database/GenericCopyTableDataFcn.aspx[^] This works fine in my test programs.
-
To supplement my previous answer, I suggest you taking a look at the article about copying tables between two databases: http://69.10.233.10/KB/database/GenericCopyTableDataFcn.aspx[^] This works fine in my test programs.
Thanks so Much for your reply.Its much apprecaited. Let me expalin clearly what i need. I have two mirrored databases exactly the same to each other.There is few table that contains different records.I want to copy the data from Database A to Database B How can i do that?I would appreciate if you can give me a detailed step. Many thanks for your help.
-
Thanks so Much for your reply.Its much apprecaited. Let me expalin clearly what i need. I have two mirrored databases exactly the same to each other.There is few table that contains different records.I want to copy the data from Database A to Database B How can i do that?I would appreciate if you can give me a detailed step. Many thanks for your help.
Currently I don't have much time to do this. I used the code (that I pointed out in my previous message) in my projects. I only needed to modify a little to solve some Microsoft Access problems. It worked very well. What you need to do is to build a standlone program to conduct the copy operation, then schedule it using the Windows Scheduler. I can only guarantee that the code to copy tables across databases works well, whether they are of the same type (e.g. both of them are MS Access) or different (can be Oracle, MS SQL Server, MySQL Server, etc). The hard part, though, is the creation of the table if it does not exist in the target database before the copy operation starts. This, of course, is assuming that you don't plan to create the table(s) by hand. You have to write that part of the program. However, from your description of your project, this problem does not exist. You already have all the tables ready. I would suggest using C# and ADO.NET to write this program, since it will save you lots of time.
-
Currently I don't have much time to do this. I used the code (that I pointed out in my previous message) in my projects. I only needed to modify a little to solve some Microsoft Access problems. It worked very well. What you need to do is to build a standlone program to conduct the copy operation, then schedule it using the Windows Scheduler. I can only guarantee that the code to copy tables across databases works well, whether they are of the same type (e.g. both of them are MS Access) or different (can be Oracle, MS SQL Server, MySQL Server, etc). The hard part, though, is the creation of the table if it does not exist in the target database before the copy operation starts. This, of course, is assuming that you don't plan to create the table(s) by hand. You have to write that part of the program. However, from your description of your project, this problem does not exist. You already have all the tables ready. I would suggest using C# and ADO.NET to write this program, since it will save you lots of time.
Thanks so much it really works for me.What i want to find out now is How can i make sure that the copy process doesnt copy data already copied when doing it on another session. If the copy is done onece during the second operation will it know what records to add? How do you also solve the problem when the two databases run in Different virtual private networks? Lastly,when you copy the data it doesnt really check what has been copied before.So all the information will be be copied again every time the code runs. Many thanks
modified on Wednesday, November 11, 2009 7:51 AM