1Z0-062 · Question #365
You ran this command on a source database: $> expdp hr/hr DIRECTORY=dumpdir DUMPFILE=emp1.dmp VIEWS_AS_TABLES=emp_dept On the target database, you run this command: $> impdp hr/hr DIRECTORY=dumpdir…
The correct answer is D. The impdp operation creates EMP_DEPT as a table E. The expdp operation exports the table definitions for tables that are queried in the EMP_DEPT. The VIEWS-AS-TABLES option in Data Pump causes expdp to export the data and table-like definition of a specified view, and impdp to create a new table from this exported data and definition.
Question
You ran this command on a source database:
$> expdp hr/hr DIRECTORY=dumpdir DUMPFILE=emp1.dmp VIEWS_AS_TABLES=emp_dept On the target database, you run this command:
$> impdp hr/hr DIRECTORY=dumpdir DUMPFILE=emp1.dmp VIEWS_AS_TABLES=emp_dept Which two statements are true? (Choose two.)
Options
- AThe expdp operation exports all rows for tables contained in the defining query of the EMP_DEPT
- BThe impdp operation creates separate tables for each table contained in the defining query of the
- CThe expdp operation exports all rows that are displayed when querying the EMP_DEPT view with
- DThe impdp operation creates EMP_DEPT as a table
- EThe expdp operation exports the table definitions for tables that are queried in the EMP_DEPT
- FThe impdp operation creates EMP_DEPT as a view
How the community answered
(42 responses)- A2% (1)
- B7% (3)
- C2% (1)
- D71% (30)
- F17% (7)
Why each option
The VIEWS-AS-TABLES option in Data Pump causes expdp to export the data and table-like definition of a specified view, and impdp to create a new table from this exported data and definition.
The expdp operation with VIEWS_AS_TABLES exports the rows of the view itself, not the rows of the underlying tables that constitute the view.
The impdp operation with VIEWS_AS_TABLES creates a single table named after the view (EMP_DEPT), not separate tables for each underlying component of the view's query.
While the expdp operation does export the rows displayed by querying the view, the chosen correct answers imply that exporting the table definition (metadata) for the view-as-table (E) is considered one of the two true statements.
The VIEWS_AS_TABLES option on the impdp command causes the imported data, which originated from the EMP_DEPT view on the source, to be created as a new physical table named EMP_DEPT on the target database.
When VIEWS_AS_TABLES=emp_dept is used with expdp, Data Pump exports the metadata (column names, data types, etc.) that define the structure of the EMP_DEPT view's result set, treating it as a table definition for the export.
The impdp operation with VIEWS_AS_TABLES creates a physical table from the view's data, not a view.
Concept tested: Data Pump VIEWS-AS-TABLES option
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sutil/oracle-data-pump-utility.html#GUID-E1E78873-1D7F-4B82-B264-5B261EC73D68__CHDBIEGB
Topics
Community Discussion
No community discussion yet for this question.