430.Which of the following is a prerequisite for running DBMS_TDB.CHECK_DB to a successful completion?
A. The database must be in read-write mode.
B. The database must have no external files.
C. The database must open in read-only mode.
D. The database must be mounted but not opened.
Answer: C
答案解析:
参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_tdb.htm#ARPLS68864
CHECK_DB Function
This function checks whether a database can be transported to a target platform. It tests whether transport is supported at all for a given source and destination platform, and whether the database is currently in the correct state for transport.
You can specify whether to skip checking parts of the database that are read-only or offline, if you do not plan to transport them.
The function is overloaded. The different functionality of each form of syntax is presented along with the definition.
Table 151-3 CHECK_DB Function Parameters
Parameter | Description |
---|---|
|
The name of the destination platform, as it appears in |
|
Specifies which, if any, parts of the database to skip when checking whether the database can be transported. Supported values are listed in Table 151-1, "DBMS_TDB Constants". |
If the database cannot be transported to the target platform or is not ready to be transported, returns FALSE
. If the database is ready for transport, returnsTRUE
.
-
If
SERVEROUTPUT
isON
, then the output will contain the reasons why the database cannot be transported and how to fix the problems. For details on possible reasons and fixes, see Table 151-4, "Reasons for CHECK_DB Function to Return FALSE".Table 151-4 Reasons for CHECK_DB Function to Return FALSE
Cause Action Unrecognized target platform name.
Check
V$DB_TRANSPORTABLE_PLATFORM
for recognized platform names.Target platform has a different endian format.
Conversion is not supported.
Database is not open read-only.
Open database read-only and retry.
There are active or in-doubt transactions in the database.
Open the database read-write. After the active transactions are rolled back, open the database read-only and retry the operation.
This situation can occur if users flash back the database and open it read only. The active transactions will be rolled back when the database is opened read-write.
Deferred transaction rollback needs to be done.
Open the database read-write and bring online the necessary tablespaces. Once the deferred transaction rollback is complete, open the database read-only and retry the operation.
Database compatibility version is below 10.0.0.
Change the
COMPATIBLE
initialization parameter to 10.0.0 or higher, open the database read-only, and retry the operation.Some tablespaces have not been open read-write with compatibility version is 10.0.0 or higher.
Change the
COMPATIBLE
initialization parameter to 10.0.0 or higher, then open the affected tablespaces read-write. Shut down the database, open it read-only, and retry the operation.
This example illustrates the use of CHECK_DB
with a database that is open read-write: