August 28, 2009 at 12:21 pm
Hi all,
Can we restore only a single column instead of whole database?
We took backup later other teams made some changes to the database,I tried to update a column to change few records but then almost 10000 records got updated . As other teams worked on the same table ,I don't want to restore the whole database.Can I just restore the column.?
August 28, 2009 at 12:48 pm
Not directly.
Restore the backup as a new database and use UPDATE to get the values as you want them.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 28, 2009 at 8:17 pm
sreeya (8/28/2009)
Hi all,Can we restore only a single column instead of whole database?
We took backup later other teams made some changes to the database,I tried to update a column to change few records but then almost 10000 records got updated . As other teams worked on the same table ,I don't want to restore the whole database.Can I just restore the column.?
Next time, when updating data, do this:
begin tran
update tableA set columnA = 'NewValue'
then verify the expected record count
if correct COMMIT
if suspect ROLLBACK
But DON'T forget to either commit or rollback !!!
August 29, 2009 at 4:09 pm
Rule #33: Never ever run neither DML nor DDL against production without having successfully tested it before.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.August 30, 2009 at 1:44 pm
PaulB (8/29/2009)
Rule #33: Never ever run neither DML nor DDL against production without having successfully tested it before.
Shoot... that's rule #1 for me.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply