Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ONLINE BACKUP SCRIPT

111 views
Skip to first unread message

el...@hotmail.com

unread,
Dec 29, 1999, 3:00:00 AM12/29/99
to
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
2. Backup the archived tablespaces.
3. Backup the control files.

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@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

unread,
Dec 30, 1999, 3:00:00 AM12/30/99
to

el...@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.

--
Vincent Ventrone | The MITRE Corp.
DBA, Dept. R101 | M/S C020
v...@mitre.org | 202 Burlington Rd.
(781) 271-7048 | Bedford, MA 01730

Vincent Ventrone

unread,
Dec 30, 1999, 3:00:00 AM12/30/99
to
Disregard my previous post more or less -- I didn't realize at first
that your script was in the body of your message. I looked at the script
& I think your problem is that you put ALL of the tablespaces in BACKUP
mode at the the same time -- as far as I know you cannot do this.
Instead do one tablespace at a time -- ALTER TABLSPACE BEGIN
BACKUP...(copy files) ALTER TABLESPACE END BACKUP...go to next
tablespace. Good luck.

Jeremiah Wilton

unread,
Dec 31, 1999, 3:00:00 AM12/31/99
to
There is no restriction in Oracle to the number of tablespaces in backup
mode at one time. Often people parallelize backups by copying more than
one tablespace at a time.

In heavy OLTP environments it is impractical to put all tablespaces in
backup mode at one time, but not impossible. The practicality depends
on the rate of redo generation for each tablespace.

WRT the original poster's question, there is simply not enough
information to even speculate what is going on. She will have to debug
the script herself.

--
Jeremiah

0 new messages