1Z0-062 · Question #387
Examine these steps: CONNECT / AS SYSDBA CREATE DIRECTORY dumpdir AS '/u01/app/'; Directory created. GRANT READ, WRITE ON DIRECTORY dumpdir TO PUBLIC; Grant succeeded. CREATE USER TEST IDENTIFIED BY t
The correct answer is C. It performs the export successfully.. The expdp command will execute successfully because all necessary permissions, syntax, and parameter values are correctly configured for a data-only export using a synonym and a query filter.
Question
Examine these steps:
CONNECT / AS SYSDBA CREATE DIRECTORY dumpdir AS '/u01/app/'; Directory created. GRANT READ, WRITE ON DIRECTORY dumpdir TO PUBLIC; Grant succeeded. CREATE USER TEST IDENTIFIED BY test; User created. GRANT CREATE SESSION, RESOURCE, UNLIMITED TABLESPACE TO test; Grant succeeded. CONN test/test Connected. CREATE TABLE test_employees (id NUMBER(3), name VARCHAR2(20), salary NUMBER(7)); Table created. SQL> CREATE SYNONYM emp FOR test_employees; Synonym created. Now examine this command:
$ expdp test/test DIRECTORY=dumpdir DUMPFILE=test_emp.dmp LOGFILE=test.log TABLES=emp CONTENT=data_only query='EMP:"WHERE salary=12000"' What is true about the execution of this command?
Options
- AIt throws an error as the QUERY parameter is not supported on an empty table.
- BIt throws an error as the table test_employees is empty and CONTENT=data_only is specified.
- CIt performs the export successfully.
- DIt throws an error as Data Pump cannot find a table called TEST.EMP.
How the community answered
(23 responses)- A4% (1)
- B9% (2)
- C83% (19)
- D4% (1)
Why each option
The expdp command will execute successfully because all necessary permissions, syntax, and parameter values are correctly configured for a data-only export using a synonym and a query filter.
The Data Pump `QUERY` parameter is fully supported and does not cause an error even if the table is empty or if no rows match the specified condition.
Data Pump does not throw an error when exporting an empty table or a table with no matching data via `CONTENT=data_only`; it simply exports no data or an empty data segment.
The expdp command has correct user credentials, valid directory object with read/write privileges, and proper syntax for specifying tables via a private synonym and filtering data using the QUERY parameter, ensuring a successful export.
The private synonym `emp` created by user `test` correctly resolves to `test.test_employees` when `expdp` is run by user `test`, allowing Data Pump to find the table.
Concept tested: Oracle Data Pump export command syntax, parameters, and user privileges
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sutil/oracle-data-pump-export-utility.html
Topics
Community Discussion
No community discussion yet for this question.