日期:2014-05-16 浏览次数:20501 次
1、查看数据库的运行模式
C:Documents and SettingsAdministrator>sqlplus? sys/admin@orcl as sysdba;
SQL>archive log list;?????????????? --(查看数据库的归档模式)
如果是noarchivelog,进行下面步骤:
SQL>shutdown immediate;
SQL>startup mount;
SQL>alter database archivelog;
SQL>alter database open;
2、连接到RMAN
C:Documents and SettingsAdministrator>rman nocatalog target sys/admin@orcl;
3、对数据做一次全备
RMAN>backup database format 'e:\temp_%U';
4、关闭数据库,删除所有的数据文件,模拟数据库损坏文件丢失现象 RMAN>shutdown immediate; RMAN>startup mount; RMAN>restore database; RMAN>recover database; RMAN>alter database open; 5、RMAN基本设置 RMAN>configure dafault device type to?disk;(设置默认的备份设备为磁盘) RMAN>configure device type disk parallelism 2;(设置备份的并行级别,通道数 ) RMAN>configure channel 1 device type disk format 'e:\backup1\backup_%U';
?