Re: rollback schema changes
Date: Sat, 26 Mar 2011 21:20:04 +0000 (UTC)
On Sat, 26 Mar 2011 12:25:44 -0700, prunoki wrote:
> The goal would be to undo the effects of a faulty script which generates
> an error midway, but has made several alter tables and such. If I want
> to run the full, corrected script again, it would be nice not to spend a
> day performing a restore.
That's what an export is for. Before changes on a schema, always export
the schema. The people turned into enemies by the "web 2.0" would know
that. The dreaded "DBA" was expected to know how to manage software
installation, but the "DBA 2.0" is expected only to know which button on
the OEM to click. You, apparently, have the DBA 2.0 who didn't read the
installation plan and screamed when seeing that the plan doesn't include
the prior export.
Alternative is the "flashback database" command, which might work if your undo tablespace is large enough. That, however, will not roll back only one schema. If there is a physical standby, you can try it there, too.