Bo's Oracle Station

查看: 3008|回复: 0

模拟考试Section3小结

[复制链接]

75

主题

115

帖子

2688

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2688
发表于 2014-7-14 16:53:12 | 显示全部楼层 |阅读模式
第一组: IP:192.168.0.3/4/53   恢复成功
第二组: IP: 192.168.0.5/6/55 恢复成功
第三组: IP:192.168.0.7/8/57 恢复成功
第四组: IP:192.168.0.9/10/59  数据库没open
第五组: IP:192.168.0.11/12/61  数据库没open


考试时可能是Section 2 之后评分完就破坏。也有可能象我们这样中途坏。
经过考试应该明白:冷备份是合法作弊之居家必备良器了吧。  在Section2后要对EMREP和PROD做冷备份。但是要保证Section2最后这两个数据库是启动的。。。。
好好掌握时间。。。。


1.Create an RMAN Catalog
1.1 Create a tablespace in your EMREP database called RC_DATA
1.1.1 Make it locally managed
1.1.2 Create it with one datafile of size 100MB
Sqlplus sys/oracle@emrep as sysdba
SQL>create tablespace RC_DATA
         Datafile ‘/home/oracle/oradata/PROD/rc_data01.dbf’ size 100M
        Autoextend on next 10M
        Extent management local
        Segment space management auto;

1.2. Create a user named RC_ADMIN with password RC_ADMIN in your EMREP
1.2.1 The user must have a default tablespace of RAC_DATA
1.2.2 Give the user the ability to manage a Recovery Catalog
Sqlplus sys/oracle@emrep as sysdba
SQL>create user RC_ADMIN identified by RC_ADMIN
default tablespace RC_ADMIN;

SQL>grant connect,resource,recovery_catalog_owner to RC_ADMIN;
1.3. Create a Recovery Catalog
1.3.1 Create the catalog in the EMREP database conned by RC_ADMIN
Rman catalog RC_ADMIN/RC_ADMIN@emrep
RMAN>create catalog tablespace RC_DATA;

1.3.2 Register the PROD database with the catalog
Rman target sys/oracle@prod catalog RC_ADMIN/RC_ADMIN@emrep
RMAN>register database;
RMAN> resync catalog;
2.Using RMAN
2.1. Configure RMAN options for the PROD database
2.1.1 Turn backup optimization on
RMAN>CONFIGURE BACKUP OPTIMIZATION ON;
2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory)
RMAN>CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT
’/home/oracle/bakup/%d_%T_%U.bak’;
2.1.3 Turn on controlfile autobackup to write to /home/oracle/backup/control (you may have to create this directory)
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN>CONFIGURE CONTROLFILE AUTOBACKUP FORMAT
FOR DEVICE TYPE DISK TO '/home/oracle/backup/control/%F'

2.1.4 Configure a reteation window of 7 days
RMAN>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
2.2. Perform a backup
2.2.1 Perform a backup using your default channel,with compreesion
2.2.2 Include all datafiles in the backup
2.2.3 Include your current control file and spfile
2.2.4 Include all archive logs.then remove the originals
    RMAN>backup as compressed bakupset database include current controlfile plus archivelog delete all input;
3. Flashback Database
3.1. Turn on Flashback Database
3.1.1 Configure a flash recovery area of 4GB
3.1.2 Put your flash recovery area in /home/oracle/flash (you may have to create this directory)
SQL>alter system set db_recovery_file_dest_size=4G scope=both;  
SQL>alter system set db_recovery_file_dest='/home/oracle/flash' scope=both;
SQL>shutdown immediate;
SQL>startup mount;
SQL>alter database flashback on;
(SQL>alter database archivelog;)
3.2. your database open for review
SQL>alter database open;



End state:
Youre databases must be open for access by the proctor
sysdba role.You can check This as follows:
1. Log on to the PROD dataabse using: sys/oracle@prod as sysdba
2. Query the DUAL table.
3. Log on to the Grid Control repository database using: sys/oracle@emrep as sysdba
4. Query the DUAL table.

Note:Credit will only be given for the skill set if all databases are open for access.



最后提醒各位,可能只是删除一个控制文件(好运气)
有可能删除归档日志,
rman    configure命令要熟悉。懂得分配通道。

把上课实验练熟!!!!


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-29 04:46 , Processed in 0.038420 second(s), 28 queries .

快速回复 返回顶部 返回列表