Backup
Scenario
I want to backup from 7 client database to 1 server database. I don't know the db structure (db server or client). both databases have old data. now I have to get the tool to take a backup for this. and it is also possible to back up the old data [if any updates are done on the old data.] please help find a solution for this. 1. How can I fix this problem. 2. Database not specified, maybe MS Access or Sql Server 2005 3. In this I can implement this [I think to do it in C #]
please help me find a solution
a source to share
I'm not sure why you would want to do it this way - if you are just trying to copy client databases (which I interpret as "file-based"), then why not just take copies of your files as part of a broader backup strategy?
If you write backup material to put all the data in a server based RDBMS, you also have to think about how you can later restore that information, which presumably means even more code for you.
So - I don't think this is a good idea, but if you dare, I would start writing a class (which is almost abstract) dedicated to the purpose of reading the client database structure (tables, fields, views, etc.). I then inherited this to get a specific class to do this for each different client DB type. Then you can use ADO.Net to read values from tables in the client database, populate the data with information, and then write that information to the server-based database.
I really can't stress enough, although I don't like this idea - it seems too complicated and also won't deal with functions etc.
Anyway good luck
Martin
a source to share
Desirably to do this aside, one simple answer for a specific subset of the problem would be to create a DSN for the target SQL Server (or any server database) and in the export table access by table in the DSN. You can do this through the Access UI, and it can be automated in Access using DoCmd.TransferDatabase. It can be a little tricky to figure out the correct connection string, and you will also need to do something to rename the exported tables so that there are no collisions between databases, but this can be easily handled in a bit of VBA code.
I'm only posting this because a lot of people don't see the ability to export to ODBC DSNs, which doesn't require DDL writing, etc. However, it may or may not choose the right target data types, so you will need to see in some particular situation if that is good enough or not.
a source to share