Oracle PL/SQL Fundamentals

Wednesday, December 31, 2008

With regard to performance, why do you combine SQL statements into PL/SQL blocks?
Choice 1 : More debugging information is available for SQL statements within PL/SQL.
Choice 2 : The query optimizer is run during compile time only.
Choice 3 : Authentication time is decreased.
Choice 4 : Network traffic is decreased.
Choice 5 : Storage requirements are decreased.

===============================================================

Scenario
You want to use the DBMS_LDAP functions and procedures, but when you try to use them, you receive an error that indicates that DBMS_LDAP cannot be found.
Given the scenario described above, how do you enable DBMS_LDAP?
Choice 1 : Turn off basic authentication.
Choice 2 : Set the LDAP server to authenticate using version 3 of the protocol.
Choice 3 : Add the shared object files for the LDAP implementation you are using.
Choice 4 : Load $ORACLE_HOME/rdbms/admin/catldap.sql.
Choice 5 : Import the LDAP binary drivers.

===============================================================

Which one of the following is a PL/SQL subprogram?
Choice 1 : UPDATE
Choice 2 : PROCEDURE
Choice 3 : ANONYMOUS BLOCK
Choice 4 : DBMS_SESSION
Choice 5 : PACKAGE
===============================================================

Scenario
You are using a cursor named employee_cur in a program. Your program occasionally displays ORA-06511: PL/SQL: cursor already open; you would like to eliminate that error.
Given the scenario described above, how do you eliminate the error in your program?
Choice 1 : Clear the cursor cache by issuing cursorsync prior to opening employee_cur.
Choice 2 : Delete all records from the v$open_cursor view.
Choice 3 : Open the cursor only if employee_cur%ISOPEN is false.
Choice 4 : Synchronize v$librarycache.
Choice 5 : Delete records with a Type of Cursor from the v$bh view.

===============================================================

Which one of the following implicit datatype conversions is supported in Oracle?
Choice 1 : NUMBER to ROWID
Choice 2 : DATE to VARCHAR2
Choice 3 : DATE to BLOB
Choice 4 : NUMBER to DATE
Choice 5 : ROWID to DATE

===============================================================

Scenario
You have a project that requires for SQL code to adhere to the ISO SQL standard. You need to perform explicit conversions between data types.
Given the scenario described above, which command do you use?
Choice 1 : TO_NUMBER
Choice 2 : CONVERT
Choice 3 : TO_CHAR
Choice 4 : TYPE
Choice 5 : CAST

===============================================================

Scenario
Your company is implementing several security imperatives. To comply with one of the imperatives; you need to limit the file system directories that are accessible via UTL_FILE.
Given the scenario described above, how do you allow only specific directories to be accessible?
Choice 1 : Define the value PL_ALLOWED_DIR with the allowed directories in V$SYSTEM
Choice 2 : Set the file system to be read-only.
Choice 3 : Set the file system with the NOSUID attribute.
Choice 4 : Set UTL_FILE_DIR='/allowed/directory' in INIT.ORA
Choice 5 : Use the command INSERT INTO V$FILES (UTIL_FILE) VALUES ('/allowed/directory');.

===============================================================

Scenario
You have a large database configured. You want to allow a portion of a transaction to be rolled back after a certain point in processing.
Given the scenario described above, which one of the following commands do you use to mark the spot for rollback?
Choice 1 : BOOKMARK
Choice 2 : SAVEPOINT
Choice 3 : COMMIT TO
Choice 4 : SET TRANSACTION
Choice 5 : ROLLBACK TO

===============================================================

Sample Code
TYPE relatives IS TABLE OF relatives%ROWTYPE
INDEX BY BINARY_INTEGER;

The sample code above is an example of which one of the following?

Choice 1 : A PL/SQL record
Choice 2 : A PL/SQL table type
Choice 3 : A PL/SQL table
Choice 4 : A PL/SQL table index
Choice 5 : A multi-row table variable

===============================================================

0 comments:

Post a Comment

Chitika

About This Blog

Followers

  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP