Cold backup and restore the entire database
-- Create
testing data
SQL> create table t tablespace
ts_auto as select sysdate col01 from dual;
Table created.
SQL> select * from t;
COL01
---------
20-AUG-10
-- Full
cold backup
[oracle@centos-4 workarea]$
./cold_backup.sh
-- Simulate
breaking data files
[oracle@centos-4 workarea]$ rm -f
/u01/oradata/shenzhen/ts_auto.dbf
[oracle@centos-4 workarea]$ sqlplus
/ as sysdba
SQL> startup force
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 155190864 bytes
Database Buffers 125829120 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-01157: cannot identify/lock
data file 6 - see DBWR trace file
ORA-01110: data file 6:
'/u01/oradata/shenzhen/ts_auto.dbf'
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
-- Restore
the full cold backup files
[oracle@centos-4 workarea]$ cp -f
/u01/backup/cold/20100820/* /u01/oradata/shenzhen/
[oracle@centos-4 workarea]$ sqlplus
/ as sysdba
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 155190864 bytes
Database Buffers 125829120 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> select * from t;
COL01
---------
20-AUG-10
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12472709/viewspace-1037122/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Cold Database backup scriptDatabase
- Cold backup script
- oracle cold backup scriptsOracle
- How to restore and recover a database from an RMAN backup_881395.1RESTDatabase
- Manually Backup - Restore or Clone a Database to Another Node [ID 562556.1]RESTDatabase
- SQL Server Backup & RestoreSQLServerREST
- TFS Express backup and restoreExpressREST
- backup and restore tipsREST
- PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.16.00.00 in TARGET database isSQLPackageRESTDatabase
- DBMS_BACKUP_RESTORE.DBMS_BACKUP_RESTORE用於特殊情況下的恢復REST
- read only tablespace backup restoreREST
- restore database check readonlyRESTDatabase
- 轉貼_RMAN-DBMS_BACKUP_RESTOREREST
- oracle full database backupOracleDatabase
- Rman backup standby databaseDatabase
- rman backup database force 功能Database
- db2備份恢復(backup restore)DB2REST
- SQLBackupAndFTP12.0 failed to backup database with full backup typeSQLFTPAIDatabase
- Crunchy PostgreSQL database restore via pgo commandSQLDatabaseRESTGo
- rman restore database(spfile,controlfile, datafile)RESTDatabase
- restore database報錯ora-19573RESTDatabase
- 使用RMAN backup和restore方式部署物理備庫REST
- 備份恢復統計資訊 backup and restore statsREST
- 11g asm md_backup md_restoreASMREST
- T-SQL Verify Database BackupSQLDatabase
- How to Restore the Database Using AMDU after Diskgroup CorruptionRESTDatabase
- 通過dbms_backup_restore修改oracle的dbidRESTOracle
- 【ASM】ASMCMD 之md_backup,md_restore介紹ASMREST
- RMAN-06100: no channel to restore a backup or copy of datafileREST
- How to use rman backup a noarchivelog databaseHiveDatabase
- RMAN - backup archivelog all 與 backup database plus archivelog 區別HiveDatabase
- cdc目標端資料庫初始化(backup restore)資料庫REST
- 使用dbms_backup_restore進行資料庫恢復REST資料庫
- RMAN-06023 no backup or copy of datafile 1 found to restoreREST
- RMAN restore validate database報ORA-19693RESTDatabase
- Crunchy PostgreSQL database backup via pgo commandSQLDatabaseGo
- 理解RMAN backup database plus archivelog命令DatabaseHive
- recover database using backup controlfileDatabase