94961270 Semester 2 Final Exam PL SQL 2

March 18, 2018 | Author: agulfam5542 | Category: Pl/Sql, Subroutine, Sql, Compiler, Parameter (Computer Programming)


Comments



Description

Test: Semester 2 Final Exam1. Native compilation always runs faster; therefore SQL statements in PL/SQ L will always run faster, also. True or False? Mark for Review (1) Points True False (*) Correct Correct 2. VEL. (Choose three) (1) Points Identify examples of benefits of using PLSQL_OPTIMIZE_LE Mark for Review (Choose all correct answers) Modify source code to optimize frequently-used elements at the top. Control what PL/SQL does with useless code. (*) Backward compatible with previous versions of the Oracle database. (*) Separating compiled code so that separate units may be repeated as neede d. Copy compiled code from one subprogram into another subprogram. (*) Correct Correct 3. Native machine code PL/SQL will always execute faster th an bytecode PL/SQL because it need not be interpreted at run time. True or False ? Mark for Review (1) Points True (*) False Correct Correct -. Activate debugging or tracing statements in the development environment (*) Correct Correct 5. ... Mark for Review (Choose two) (1) Points (Choose all correct answers) Use new features with the latest database release and disable them with older database versions (*) Speed up the compilation time of a lengthy PL/SQL subprogram. ALTER SESSION SET PLSQL_CCFLAGS = 'debug:false'. $END (*) $ELSIF $END.. $IF $$debug $THEN DBMS_OUTPUT. Identify some benefits of using conditional compilation. what statement belongs in Line A? ALTER SESSION SET PLSQL_CCFLAGS = 'debug:true'.PUT_LINE('This code was executed'). Determine initialization values during start up of a database session.4. CREATE OR REPLACE PROCEDURE testproc IS BEGIN . END testproc. In the following example. Mark for Review (1) Points $ENDIF $$END..Line A . True or False? Mark for Review (1) Points True (*) False Correct Correct 7. When wrapping subprograms. Source code is hidden from all users. Source code is visible to the owner. Which is NOT a benefit of obfuscation? Mark for Review (1) Points Source code is not loaded in the data dictionary. the entire PL/SQL code must b e included as an IN argument with data type CLOB to allow for any size program. Obfuscation does not allow anyone to see the source code . (*) Protection for intellectual property is provided. including the owner. To include selections of code for compilation based on u ser-defined values. True or False? Mark for Review (1) Points True (*) False Correct Correct 8.Correct Correct 6. True or False? Mark for Review (1) Points . Correct Correct 9. use the PLSQL_CCFLAGS parameters. Disables all warning categories.'SESSION').'SESSION'). (*) Correct Correct 11. leaving other category setting s unchanged.ADD_WARNING_SETTING_CAT('PERFORMANCE'.'ENABLE'. In the USER_ERRORS data dictionary view. then enables the PERFORMANCE category. leaving other category setting s unchanged. the command terminates abnormally. The two statements below are equivalent. Add the PERFORMANCE warning category into a PL/SQL variable. Enables the PERFORMANCE warning category. if an error is prefixed with "W arning." the command completes but has a side effect the user needs to know abou t. For all other errors. Enables the PERFORMANCE warning category. setting other category setting s to disabled. for the current session. . What does the following statement do? DBMS_WARNING.True False (*) Correct Correct 10. True or False? DBMS_WARNING. Mark for Review (1) Points Enables the PERFORMANCE warning category.SET_WARNING_SETTING_STRING ('ENABLE:SEVERE'. True or False? Mark for Review (1) Points True (*) False Correct Correct 12. which is dependent on Procedure B. True or False? Mark for Review (1) Points True False (*) Correct Correct . will execute successfully at 11 AM. the following status is given for each procedure: Procedure A is local and has a time stamp of 10 AM Procedure B is remote and has a local and remote time stamp of 10:30 AM In Timestamp Mode.and ALTER SESSION SET PLSQL_WARNINGS = 'ENABLE:SEVERE'. If two related objects are in different databases. In this scenario. True or False? Mark for Review (1) Points True (*) False Correct Correct 14. Mark for Review (1) Points True False (*) Correct Correct Section 14 (Answer all questions in this section) 13. the d ependency between them is automatically recorded on the dependent object's data dictionary. Procedure A. Examine the following code: CREATE VIEW ed_view AS SELECT * FROM employees NATURAL JOIN departments. Procedure B has its local variable emp_number changed to emp_name. True or False? Mark for Review (1) Points True (*) False Incorrect Incorrect. True or False? Mark for Review (1) Points True False (*) Correct Correct 17. will fail. Procedure B has a new IN OUT parameter added to it. which is dependent on remote Procedure B. Procedure A. In Signature mode. It is comp iled successfully. It c ompiles successfully. The data type of emp_id is changed from number to integer. True or False? Mark for Review (1) Points True (*) False Correct Correct 16. Procedure A. CREATE PROCEDURE ed_proc IS CURSOR ed_curs IS SELECT * FROM ed_view. Refer to Section 14 Lesson 2. . which is dependent on remo te Procedure B. A change in a remote referenced subprogram is automatica lly recorded as invalid if its base object changes and that new status is relaye d to the dependent object's status and automatically marked as invalid. 18. In Signature Mode.15. will compile and execute successfully. 'BOB'. BEGIN ideptree('TABLE'. Correct Correct .Which of the following statements about dependencies are true? (Choose two. END. END.) Mark for Review (1) Points (Choose all correct answers) ED_PROC is indirectly dependent on DEPARTMENTS (*) EMPLOYEES is referenced by ED_VIEW (*) ED_CURS is directly dependent on ED_VIEW ED_PROC is referenced by ED_VIEW ED_PROC is directly dependent on EMPLOYEES Correct Correct 19.'BOB'.'DEPARTMENTS'). END. Which of the following must he execute to populate the DEPTREE_TEM PTAB table? Mark for Review (1) Points BEGIN utldtree('DEPARTMENTS').'DEPARTMENTS'). User BOB wants to know which objects reference his DEPAR TMENTS table.'DEPARTMENTS'). END. (*) BEGIN deptree_fill('TABLE'. BEGIN deptree_fill('TABLE'. True or False? Mark for Review (1) Points True (*) False Correct Correct 22. When will the ORACLE server try to recompile FETCH_EMP automatically? Mark for Review (1) Points When the command ALTER FUNCTION fetch_emp COMPILE. Function FETCH_EMP references the EMPLOYEES table. Mark for Review The DEPTREE view The DEPTREE_FILL procedure The USER_DEPENDENCIES view (*) The DEPTREE_TEMPTAB table Correct Correct 21.20. sql script is run? (1) Points Which of the following is NOT created when the utldtree. The t able is modified by: ALTER TABLE employees ADD (resume CLOB). A single procedure can be both a referenced object and a dependent objec t. is executed The next time a user session invokes FETCH_EMP (*) When the RESUME column is dropped from the EMPLOYEES table When FETCH_EMP is dropped and recreated Correct Correct . Examine the following code: CREATE FUNCTION deptfunc RETURN NUMBER IS v_count NUMBER(6). BEGIN SELECT COUNT(*) INTO v_count FROM departments. type. SELECT name. referenced_name.23. whi ch contains a reference to the EMPLOYEES table. Package EMPPACK contains a public procedure GET_EMP. Procedure CALL_EMP invokes EMPPA CK.'DEPTFUNC') AND referenced = 'YES'. object_type FROM user_objects WHERE object_name IN ('DEPARTMENTS'. referenced_type FROM user_dependencies WHERE referenced_name = 'DEPARTMENTS' AND referenced_type = 'TABLE'. type FROM user_dependencies WHERE name IN ('DEPTFUNC'. The following SQL statement is executed: ALTER TABLE employees ADD (gender CHAR(1)). END. (*) SELECT name. Correct Correct 24. Which one of the following statements is true? Mark for Review (1) Points . type.GET_EMP.'DEPARTMENTS'). SELECT object_name. Which of the following will display the dependency between DEPTFUNC and DEPARTME NTS? Mark for Review (1) Points SELECT name. RETURN v_count. referenced_name. referenced_type FROM user_dependencies WHERE name = 'DEPARTMENTS' AND type = 'TABLE'. but the specification remains valid.The specification and body of EMPPACK are invalidated. True or False? Mark for Review (1) Points True False (*) Correct Correct .GET_EMP is invalidated. but CALL_EMP rema ins valid. Correct Correct 25. but other procedures in EMPPACK remain v alid. Nothing is invalidated because the PL/SQL code does not reference the GE NDER column. The body of EMPPACK is invalidated. This shows that LOCP ROC is directly dependent on LOCATIONS. (*) EMPPACK. A SELECT from the DEPTREE table displays table LOCATIONS at nested level 0 and procedure LOCPROC at nested level 2.
Copyright © 2022 DOKUMEN.SITE Inc.