7.9. Review Questions

  1. Which of the following conditions prevents you from being able to insert into a view?

    1. A TO_NUMBER function on one of the base table columns

    2. A CONNECT BY clause in the view definition

    3. A column of type RAW

    4. All of the above

  2. Changes made with an UPDATE statement are made permanent in the database after what occurs?

    1. DBWR flushes the changes to disk.

    2. You issue a SAVEPOINT statement.

    3. You issue a COMMIT statement.

    4. A checkpoint occurs.

  3. Which of the following is not a PL/SQL program?

    1. Library

    2. Trigger

    3. Function

    4. Procedure

  4. Why would you execute a CREATE OR REPLACE PROCEDURE statement instead of a DROP PROCEDURE and a CREATE PROCEDURE?

    1. It is less typing.

    2. There is no difference between the two.

    3. CREATE OR REPLACE PROCEDURE does not invalidate dependent objects.

    4. DROP PROCEDURE and CREATE PROCEDURE require regranting of privileges.

  5. Which of the following is not a trigger event?

    1. UPDATE

    2. SELECT

    3. NOAUDIT

    4. SERVERERROR

  6. Which of the following statements can be used to enable triggers?

    1. ALTER SYSTEM

    2. ALTER TABLE

    3. ALTER USER

    4. ALTER PACKAGE

  7. Which of the following is true?

    1. Directories are like roles or profiles; they are not owned by any individual user.

    2. Directories are like synonyms or database links; they can be public or private.

    3. Directories are like triggers and packages; they are owned by a schema.

    4. You can grant SELECT and UPDATE object privileges on directories.

  8. Which of the following keywords is used with a Data Pump import to copy data from one schema to another?

    1. fromuser and touser

    2. source_schema and target_schema

    3. rename_schema

    4. remap_schema

  9. The application development manager asks you to make sure the new Oracle10g database that her team will use has PL/SQL warning enabled and the optimizing compiler set to maximum optimization. What do you have to do to satisfy these requirements?

    1. Nothing. They are the default settings.

    2. The optimizing compiler is set to maximum by default, but you have to set the initialization parameter plsql_warnings to ENABLE:ALL.

    3. plsql_warnings is set to maximum by default, but you need to set plsql_optimize_mode =2 to increase it to maximum.

    4. You need to set both plsql_warnings and plsql_optimize_mode to nondefault settings.

  10. Which of the following is not a mode for Data Pump export?

    1. Database

    2. Tablespace

    3. Table

    4. Metadata

  11. To perform a Data Pump import from a live database, which parameter needs to be set?

    1. db_link

    2. network_link

    3. dumpfile

    4. directory

  12. You perform nightly metadata-only Data Pump exports of your development database. One morning, you get a frantic call from a developer who accidentally dropped a package he had been working on for the past week. Which Data Pump import parameter will you need to extract the package DDL from the dump file?

    1. show

    2. sqlfile

    3. reuse_datafiles

    4. tablespaces

  13. What will the following Data Pump import command do?

    impdp system/password network_link=sys_test
       schemas="GL" remap_schema="GL:GLI" content=both
       nologfile=y include=TABLE:"LIKE 'PROD%'"

    1. Copy the GL tables whose names start with PROD from the sys_test database, placing them into the GLI schema.

    2. Copy the GLI tables whose names start with PROD from the sys_test database, placing them into the GL schema.

    3. Load the data in file sys_test.dmp into the table GLI.products.

    4. Copy the metadata from user GL in sys_test into the local database.

  14. Your requirements call for loading a lot of data from a flat file dumped from the mainframe into the orders table at night while a few users in Singapore enter orders interactively. You are using SQL*Loader to load the data, but it takes longer than desired. What might you do to speed up the process?

    1. Switch to direct path mode.

    2. Increase the bind size.

    3. Write a Java program to parse and load the data.

    4. Write a C program to parse and load the data.

  15. Which type of PL/SQL program can be called in the select list of a SQL statement?

    1. Trigger

    2. Procedure

    3. Function

    4. None of the above

  16. You need to let an application role execute the SLEEP procedure in the DBMS_LOCK package, but do not want to let an application role have access to the other more powerful capabilities of the DBMS_LOCK package. How can you satisfy these requirements best?

    1. Grant EXECUTE on dbms_lock to user system. Then create a procedure in the system schema that calls DBMS_LOCK.SLEEP. Finally, grant EXECUTE on this procedure to the application role.

    2. Grant EXECUTE on DBMS_LOCK to the application role.

    3. Grant EXECUTE on DMBS_LOCK.SLEEP to the application role.

    4. Write your own procedure to mimic the functionality of the DBMS_LOCK.SLEEP procedure.

  17. Which of the following triggering events fire when statistics are gathered on a table?

    1. ANALYZE and DDL

    2. ASSOCIATE STATISTICS and ANALYZE

    3. GATHER STATISTICS and DDL

    4. ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS

  18. Which Data Pump export mode captures user definitions?

    1. Table mode

    2. Tablespace mode

    3. DBA mode

    4. Schema mode

  19. You need to copy the GL schema from production to qa_test, changing the tablespace for indexes from gl_index to fin_indx. What is the best way to satisfy these requirements?

    1. First, use Data Pump to copy the schema without indexes. Then, change the default tablespace for user GL in qa_test to fin_indx. Next, use Data Pump to copy the indexes. Finally, change the default tablespace for user GL back to gl_data.

    2. Use the dbms_metadata package to extract table and index DDL. Then, use Notepad (or sed) to edit this DDL, changing the tablespace for the indexes. Finally, run the DDL in the qa_test database.

    3. Use Data Pump import, specifying a remap_datafile parameter to change the datafile location for indexes.

    4. Use Data Pump import specifying a remap_tablespace parameter to change the tablespace location for indexes.

  20. Which of the following INSERT statements raises an exception?

    1. INSERT INTO ORDERS SELECT * FROM STANDING_ORDERS

    2. INSERT FIRST WHEN ORDER_TYPE IN (2,5,12) THEN INSERT INTO ORDERS SELECT * FROM STANDING_ORDERS

    3. INSERT FIRST WHEN ORDER_TYPE IN (2,5,12) THEN INTO ORDERS SELECT * FROM STANDING_ORDERS

    4. INSERT INTO ALL WHEN ORDER_TYPE IN (2,5,12) THEN INTO ORDERS SELECT * FROM STANDING_ORDERS

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset