110 pts.
 Restore a View Sql Server 2005
I over-wrote a VIEW by mistake. How do I recover the original version of the view? Is there a way to ROLLBACK a "CREATE VIEW..." command?

Software/Hardware used:
SQL Server 2005
ASKED: October 14, 2009  3:10 PM
UPDATED: October 15, 2009  3:15 AM

Answer Wiki:
If your database is in the SIMPLE recovery mode then no there's no way to get the schema for the view back. If your database is in FULL or BULK LOGGED recovery mode then you can use Quest's LiteSpeed or Lumigent's Log Explorer (I think Red Gate has a log reader product as well) to find the transaction and roll back the transaction. If you have a database backup which has the correct schema of the view in it, you can use Quest's LiteSpeed to restore just the schema for that view from the database backup. If you don't have any of those products, but you have a backup of the database, restore the backup to another server (or the same server, but with a different database name) and get the correct schema for the view from there.
Last Wiki Answer Submitted:  October 15, 2009  3:15 am  by  MParman   65 pts.
All Answer Wiki Contributors:  MParman   65 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _