OCP-1Z0-053-V13.02-130题

130.Which are the prerequisites for performing flashback transactions on your database? (Choose all that apply.)

A. Undo retention guarantee for the database must be configured.

B. Supplemental log must be enabled for the primary key.

C. Supplemental log must be enabled.

D. Execute permission on the DBMS_FLASHBACK package must be granted to the user.

Answer: BCD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS1010


Configuring Your Database for Flashback Transaction

To configure your database for the Flashback Transaction feature, you or your database administrator must:

  • With the database mounted but not open, enable ARCHIVELOG:

    ALTER DATABASE ARCHIVELOG;
  • Open at least one archive log:

    ALTER SYSTEM ARCHIVE LOG CURRENT;
  • If not done, enable minimal and primary key supplemental logging:

    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
  • If you want to track foreign key dependencies, enable foreign key supplemental logging:

    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;

Note:

If you have very many foreign key constraints, enabling foreign key supplemental logging might not be worth the performance penalty.

  Flashback Transaction

Use Flashback Transaction to roll back a transaction and its dependent transactions while the database remains online. This recovery operation uses undo data to create and run the corresponding compensating transactions that return the affected data to its original state. (Flashback Transaction is part ofDBMS_FLASHBACK package.) 

For DBMS_FLASHBACK Package

To allow access to the features in the DBMS_FLASHBACK package, grant the EXECUTE privilege on DBMS_FLASHBACK.

 

Using Flashback Transaction

The DBMS_FLASHBACK.TRANSACTION_BACKOUT procedure rolls back a transaction and its dependent transactions while the database remains online. This recovery operation uses undo data to create and run the compensating transactions that return the affected data to its original state.

The transactions being rolled back are subject to these restrictions:

  • They cannot have performed DDL operations that changed the logical structure of database tables.

  • They cannot use Large Object (LOB) Data Types:

    • BFILE

    • BLOB

    • CLOB

    • NCLOB

  • They cannot use features that LogMiner does not support.

    The features that LogMiner supports depends on the value of the COMPATIBLE initialization parameter for the database that is rolling back the transaction. The default value is the release number of the most recent major release.

    Flashback Transaction inherits SQL data type support from LogMiner. Therefore, if LogMiner fails due to an unsupported SQL data type in a the transaction, Flashback Transaction fails too.

    Some data types, though supported by LogMiner, do not generate undo information as part of operations that modify columns of such types. Therefore, Flashback Transaction does not support tables containing these data types. These include tables with BLOB, CLOB and XML type.


     

你可能感兴趣的:(OCP-1Z0-053-V13.02-130题)