053试题 21 / 198 /200 / 289/355/363/650/700 - duplicate database

题目:

21.You are managing an Oracle Database 11g instance. You want to create a duplicate database for testing purpose.
What are the prerequisites for performing the active database duplication? (Choose all that apply.)
A. The source database backup must be copied over the net for test database.
B. The source database must be run in ARCHIVELOG mode if the database is open.
C. The source database must be shut down cleanly if the database is in mounted state.
D. A net service name should be set up and a listener configured with the target as well as the source database.

参考答案 BCD

解析
题目意思问,想通过一个active database,duplicate出来一个数据库。问先决条件?
在使用active database duplication的时候,rman通过网络copy live source database到辅助数据库。所以并不是必须要使用backup。所以A错误。
源数据库必须处于归档模式,所以B正确
当源库处于mount状态的时候,源库必须是cleanly关闭的。所以C正确。
duplicate的时候,需要连接到源库,连接到源库就需要监听器。所以D正确。

 

参考文档:

https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV89929

Active Database Duplication

In active database duplication, RMAN connects as TARGET to the source database instance and as AUXILIARY to the auxiliary instance. RMAN copies the live source database over the network to the auxiliary instance, thereby creating the duplicate database. No backups of the source database are required. Figure 24-2 illustrates active database duplication.

Figure 24-2 Active Database Duplication

Description of Figure 24-2 follows
Description of "Figure 24-2 Active Database Duplication"

 

How RMAN Duplicates a Database

For backup-based duplication, the principal work of the duplication is performed by the auxiliary channels. These channels correspond to a server session on the auxiliary instance on the destination host. For active database duplication the primary work is performed by target channels.

RMAN must perform database point-in-time recovery, even when no explicit point in time is provided for duplication. Point-in-time recovery is required because the online redo log files in the source database are not backed up and cannot be applied to the duplicate database. The farthest point of recovery of the duplicate database is the most recent redo log file archived by the source database.

As part of the duplicating operation, RMAN automates the following steps:

  1. Creates a default server parameter file for the auxiliary instance if the following conditions are true:

    • Duplication does not involve a standby database.

    • Server parameter files are not being duplicated.

    • The auxiliary instance was not started with a server parameter file.

  2. Restores from backup or copies from active database the latest control file that satisfies the UNTIL clause requirements.

  3. Mounts the restored or copied backup control file from the active database.

    Note:

    If the control file in the source database contains disabled threads, then these threads will also be disabled in the duplicate database.
  4. Uses the RMAN repository to select the backups for restoring the data files to the auxiliary instance. This step applies to backup-based duplication.

  5. Restores and copies the duplicate data files and recovers them with incremental backups and archived redo log files to a noncurrent point in time.

  6. Shuts down and restarts the database instance in NOMOUNT mode.

  7. Creates a new control file, which then creates and stores the new DBID in the data files.

  8. Opens the duplicate database with the RESETLOGS option and creates the online redo log for the new database.

See Also:

The DUPLICATE entry in Oracle Database Backup and Recovery Reference for a complete list of which files are copied to the duplicate database

END

-- 2019-08-24 add

题目:

198.What are the two different types of database duplication? (Choose two.)
A. Active
B. Passive
C. Online
D. Backup-based
E. Failure driven
 
参考答案 AD
题目意思是,dupliate database的两种类型。
可以在线active duplicate。比如创建备库,duplicate targer database for standby do recover nofilenamecheck .
也可以基于备份进行duplicate。

参考文档:

https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV89929

Techniques for Duplicating a Database

RMAN supports two basic types of duplication: active database duplication and backup-based duplication. RMAN can perform backup-based duplication with or without either of the following connections:

  • Target

  • Recovery catalog

A connection to both is required for active database duplication.

Figure 24-1 shows the decision tree for the two duplication techniques.

Figure 24-1 Duplication Techniques

Description of Figure 24-1 follows
Description of "Figure 24-1 Duplication Techniques"
 

Active Database Duplication

In active database duplication, RMAN connects as TARGET to the source database instance and as AUXILIARY to the auxiliary instance. RMAN copies the live source database over the network to the auxiliary instance, thereby creating the duplicate database. No backups of the source database are required. Figure 24-2 illustrates active database duplication.

Figure 24-2 Active Database Duplication

Description of Figure 24-2 follows
Description of "Figure 24-2 Active Database Duplication"
 

Backup-Based Duplication

In backup-based duplication, RMAN creates the duplicate database by using pre-existing RMAN backups and copies. This technique of duplication uses one of the following mutually exclusive subtechniques:

  • Duplication without a target database connection, RMAN obtains metadata about backups from a recovery catalog.

  • Duplication without a target database connection and without a recovery catalog. RMAN obtains metadata about where backups and copies reside from BACKUP LOCATION.

  • Duplication with a target database connection. RMAN obtains metadata about backups from the target database control file or from the recovery catalog.

Figure 24-3 illustrates backup-based duplication without a target connection. RMAN connects to a recovery catalog database instance and the auxiliary instance. The destination host must have access to the RMAN backups required to create the duplicate database.

Figure 24-3 Backup-Based Duplication Without a Target Connection

Description of Figure 24-3 follows
Description of "Figure 24-3 Backup-Based Duplication Without a Target Connection"
 

Figure 24-4 illustrates backup-based duplication without connections to the target or to the recovery catalog database instance. RMAN connects to the auxiliary instance of the duplicate database on the destination host. A disk backup location containing all the backups or copies for duplication must be available to the destination host.

Figure 24-4 Backup-Based Duplication Without a Target Connection or Recovery Catalog Connection

Description of Figure 24-4 follows
Description of "Figure 24-4 Backup-Based Duplication Without a Target Connection or Recovery Catalog Connection"
 

Figure 24-5 illustrates backup-based duplication with a target connection. RMAN connects to the source database instance and the auxiliary instance. Optionally, RMAN can connect to a recovery catalog database (not shown in the figure). The destination host must have access to the RMAN backups required to create the duplicate database.

Figure 24-5 Backup-Based Duplication with a Target Connection

Description of Figure 24-5 follows

END

--2019-08-26 add

题目:

200.Which operation requires that you create an auxiliary instance manually before executing the
operation? (Choose all that apply.)
A. Backup-based database duplication.
B. Active database duplication.
C. Tablespace point-in-time recovery.
D. No operation requires the creation of an auxiliary instance.
 
参考答案 AB 
解析
题目意思是,那些操作需要手工创建辅助instance?基于备份的和基于active 的duplicate。
表空间的point-in-time recovery 是自动创建isntance的。选择AB 。


参考文档:参考21,198的文档。

END

-- 2019-08-30 add

题目:

289.You are managing the APPPROD database as a DBA which is not using the Oracle-managed files.
You plan to duplicate this database in the same system with the name DUPDB.You want to create the
same directory structure for duplicate database files as of the target database.
You executed the following RMAN commands:
RMAN> CONNECT TARGET sys/sys@APPPROD
RMAN> CONNECT AUXILIARY sys/sys@DUPDB
RMAN> DUPLICATE TARGET DATABASE
TO dupdb
FROM ACTIVE DATABASE
PASSWORD FILE
SPILE
NOFILENAMECHECK;
What are the implications of this command?
A. It creates database files for the duplicate database under the Oracle base with a different directory for the duplicate database.
B. It overwrites data files of the target database because a different location for data files is not mentioned for the duplicate database.
C. It creates database files for the duplicate database under the same Oracle home as that of the target database with the same directory structure.
D. It creates database files for the duplicate database under the same Oracle home as that of the target but with a different directory for the duplicate database.

参考答案 B
解析
题目意思是,apprpod数据库没有使用OMF。计划在duplicate在相同的主机上,数据库名是dupdb,希望使用相同的文件结构。
会覆盖数据文件,因为并没有提到不同的文件位置。  选择 B 。

参考文档:

https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupad.htm#BRADV443

Specifying Non-OMF or Non-ASM Alternative Names for Duplicate Database Files

https://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90163

NOFILENAMECHECKPrevents RMAN from checking whether the data files and online redo logs files of the source database are in use when the source database files share the same names as the duplicate database files. You are responsible for determining that the duplicate operation does not overwrite useful data.

This option is necessary when you are creating a duplicate database in a different host that has the same disk configuration, directory structure, and file names as the host of the source database. For example, assume that you have a small database located in the /dbs directory of srchost:

/oracle/dbs/system_prod1.dbf
/oracle/dbs/users_prod1.dbf
/oracle/dbs/rbs_prod1.dbf

Assume that you want to duplicate this database to desthost, which has the same file system /oracle/dbs/*, and you want to use the same file names in the duplicate database as in the source database. In this case, specify the NOFILENAMECHECK option to avoid an error message. Because RMAN is not aware of the different hosts, RMAN cannot determine automatically that it should not check the file names.

If duplicating a database on the same host as the source database, then ensure that NOFILENAMECHECK is not set. Otherwise, RMAN can potentially overwrite and corrupt the target database data files, temp files, or online logs. It may also signal the following error:

RMAN-10035: exception raised in RPC: ORA-19504: failed to create 
            file "/oracle/dbs/tbs_01.f" 
ORA-27086: skgfglk: unable to lock file - already in use 
SVR4 Error: 11: Resource temporarily unavailable 
Additional information: 8 
RMAN-10031: ORA-19624 occurred during call to 
DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE

END

--2019-09-03add

题目:

355.When youre performing active database duplication, a backup of what kind is required?
A. A current RMAN backup-set backup is required.
B. No backup is required.
C. An RMAN image backup is required.
D. A manual backup is required.
E. A "duplicate" preparatory backup is required.
 
参考答案 B
解析
当执行active database duplicate的时候,那种backup 是需要的。
active database duplicate的时候,是不需要备份的。选择B 。


参考文档,参考上面的文档。

END

--2019-09-03 add

题目:

363.True or false: you can perform an active database duplication when the database is in NOARCHIVELOG mode.
A. True
B. False
 
参考答案 B
解析
duplicate active database的时候,不可以在非归档模式下。选择B 。


end

-- 2019-09-11 add

题目:

650.Which three tasks can be performed using a duplicate database? (Choose three.)
A. Testing the backup and recovery procedures
B. Testing the upgrade of an Oracle database to a new release
C. Testing the effect of an application changes on database performance
D. Continuously updating archive log files from the target database to support failover
 
参考答案 ABC
解析
那三个任务是duplicate数据库的目的。


参考文档

Purpose of Database Duplication

A duplicate database is useful for a variety of purposes, most of which involve testing. You can perform the following tasks in a duplicate database:

  • Test backup and recovery procedures

  • Test an upgrade to a new release of Oracle Database

  • Test the effect of applications on database performance

  • Create a standby database

  • Generate reports

For example, you can duplicate the production database on host1 to host2, and then use the duplicate database on host2 to practice restoring and recovering this database while the production database on host1 operates as usual.

If you copy a database with operating system utilities instead of the DUPLICATE command, then the DBID of the copied database remains the same as the original database. To register the copy database in the same recovery catalog with the original, you must change the DBID with the DBNEWID utility (see Oracle Database Utilities). In contrast, the DUPLICATE command automatically assigns the duplicate database a different DBID so that it can be registered in the same recovery catalog as the source database.

The DUPLICATE command can create a fully functional copy of your database or a physical standby database, which serves a very different purpose. A standby database is a copy of the primary database that you update continually with archived log files from the primary database. If the primary database is inaccessible, then you can fail over to the standby database, which becomes the new primary database. A database copy, however, cannot be used in this way: it is not intended for failover scenarios and does not support the various standby recovery and failover options.

END

-- 2019-09-12 add

题目:

700. Which two statements are true about a duplicate database that is created by using the DUPLICATE command in RMAN? (Choose two.)
A.It is a copy or a subset of the target database.
B.It is opened in RESTRICT mode after a duplicating operation.
C.It is created by using backups and archived redo log files from the target database.
D.It is created with the same database identifier (DBID) as that of target database.
 
参考答案 CD (有误,应为AC)
选项B,open resetlog。错误。
选项D。当使用duplicate命令创建dg的时候,dbid是一样的。非db,dbid不一样。


参考文档:

For example, you can duplicate the production database on host1 to host2, and then use the duplicate database on host2 to practice restoring and recovering this database while the production database on host1 operates as usual.

If you copy a database with operating system utilities instead of the DUPLICATE command, then the DBID of the copied database remains the same as the original database. To register the copy database in the same recovery catalog with the original, you must change the DBID with the DBNEWID utility (see Oracle Database Utilities). In contrast, the DUPLICATE command automatically assigns the duplicate database a different DBID so that it can be registered in the same recovery catalog as the source database.

END

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值