OCP-1Z0-053-V12.02-683题

AI权益加码!Claude Code、Cursor等20+工具免费用! 购周边限时加赠Coding Plan Lite,畅享主流AI工具!学习进阶更高效! 阅读详情

683. Your production database it f unctional on the SHOST1 host. Y ou are backing up the production

database by using Recovery Manager (RMAN) with the recovery catalog. You want to replicate the

production database to anther host , SHOST2, for testing new applications.

After you ensured that the backups of the target database are accessible on the new host, what must you

do to restore and recover the backup for the test environment?

A.Restoring the control file from the backup by using the NOCATAL OG option to restore, and recovering the data files

B.Restoring the data files by us ing the NOCATALOG option and us ing the SET NEWNAME command to change the location

C.Restoring the server parameter file from the backup by using the recovery catalog to restore, and recovering the data files

D.Restoring the data files from the backup by using the recovery catalog to recover the files, and using the SWITCH command to change the location.

Answer: D 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmadvre.htm#BRADV370

正确答案选A

你的生产库在SHOST1,你使用rman的恢复目录来备份生产库。你想复制生产库到另一台主机上SHOST2作为测试用

之后你确定在新的主机上你的目标数据库的备份能够被访问,什么是你必须要在测试环境还原和恢复的?


Start RMAN on hostb and connect to the target database without connecting to the recovery catalog. C错D错

If the file systems on the destination system are set up to have the same paths as the source host, then do not use SET NEWNAME for those files restored to the same path as on the source host. B错误


Testing the Restore of a Database on a New Host

This scenario assumes that you want to test whether you can restore your database to a new host. In this scenario, you have two networked Linux hosts,hosta and hostb. A target database named trgta is on hosta and is registered in recovery catalog catdb. You want to test the restore and recovery of trgta onhostb, while keeping database trgta up and running on hosta.

Now, assume that the directory structure of hostb is different from hosta. The target database is located in /net/hosta/dev3/oracle/dbs, but you want to restore the database to /net/hostb/oracle/oradata/test. You have tape backups of data files, control files, archived redo logs, and the server parameter file on a media manager accessible by both hosts. The ORACLE_SID for the trgta database is trgta and does not change for the restored database.

Caution:

If you are restoring the database for test purposes, then never connect RMAN to the test database and the recovery catalog.

To restore the database on a new host:

  1. Ensure that the backups of the target database are accessible on the new host.

    To test disaster recovery, you must have a recoverable backup of the target database. When preparing your disaster recovery strategy, ensure that the backups of the data files, control files, and server parameter file are restorable on hostb. Thus, you must configure the media management software so that hostb is a media manager client and can read the backup sets created on hosta. Consult the media management vendor for support on this issue.

  2. Configure the ORACLE_SID on hostb.

    This scenario assumes that you want to start the RMAN client on hostb and authenticate yourself through the operating system. However, you must be connected to hostb either locally or through a net service name.

    After logging in to hostb with administrator privileges, edit the /etc/group file so that you are included in the DBA group:

    dba:*:614:<your_user_name>

    Set the ORACLE_SID environment variable on hostb to the same value used on hosta:

    % setenv ORACLE_SID trgta
  3. Start RMAN on hostb and connect to the target database without connecting to the recovery catalog. C错

    For example, enter the following command:

    % rman NOCATALOG
    RMAN> CONNECT TARGET /
  4. Set the DBID and start the database instance without mounting the database.

    For example, run SET DBID to set the DBID, then run STARTUP NOMOUNT:

    SET DBID 1340752057;
    STARTUP NOMOUNT

    RMAN fails to find the server parameter file, which has not yet been restored, but starts the instance with a "dummy" file. Sample output follows:

    startup failed: ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/net/hostb/oracle/dbs/inittrgta.ora'
     
    trying to start the Oracle instance without parameter files ...
    Oracle instance started
  5. Restore and edit the server parameter file.

    Because you enabled the control file autobackup feature when making your backups, the server parameter file is included in the backup. If you are restoring an autobackup that has a nondefault format, then use the SET CONTROLFILE AUTOBACKUP FORMAT command to indicate the format.

    Allocate a channel to the media manager, then restore the server parameter file as a client-side parameter file and use the SET command to indicate the location of the autobackup (in this example, the autobackup is in /tmp):

    RUN
    {
      ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS '...';
      SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/%F';
      RESTORE SPFILE
        TO PFILE '?/oradata/test/inittrgta.ora'
        FROM AUTOBACKUP;
      SHUTDOWN ABORT;
    }
  6. Edit the restored initialization parameter file.

    Change any location-specific parameters, for example, those ending in _DEST, to reflect the new directory structure. For example, edit the following parameters:

      - IFILE
      - LOG_ARCHIVE_DEST_1
      - CONTROL_FILES
  7. Restart the instance with the edited initialization parameter file.

    For example, enter the following command:

    STARTUP FORCE NOMOUNT PFILE='?/oradata/test/inittrgta.ora';
  8. Restore the control file from an autobackup and then mount the database.

    For example, enter the following command:

    RUN
    {
      ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS '...';
      RESTORE CONTROLFILE FROM AUTOBACKUP;
      ALTER DATABASE MOUNT;
    }

    RMAN restores the control file to whatever locations you specified in the CONTROL_FILES initialization parameter.

  9. Catalog the data file copies that you copied in "Restoring Disk Backups to a New Host", using their new file names or CATALOG START WITH (if you know all the files are in directories with a common prefix easily addressed with a CATALOG START WITH command). For example, run:

    CATALOG START WITH '/oracle/oradata/trgt/';

    If you want to specify files individually, then you can execute a CATALOG command as follows:

    CATALOG DATAFILECOPY
      '/oracle/oradata/trgt/system01.dbf', '/oracle/oradata/trgt/undotbs01.dbf',
      '/oracle/oradata/trgt/cwmlite01.dbf', '/oracle/oradata/trgt/drsys01.dbf',
      '/oracle/oradata/trgt/example01.dbf', '/oracle/oradata/trgt/indx01.dbf',
      '/oracle/oradata/trgt/tools01.dbf', '/oracle/oradata/trgt/users01.dbf';
  10. Start a SQL*Plus session on the new database and query the database file names recorded in the control file.

    Because the control file is from the trgta database, the recorded file names use the original hosta file names. You can query V$ views to obtain this information. Run the following query in SQL*Plus:

    COLUMN NAME FORMAT a60
    SPOOL  LOG '/tmp/db_filenames.out'
    SELECT FILE# AS "File/Grp#", NAME
    FROM   V$DATAFILE
    UNION
    SELECT GROUP#,MEMBER
    FROM   V$LOGFILE;
    SPOOL OFF
    EXIT
  11. Write the RMAN restore and recovery script. The script must include the following steps:

    1. For each data file on the destination host that is restored to a different path than it had on the source host, use a SET NEWNAME command to specify the new path on the destination host. If the file systems on the destination system are set up to have the same paths as the source host, then do not use SET NEWNAME for those files restored to the same path as on the source host. B错误

    2. For each online redo log that is to be created at a different location than it had on the source host, use SQL ALTER DATABASE RENAME FILEcommands to specify the path name on the destination host. If the file systems on the destination system are set up to have the same paths as the source host, then do not use ALTER DATABASE RENAME FILE for those files restored to the same path as on the source host.

    3. Perform a SET UNTIL operation to limit recovery to the end of the archived redo logs. The recovery stops with an error if no SET UNTIL command is specified.

    4. Restore and recover the database.

    5. Run the SWITCH DATAFILE ALL command so that the control file recognizes the new path names as the official new names of the data files.

    Example 20-3 shows the RMAN script reco_test.rman that can perform the restore and recovery operation.

    Example 20-3 Restoring a Database on a New Host

    RUN
    {
      # allocate a channel to the tape device
      ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS '...';
     
      # rename the data files and online redo logs
      SET NEWNAME FOR DATAFILE 1 TO '?/oradata/test/system01.dbf';
      SET NEWNAME FOR DATAFILE 2 TO '?/oradata/test/undotbs01.dbf';
      SET NEWNAME FOR DATAFILE 3 TO '?/oradata/test/cwmlite01.dbf';
      SET NEWNAME FOR DATAFILE 4 TO '?/oradata/test/drsys01.dbf';
      SET NEWNAME FOR DATAFILE 5 TO '?/oradata/test/example01.dbf';
      SET NEWNAME FOR DATAFILE 6 TO '?/oradata/test/indx01.dbf';
      SET NEWNAME FOR DATAFILE 7 TO '?/oradata/test/tools01.dbf';
      SET NEWNAME FOR DATAFILE 8 TO '?/oradata/test/users01.dbf';
      SQL "ALTER DATABASE RENAME FILE ''/dev3/oracle/dbs/redo01.log''
          TO ''?/oradata/test/redo01.log'' ";
      SQL "ALTER DATABASE RENAME FILE ''/dev3/oracle/dbs/redo02.log''
          TO ''?/oradata/test/redo02.log'' ";
     
      # Do a SET UNTIL to prevent recovery of the online logs
      SET UNTIL SCN 123456;
      # restore the database and switch the data file names
      RESTORE DATABASE;
      SWITCH DATAFILE ALL;
     
      # recover the database
      RECOVER DATABASE;
    }
    EXIT
  12. Execute the script created in the previous step.

    For example, start RMAN to connect to the target database and run the @ command:

    % rman TARGET / NOCATALOG
    RMAN> @reco_test.rman
  13. Open the restored database with the RESETLOGS option.

    From the RMAN prompt, open the database with the RESETLOGS option:

    ALTER DATABASE OPEN RESETLOGS;

    Caution:

    When you re-open your database in the next step, do not connect to the recovery catalog. Otherwise, the new database incarnation created is registered automatically in the recovery catalog, and the file names of the production database are replaced by the new file names specified in the script.
  14. Optionally, delete the test database with all of its files.

    Note:

    If you used an ASM disk group, then the  DROP DATABASE command is the only way to safely remove the files of the test database. If you restored to non-ASM storage then you can also use operating system commands to remove the database.

    Use the DROP DATABASE command to delete all files associated with the database automatically. The following example deletes the database files:

    STARTUP FORCE NOMOUNT PFILE='?/oradata/test/inittrgta.ora';
    DROP DATABASE;

    Because you did not perform the restore and recovery operation when connected to the recovery catalog, the recovery catalog contains no records for any of the restored files or the procedures performed during the test. Likewise, the control file of the trgta database is completely unaffected by the test.



 

OCP12C库,63数据库管理( Administration Workshop- 63)(新增) 01 which three are true about transparent data encryption(TDE)? 关于透明数据加密(TDE),哪三个是正确的? 02 Rman is connected to the target database prod1 and an auxiliary instance in nomount state, examine the command to create a duplicate database: Rman连接到目标数据库prod1和一个处于n 阅读详情

相关推荐

109 You want to take a complete database backup using RMAN. The backup should consist only the used

109 You want to take a complete database backup using RMAN. The backup should consist only the used blocks from your database. Which two statements are true about this backup operation? (Choose two

EVISWANG的博客 1026

Oracle OCP 1z0-053 2018年9月最新考过的库分享-1

1.you configured the fast recovery area for one of your database but it is now running out of space. which two could make space available in the flash recover area? A.change the RMAN archived log dele...

技术=勤奋+思考 6813

OCP-1Z0-053-V12.02-32

32.In your production database, you: -Are using Recovery Manager (RMAN) with a recovery catalog to perform the backup operation at regular intervals Set the control file autobackup to "on" -Are mai

一抹曦阳-Oracle 1万+

OCP-1Z0-053-V13.02-664

664.You want to take a complete database backup using RMAN. The backup should consist only the used blocks from your database. Which two statements are true about this backup operation? (Choose two.

一抹曦阳-Oracle 7755

RMAN Backups

oracle 主要的备份工具 RMAN 其中,open database backup, 不需要把数据库设置成backup状态, RMAN reads a block until a consistent read is obtained. 看来备份比较重要的三种文件分别是, data file, control file, archivelog file.   Types of...

weixin_34179762的博客 255

RMAN备份

The traditional user-managed backup method consists simply of using the operating system commands to copy the relevant files to a different location and/or to a tape device. With RMAN, you back up the

juliaputao的专栏 1472

Mysql:命令选项、配置选项、(全局、会话)系统变量、状态变量:命令选项...

  Server Command Options When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.3, “Specifying Program Options”. The mo...

weixin_34319640的博客 355

ocp-v13-683

Your production database it functional on the SHOST1 host. You are backing up the production database by using Recovery Manager (RMAN) with the recovery catalog. You want to replicate the production

jiayue's BLOG 1978

OCP-1Z0-053-V12.02-604

604.You realize that the control file is damaged in your production database. After restoring the control file from autobackup, what is the next step that you must do to proceed with the database rec

一抹曦阳-Oracle 7284

OCP-1Z0-052-V8.02-44

44. Your database is functional with a peak load for the last one hour. You want to preserve the performance statistics collected during this period to be used for comparison when you analyze the pe

一抹曦阳-Oracle 1万+

OCP-1Z0-053-V12.02-670

670.After you have restored and recovered a database to a new host by using a previously performed Recovery Manager (RMAN) backup, which is the best option you would consider for the new database?

一抹曦阳-Oracle 5690

OCP-1Z0-053-V13.02-684

684. Your database is running in ARCHIVELOG mode. You have been taking backups of all the data files and control files regularly.   You are informed that some important tables in  the BILLING tablesp

一抹曦阳-Oracle 9042

OCP-1Z0-053-V13.02-627

627.In Recovery Manager (RMAN), you are taking image copies of the data files of your production database and rolling them forward at regular intervals. You attempt to restart your database. After a

一抹曦阳-Oracle 6864

OCP学习基本知识点总结

下面是我总结的OCP教程的知识点。以备參考之用。 1, What’s Oracle Server? · It’s a database management system that provides an open, comprehensive, integrated approach to information management. ·...

diandingyin9417的博客 1125

oracle11g OCP 认证 1Z0-053考试笔记7

602.On Friday at 11:30 am you decided to flash back the database because of a user error that occurred at 8:30 am. Which option must you use to check whether a flashback operation can recover the da

wlbzy的专栏 3710

星期一『1-50

Q.1 user_data is a nonencrypted tablespace containing tables with data.You must encrypt all data in this tablespace.Which three methods can do this?A. Use CREATE TABLE AS SELECTB. Use Data Pump.C. Use...

u012887743的博客 3942

OCP-1Z0-053-V12.02-658

658.Indentify two advantages of using recovery catalog instead of the control file of the database in Recovery Manager (RMAN). (Choose two.) A. You can use RMAN stored scripts B. Recovery is fa

一抹曦阳-Oracle 4310

第4章 数据库恢复 Database Recovery

第4章 数据库恢复 Database RecoveryRestore 和 Recovery sql>connect / as sysdbasql>startup mount rman>run{allo...

cqsg68568的博客 602
上一篇: OCP-1Z0-053-V12.02-594题
下一篇: OCP-1Z0-053-V12.02-257题
Riveore
博客等级 码龄19年 1801粉丝 1432原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值