I have a SQL-Server database that crashed while I was away on vacation. All info from 5/2/13 is missing from our current database because my replacement implemented a back-up of the database from 5/1/13. So, My current database has all information up to 5/1/13 (missing data from 5/2/13) and 5/3/13 on. I have access to, the database with all info from 5/2/13 Is there a way to merge this info?
-
2Did you know that "5/2" has a different meaning in some parts of the world?ypercubeᵀᴹ– ypercubeᵀᴹ2013年05月13日 15:37:16 +00:00Commented May 13, 2013 at 15:37
-
2Which RDBMS, for starters?Philᵀᴹ– Philᵀᴹ2013年05月13日 16:06:47 +00:00Commented May 13, 2013 at 16:06
-
Do you possibly mean "merge the transactions" rather than "merge the databases"? If so, whatever solution is put forward will be subject to the possiblity that some transactions that were allowed in the actual scenario would have been disallowed if the the 5/2 transactions had been applied before the 5/3 transactions were attempted.Walter Mitty– Walter Mitty2013年05月14日 10:09:17 +00:00Commented May 14, 2013 at 10:09
1 Answer 1
You'll have to manually query for the rows and copy then in using either T-SQL or SSIS. There's no way to take the two databases and have SQL Server just merge them into one database.
If you are using identity vales on tables you'll need to be careful of duplicate values and assign new values to the rows that you are inserting. If you have other tables which rely on those values those tables will need to be updated with the new values as they are written to the production database.
This isn't an easy thing to do, but it is doable.