December 6, 2011 at 1:31 am
Hi Everyone,
I need some guidance from some pros here. We ran a merge replication job which deleted several columns in the Subscriber Database. These missing 6 columns are all in one table called Product_Variant. I just discovered the problem and I know that restoring the missing columns and data will fix the runtime error we are seeing on the front-end web server. So how would I accomplish this restore?
I know I can restore the entire table from last nights backup into a test DB or restore the entire database but after that step I'm pretty much lost. not sure what I can use to accomplish the column and data dump from the restored db. Any help would be great.
Rick
December 7, 2011 at 3:10 pm
Altering the table to add the columns back in is going to be the first step I think. If you restore the most recent backup with the data in place AND you have a primary key on the table it is simply a matter of doing a cross-database join/update using the PK to link the rows in the current and old versions of the table. Obviously this requires you to have not updated any PK values in the mean time. If you don't have a PK or some other unique way to link existing data with restored copy of the table then you are pretty much stuck with complete restore of the table or perhaps the database.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply