Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Spooling from svrmgr30
AUTOMATING COLD BACKUPS ON WINDOWS NT
Sometimes the DBA wants to do the cold backup but since the database is large and it takes a long time to do a backup, he/she should do it at a time when nobody needs the database. Usually it is done at night, when there's nobody around. Therefore, the need for an automatic backup procedure is necessary.
You can do a cold backup with the following procedure using the scheduler. You can use either the command line "AT" or the GUI version of the scheduler. It is recommended that you use the GUI version that comes with the NT Resource Kit.
The procedure is as follows:
o the database is shutdown
o the backup commands are executed. Then
o the database is restarted.
Make sure the service for Scheduler has already been started. You can check it, on NT services applet. If it is not started, go to the Control Panel, click on Services , highlight the Schedule Service, then click on start.
d:\orant\bin\sqldba71.exe @d:\shutdown.sql copy d:\orant\rdbms71\*orcl.ora c:\backup d:\orant\bin\sqldba71.exe @d:\startup.sql
or
If you are using the command line Scheduler, then this would be the contents of your bckup.bat file:
call d:\orant\bin\sqldba71.exe command="@d:\shutdown.sql" copy d:\orant\rdbms71\*orcl.ora d:\backup call d:\orant\bin\sqldba71.exe command="@d:\startup.sql 2. CREATE A SHUTDOWN.SQL SCRIPT set instance P:NTMachineName:ORCL connect internal/password shutdown exit
3. CREATE A STARTUP.SQL SCRIPT
set instance P:NTMachineName:ORCL connect internal/password startup pfile=path to initorcl.ora exit
It is assumed that you have the Oracle home directory at d:\ORANT. If you have it somewhere else, modify the above scripts to match your configuration. It is also assumed that the default Sid ORCL is your SID and all the database files are located under d:\orant\rdbms71. Modify the above scripts if you are using another SID and if they are located in another directory.
If you have several databases, then in each startup.sql and shutdown.sql use the proper Sid associated with that database.
SCHEDULING THE BACKUP
If you are using the "AT" command line type the following at the NT DOS
prompt:
d:\>at time "d:\bckup.bat"
where time is the time you want to execute the batch job.
For example:
d:\>at 14:54 "d:\bckup.bat"
If you are using the GUI version of NT Scheduler:
1. double click NT Scheduler 2. click on add 3. in the command line enter the full path of bckup.bat file and set
the time to when you want to do the backup.
Paul in VT Received on Fri Sep 10 1999 - 13:17:20 CDT
![]() |
![]() |