-- SAMPLE SCRIPT FOR OFFLINE BACKUPS OF DATABASE
-- FILENAMES & DIRECTORIES MUST BE MODIFIED
--THIS SCRIPT IS RUN FROM SQLPLUS, LOGGED IN AS SYSDBA on a DIRECT CONNECTION

prompt Making directory; 
host mkdir c:\bck_offline; 
prompt backing up v$parameter; 
set pagesize 100;
set heading off; 
set feedback off; 
spool c:\bck_offline\pfile.ora;
select name || ' = ' || value from v$parameter order by name ; 
spool off ;
set feedback on ;
set heading on ;
shutdown immediate; 
prompt copying control files ; 
host copy C:\ORACLE\ORADATA\fastdb\CONTROL01.CTL c:\bck_offline\CONTROL01.CTL; 
--host copy C:\ORACLE\ORADATA\fastdb\CONTROL02.CTL c:\bck_offline\CONTROL02.CTL; 
--host copy C:\ORACLE\ORADATA\fastdb\CONTROL03.CTL c:\bck_offline\CONTROL03.CTL; 
prompt copying redologs; 
--host copy C:\ORACLE\ORADATA\fastdb\redo04.LOG  c:\bck_offline\redo04.LOG; 
--host copy C:\ORACLE\ORADATA\fastdb\redo05.LOG  c:\bck_offline\redo05.LOG; 
--host copy C:\ORACLE\ORADATA\fastdb\redo06.LOG  c:\bck_offline\redo06.LOG; 
host copy C:\ORACLE\ORADATA\fastdb\redo07.LOG  c:\bck_offline\redo07.LOG; 
prompt copying pFiles; 
host copy C:\oracle\admin\fastdb\pfile\init.ora c:\bck_offline\init.ora; 
prompt copying datafiles; 
--host copy C:\ORACLE\ORADATA\fastdb\SYSTEM01.DBF   c:\bck_offline\SYSTEM01.DBF; 
--host copy C:\ORACLE\ORADATA\fastdb\UNDOTBS01.DBF  c:\bck_offline\UNDOTBS01.DBF; 
--host copy C:\ORACLE\ORADATA\fastdb\DRSYS01.DBF    c:\bck_offline\DRSYS01.DBF; 
--host copy C:\ORACLE\ORADATA\fastdb\EXAMPLE01.DBF  c:\bck_offline\EXAMPLE01.DBF; 
host copy C:\ORACLE\ORADATA\fastdb\USERS01.DBF    c:\bck_offline\USERS01.DBF; 
prompt copying network files;
host mkdir c:\bck_offline\network; 
host copy C:\oracle\ora90\network\ADMIN\*.ora c:\bck_offline\network\; 
prompt copying password file;
host copy C:\oracle\ora90\database\PWDfastdb.ora c:\bck_offline\PWDfastdb.ora;
startup;