Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Issues in rollback script

Author  Topic 

Ravikumarc
Yak Posting Veteran

51 Posts

Posted - 2009-09-18 : 18:39:27
Hi,

There were changes in the production Db.So i have to update some of the records in prod..

The issue here was i should not create a table or DB in production..
can u pls assist me by providing a perfect rollback Script.

The script below is written by me in production.

/* step 1 :: Insert the records in the rollback table " */

select * into Backupdb.Rollback_Update__contact
from contact
where fullname in ('Zamora','Tom','Jim','Kairo Gonzalez','John Ochoa')

/* step 2:: RollBack Script */

UPDATE Prd
SET Prd.password = Roll.password,
FROM Med.contact Prd
INNER JOIN Depart.dbo.Rollback_Update_contact Roll
ON Prd.contact_id = Roll.contact_id
WHERE Prd.fullname in ('Zamora','Tom','Jim','Kairo Gonzalez','John Ochoa')

   

- Advertisement -