Difference between revisions of "Flashback query with database in noarchivelog mode"
From dbawiki
(Created page with "Typically, development databases are not started in archivelog mode. This causes a problem for hot backups but not necessarily for flashback queries. You can still flashback to a...") |
|||
| Line 10: | Line 10: | ||
set heading off | set heading off | ||
spool old_version.sql | spool old_version.sql | ||
| − | + | ||
select text from dba_source | select text from dba_source | ||
as of timestamp to_timestamp('22-SEP-2011 07:30:00.000') | as of timestamp to_timestamp('22-SEP-2011 07:30:00.000') | ||
| Line 16: | Line 16: | ||
and name='MYPACKAGE' | and name='MYPACKAGE' | ||
order by type, line; | order by type, line; | ||
| − | + | ||
spool off | spool off | ||
Revision as of 15:39, 30 November 2011
Typically, development databases are not started in archivelog mode. This causes a problem for hot backups but not necessarily for flashback queries. You can still flashback to any time within the online redo logs:
ALTER SESSION
SET NLS_TIMESTAMP_FORMAT =
'DD-MON-YYYY HH24:MI:SS.FF3';
set lines 9999
set trimspool on
set pages 9999
set heading off
spool old_version.sql
select text from dba_source
as of timestamp to_timestamp('22-SEP-2011 07:30:00.000')
where owner='SCOTT'
and name='MYPACKAGE'
order by type, line;
spool off