Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to do an online backup?
On Mon, 25 Oct 1999 18:28:42 +0100, "Eric Dantie"
<edantie_at_rcanaria.es> wrote:
>ALTER TABLESPACE tablespacename BEGIN BACKUP
>
>do your copy
>
>ALTER TABLESPACE tablespacename END BACKUP
>
>Eric
Basically right, but there are a few more steps to the process, if you
want to be able to do a full recovery.
1 - you need a list of the database files for each tablespace. You
can get this with the command
SELECT tablespace_name, file_name FROM sys.dba_data_files
ORDER BY tablespace_name, file_name;
2- Find out what the oldest on-line log is:
SELECT MIN(sequence#) from v$log;
3 - mark a tablespace for backup:
ALTER TABLESPACE <tablespace name> BEGIN BACKUP;
4 - do you copy of the data files for that tablespace
5- tell the RDBMS that you're done with the tablespace:
ALTER TABLESPACE <tablespace name> END BACKUP;
6 - repeat steps 3 - 5 for each tablespace;
7 - Get the current on-line log number and archive it
SELECT MAX(sequence#} FROM v$log;
ALTER SYSTEM SWITCH LOGFILE;
8 - backup all the archived logfiles from min to max and the control
files.
Received on Sat Oct 30 1999 - 13:10:05 CDT