Define 3 = & / export / hzwork / backup / define 4 = & test
Set Heading Offset Verify Offset Feedback Offset Linesize 132Set PageSize 1000set Termout Offspool Cold_Back.sql
SELECT 'Connect Internal' from DUAL
SELECT 'Startup Force' || CHR (10) || 'Shutdown Normal' from DUAL
/ * Data files * / select '! Cp' || file_name || '&& 3' || CHR (10) || '! Compress -f' || '&& 3' || '/' || Substr (file_name, Instr (File_name, '/', -1) 1) from sys.dba_data_files /
/ * Redo log files * / select '! CP' || MEMBER || '&& 3' || CHR (10) || '! Compress -f' || '&& 3' || '/' || Substr (Member, INSTR (MEMBER, '/', -1) 1) from V $ logfile /
/ * Control Files * / SELECT '! CP' || Name || '&& 3' from V $ ControlFile /
/ * Init and config files * / select '! CP $ Oracle_Home / DBS / INIT && 4' || '.ora && 3' from Dual;
SELECT '! CP $ Oracle_Home / DBS / Config && 4' || '.ora && 3' from Dual
Select 'Startup' from Dual; SELECT 'EXIT' from Dual; SPOOL OFF