Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ONLINE BACKUP SCRIPT
elee3_at_hotmail.com wrote:
>
> Dear Oracle Experts,
>
> Happy new year to all!!!
> I am new in the Oracle arena. Thank you for any and all your help. I
> need to write an on-line backup script for the database. After setting
> the ARCHIVE_LOG mode on, I wrote the following script.
> 1. Backup the tablespaces. /*ORA-01142 cannot end online backup - none
> of the files are in backup
Does your script connect to the database & do an ALTER TABLESPACE..BEGIN BACKUP before copying the files in that tablespace & an ALTER TABLESPACE ...END BACKUP afterwards?
> 2. Backup the archived tablespaces.
> 3. Backup the control files.
Are you copying the actual control files, or a binary backup created by connecting to the db & issuing an ALTER DATABASE BACKUP CONTROLFILE TO <path>?
If your script is not doing these things then the backed up files are
****WORTHLESS*** -- you CANNOT recover from files copied from an open
database unless you tell Oracle that you are doing a hot (online)
backup.
> All three parts of the script are not working. How can I change the
> script so that it will run on WindowNT server, Oracle 7.3 database?
>
> Again, I greately appreciate your help.
>
> Best Regards,
> Elizabeth
>
> ALTER TABLESPACE cybertek_t BEGIN BACKUP;
> ALTER TABLESPACE system BEGIN BACKUP;
> ALTER TABLESPACE temp BEGIN BACKUP;
> ALTER TABLESPACE tools BEGIN BACKUP;
>
> HOST COPY F:\ORANT\DATABASE\LXOD\SYS1LXOD.DBF F:
> \ORANT\DATABASE\LXOD\SYS1LXODbkup.DBF
> HOST COPY F:\ORANT\DATABASE\LXOD\TMP1LXOD.DBF F:
> \ORANT\DATABASE\LXOD\TMP1LXODbkup.DBF
> HOST COPY F:\ORANT\DATABASE\LXOD\SYSSQL_T01.DB F:
> \ORANT\DATABASE\LXOD\SYSSQL_T01bkup.DB
> HOST COPY F:\ORANT\DATABASE\LXOD\CYBERTEK_T01.DBF F:
> \ORANT\DATABASE\LXOD\CYBERTEK_T01bkup.DBF
>
> ALTER TABLESPACE cybertek_t END BACKUP;
> ALTER TABLESPACE system END BACKUP;
> ALTER TABLESPACE temp END BACKUP;
> ALTER TABLESPACE tools END BACKUP;
>
> /*BACK UP THE ARCHIVED REDO LOG FILES*/
> ARCHIVE LOG STOP
> EXIT
> EOFarch1
>
> FILES ='%ORACLE_HOME%\DATABASE\LXOD\ARCHIVE'; EXPORT FILES
>
> SVRMGRL <<EOFarch1
> connect internal/oracle_at_lxod
> archive log start;
> exit
> EOFarch2
>
> /*BACKUP THE CONTROL FILES*/
> ALTER DATABASE lxod
> BACKUP CONTROLFILE TO 'E:\ORANT\DATABASE\LXOD\ctlLXODbkup.ora;
> F:\ORANT\DATABASE\LXOD\ctl2LXODbkup.ora';
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
Vincent Ventrone | The MITRE Corp. DBA, Dept. R101 | M/S C020 vav_at_mitre.org | 202 Burlington Rd. (781) 271-7048 | Bedford, MA 01730Received on Thu Dec 30 1999 - 14:24:42 CST