1

I've searched extensively for the answer to this question and could not find a good answer. I've looked into several restore DB articles and a few rollbacks too but still no success.

My situation is: I have a very large database in which I did execute a wrong update query for a single column of a single table, and I have a full backup of this database until yesterday (which is more than enough to correct the problem). But the other tables of this same DB were updated in the meantime, and I require them to keep their current values.

so after all the reading my plan was : Restore the full backup to a new location then get the values of the column I need and input those in the current database.

My problem is: I'm not being able to restore this full backup without affecting the production DB. When I try to restore it, the sql studio says the mdf file can't be overwritten (which is good because I'll be using the table further), then i saw some articles telling me to use the MOVE query. But if I do use it the mdf files from the original/production table will be relocated thus affecting the table right ? I also saw a few articles telling me to roll it back if I have transaction logs backups. I wasn't actually able to tell if I do have those, nor what are those. even after googling it out

Any thoughts on how I should proceed ?

sorry if it is a newbie question, but I'm not originally a programmer yet I have been doing this for work and I really need it done fast ! So any help would be strongly appreciated

I'm using SQL Server Standard 2005 with SQL Server Mangmt Studio 2008.

Pedro Braz
  • 2,261
  • 3
  • 25
  • 48
  • 1
    possible duplicate of [How to restore to a different database in sql server?](http://stackoverflow.com/questions/6267273/how-to-restore-to-a-different-database-in-sql-server) – Alex K. Jan 07 '15 at 16:30
  • "the sql studio says the mdf file can't be overwritten" that was close. You were about to overwrite your production database. – usr Jan 07 '15 at 16:31
  • Alex thanks a lot for the article you've pointed, but those answers include the MOVE TO query I wanted to know about. That does move the original files and rename then ? or it just create new ones ? thanks – Pedro Braz Jan 07 '15 at 16:35
  • How about restoring the database to a different location and different name? http://technet.microsoft.com/en-us/library/ms190447%28v=sql.105%29.aspx – Code Different Jan 07 '15 at 16:44
  • 1
    If you MOVE from a backup to a new database name/new file names it will not affect the original database or its files – Alex K. Jan 07 '15 at 18:01
  • possible duplicate of [Creating new database from a backup of another Database on the same server?](https://stackoverflow.com/questions/10299811/creating-new-database-from-a-backup-of-another-database-on-the-same-server/10300030#10300030) – dani herrera May 24 '17 at 07:49

1 Answers1

2
  1. Restore The backup With Different Name Like DB_Temp on any location
  2. Copy the Table From Running DB using Select INTO.......
  3. Import records from newly restored DB (DB_Temp) Table to Running DB
  4. Delete the Database DB_Temp
  5. Check the changes between recently copied and original table
  6. Update records accordingly Thanks
ISB
  • 112
  • 7