7.10. Answers to Review Questions

  1. B. You cannot insert into a view that contains a CONNECT BY, ORDER BY, or GROUP BY clause.

  2. C. A commit makes pending DML changes permanent. When a checkpoint occurs, DBWR flushes dirty buffers to disk, which is independent of transaction boundaries.

  3. A. A library can be a database object, but is associated with an operating system shared library. PL/SQL programs include procedures, functions, packages, package bodies, and triggers.

  4. D. Using CREATE OR REPLACE PROCEDURE is less typing, but, more importantly, when you drop an object, all privileges granted on that object are dropped as well. When you perform a CREATE OR REPLACE, you do not lose privileges granted on that object.

  5. B. You can create a trigger for just about any database event that involves a change to data, but you cannot create a SELECT trigger in Oracle10g.

  6. B. You can enable triggers with either an ALTER TRIGGER ENABLE statement or with an ALTER TABLE ENABLE ALL TRIGGERS statement.

  7. A. The READ and WRITE object privileges are applicable to directory objects; SELECT and UPDATE are not. Directory objects are not owned by any individual schema, so they are like roles and profiles in this regard, not triggers and packages.

  8. D. The keywords fromuser and touser are from the older imp import program. Data Pump uses remap_schema (not rename_schema) to map a source to a target schema.

  9. B. The default settings are to disable plsql_warnings and enable maximum optimization (level 2).

  10. D. Data Pump export modes include database, tablespace, table, and schema. The keyword metadata is used in conjunction with the content parameter. To export only metadata, you specify content=metadata.

  11. B. The network_link parameter specifies a database link to the source database.

  12. B. To extract the package DDL, you need to specify a sqlfile= and an include parameter.

  13. A. The remap_schema parameter defines the source and target schemas, and the include parameter identifies which objects to include in the import job.

  14. B. Writing your own Java or C program to do the same thing as SQL*Loader would be a costly decision in terms of development effort. Getting your own program to outperform SQL*Loader would be difficult at best. Direct path loading would certainly speed up the load, but would lock the table exclusively, prohibiting your Singapore users from entering data interactively. Increasing the bind size would allow SQL*Loader to make fewer database calls, resulting in fewer network round-trip communications and potentially improving the performance. The key concept to grasp with this question is that direct path loads lock the table exclusively; therefore they should not be used on active tables.

  15. C. Functions can be called in several places, including in the SELECT, WHERE, ORDER BY, and GROUP BY clauses of SQL statements. Triggers are invoked when their trigger event fires. Procedures are invoked as stand-alone statements.

  16. A. You cannot grant privileges on only one packaged procedure. You can only grant EXECUTE on the whole package. To be more restrictive in granting privileges, you need to create an intermediate procedure that calls the single procedure you want and grant EXECUTE on that intermediate procedure to the grantee.

  17. A. The ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS events fire when an ASSOCIATE STATISTICS or DISASSOCIATE STATISTICS statement is executed, not when statistics are gathered. There is no GATHER STATISTICS triggering event. The triggering events that will fire when statistics are gathered on a table are the ANALYZE and DDL events.

  18. D. Table and tablespace modes do not capture user account definitions. Schema mode can, and database mode always captures user definitions. There is no DBA mode.

  19. D. Options A and B are a lot of work. The remap_datafile parameter applies only to CREATE TABLESPACE and CREATE DIRECTORY statements, not indexes. The remap_tablespace parameter tells Data Pump Import to change the tablespace that objects are stored in between the source and the target database.

  20. D. Single table inserts must begin with the keywords INSERT INTO and cannot contain the keywords THEN INTO. Multitable INSERT statements cannot begin with the keywords INSERT INTO and may contain the keywords THEN INTO. Option D contains an invalid combination of keywords and will thus raise an exception.

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

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