Cold Database backup script
--Set SQL*Plus variables to manipulate output
set feedback off heading off verify off trimspool off
set pagesize 0 linesize 200
[@more@]--Set SQL*Plus variables to manipulate output
set feedback off heading off verify off trimspool off
set pagesize 0 linesize 200
--Set SQL*Plus user variables used in this script
define dir = '/backup/cold_backup'
define fil = /tmp/closed_backup_temp.sql'
prompt Spool to &fil ......
--Create a command file with file backup commands
spool &fil
select 'host cp '||name||' &dir ' from v$datafile order by 1;
select 'host cp '||member||' &dir ' from v$logfile order by 1;
select 'host cp '||name||' &dir ' from v$controlfile order by 1;
select 'host cp '||name||' &dir ' from v$tempfile order by 1;
spool off
--Shutdown the database cleanly
shudown immediate;
--Run the copy file commands using the os command
@fil
--Start the database
startup
set feedback off heading off verify off trimspool off
set pagesize 0 linesize 200
[@more@]--Set SQL*Plus variables to manipulate output
set feedback off heading off verify off trimspool off
set pagesize 0 linesize 200
--Set SQL*Plus user variables used in this script
define dir = '/backup/cold_backup'
define fil = /tmp/closed_backup_temp.sql'
prompt Spool to &fil ......
--Create a command file with file backup commands
spool &fil
select 'host cp '||name||' &dir ' from v$datafile order by 1;
select 'host cp '||member||' &dir ' from v$logfile order by 1;
select 'host cp '||name||' &dir ' from v$controlfile order by 1;
select 'host cp '||name||' &dir ' from v$tempfile order by 1;
spool off
--Shutdown the database cleanly
shudown immediate;
--Run the copy file commands using the os command
@fil
--Start the database
startup
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/76065/viewspace-792091/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Cold backup script
- Cold backup and restore the entire databaseRESTDatabase
- oracle cold backup scriptsOracle
- rman backup script(引用)
- Oracle Database ScriptOracleDatabase
- oracle full database backupOracleDatabase
- Rman backup standby databaseDatabase
- oracle 11g rman backup scriptOracle
- rman backup database force 功能Database
- SQLBackupAndFTP12.0 failed to backup database with full backup typeSQLFTPAIDatabase
- T-SQL Verify Database BackupSQLDatabase
- How to use rman backup a noarchivelog databaseHiveDatabase
- RMAN Backup Shell Script Example (Doc ID 137181.1)
- RMAN - backup archivelog all 與 backup database plus archivelog 區別HiveDatabase
- Crunchy PostgreSQL database backup via pgo commandSQLDatabaseGo
- 理解RMAN backup database plus archivelog命令DatabaseHive
- recover database using backup controlfileDatabase
- recover database using backup controlfile與 recover database 的區別Database
- recover database using backup controlfile理解Database
- recover database using backup control fileDatabase
- How to restore and recover a database from an RMAN backup_881395.1RESTDatabase
- RMAN backup validate database on databases in noarchivelog modeDatabaseHive
- rman backup as copy database format '/tmp/%U.dbf'DatabaseORM
- SQL SERVER BACKUP DATABASE 加快備份速度方法SQLServerDatabase
- Manually Backup - Restore or Clone a Database to Another Node [ID 562556.1]RESTDatabase
- oracle database backup and recovery user's guide part IVOracleDatabaseGUIIDE
- oracle database backup and recovery user's guide part IIIOracleDatabaseGUIIDE
- recover database until cancel using backup controlfileDatabase
- Recover database using backup controlfile until cancelDatabase
- alter database backup controlfile to trace的問題Database
- alter database backup controlfile to trace的含義Database
- 理解RMAN backup database plus archivelog delete all input命令DatabaseHivedelete
- 重建控制檔案--alter database backup controlfile to traceDatabase
- oracle database backup and recovery user's guide part VII & VIIIOracleDatabaseGUIIDE
- oracle database backup and recovery user's guide part V & VIOracleDatabaseGUIIDE
- oracle database backup and recovery user's guide part I & IIOracleDatabaseGUIIDE
- RMAN10g: backup copy of database (Doc ID 266980.1)Database
- oracle create a new database using backup controlfile to traceOracleDatabase