Skip to main content

1Z0-148 Real Exam Questions

Oracle Database: Advanced PL/SQL

243 questions available · Page 1 of 25

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Multiple choice

Which two are major approaches that can be used to reduce the SQL injection by limiting user input? (Choose two.)

  1. A

    Restrict users accessing specified web page.

  2. B

    Use NUMBER data type if only positive integers are needed.

  3. C

    Use dynamic SQL and construct it through concatenation of input values.

  4. D

    In PL/SQL API, expose only those routines that are intended for customer use.

Show answer and explanation

Correct answers: A, D

Question 2 Multiple choice

Which two statements correctly describe the features of SecureFiles? (Choose two.)

  1. A

    Compression is performed only on the server side and enables random reads and writes to LOB data.

  2. B

    Deduplication stores identical data, which occurs in a LOB column in each row, as a single copy within the LOB.

  3. C

    Compression can be performed on the client side and it enables random and sequential reads and writes to LOB data.

  4. D

    Deduplication stores identical data occurring two or more times in the same LOB column as a single copy for the table.

Show answer and explanation

Correct answers: A, D

Question 3 Single choice

Examine the structure of the EMPLOYEES table that exists in your schema.

Name Null? Type

-------------------------- --------------- ---------------------

EMPLOYEE_ID NOT NULL NUMBER(6)

FIRST_NAME VARCHAR2(20)

LAST_NAME NOT NULL VARCHAR2(25)

JOB_ID NOT NULL VARCHAR2(10)

SALARY NUMBER(8,2)

COMMISSION_PCT NUMBER(2,2)

DEPARTMENT_ID NUMBER(4)

You successfully create a GET_MAX procedure to find the maximum salary in the department of a

specified employee.

You then code a PL/SQL block to display the maximum salary in the departments of the first five employees in the EMPLOYEES table.

View the Exhibit. Examine the procedure and the block of PL/SQL code.

What is the outcome of executing the block of PL/SQL code?

  1. A

    It executes successfully and gives the required output.

  2. B

    It gives an error because ROWNUM cannot be used in cursor definitions.

  3. C

    It gives an error because usage of the %ROWCOUNT attribute is not valid.

  4. D

    It executes successfully, but does not give the required output because the procedure call resets the % ROWCOUNT value.

Show answer and explanation

Correct answer: A

Question 4 Multiple choice

Which two are correct when migrating BasicFile LOBs to SecureFile LOBs by DBMS_REDEFINITION? (Choose two.)

  1. A

    Online redefinition can be done only at the table level.

  2. B

    Specify only BasicFiles LOB and SecureFiles LOB column names in parameter col_mapping of DBMS_REDEFINITION.START_REDEF_TABLE.

  3. C

    Set the database initialization parameter db_securefile to NEVER.

  4. D

    During migration, specify the NOLOGGING storage parameter for any new SecureFiles LOB columns.

  5. E

    Online redefinition is the recommended method for migration of BasicFile LOBs to Secure LOBs.

Show answer and explanation

Correct answers: B, E

Question 5 Multiple choice

Which two statements are true about associative arrays and varrays? (Choose two.)

  1. A

    Only varrays must start with the subscript 1.

  2. B

    Only varrays can be used as column types in database tables.

  3. C

    Both associative arrays and varrays must start with the subscript 1.

  4. D

    Both associative arrays and varrays can be used as column types in database tables.

Show answer and explanation

Correct answers: A, B

Question 6 Single choice

You are connected as SCOTT who has an EMP table with this structure:

Examine this code:

Assuming the default edition is ORA$BASE, which is correct?

  1. A

    The query will return records pertaining to department 30 with SAL and COMM values displayed as NULL.

  2. B

    The query will return records pertaining to department 20.

  3. C

    The query will return records pertaining to department 20 with SAL and COMM values displayed as NULL.

  4. D

    The query will return records pertaining to department 30.

Show answer and explanation

Correct answer: A

Question 7 Single choice

Which statement is true in regard to minimizing attack surface during application design?

  1. A

    Reusable components should be developed and used extensively.

  2. B

    Only one user account should be used.

  3. C

    All the code should run anonymously.

  4. D

    Private functions and procedures should be declared in package specifications.

Show answer and explanation

Correct answer: A

Explanation

References:
https://download.oracle.com/oll/tutorials/SQLInjection/html/lesson1/les01_tm_avoid1.htm

Question 8 Single choice

The EMPLOYEES table exists in your schema and has columns LAST_NAME of data type VARCHAR2
and DEPARTMENT_ID of data type NUMBER.

There are six employees in DEPARTMENT_ID, 20.

Examine this code:

What will be the outcome on execution?

  1. A

    The execution of this code will fail with an invalid cursor error and not display either output message.

  2. B

    The number of employees will be displayed as six for both output messages.

  3. C

    The number of employees will be displayed as six for the first output message and zero for the second output message.

  4. D

    The number of employees will be displayed as six for the first output message and an invalid cursor error will be thrown instead of displaying the second output message.

Show answer and explanation

Correct answer: D

Question 9 Multiple choice

Consider a function totalEmp () which takes a number as an input parameter and returns the total number of employees who have a salary higher than that parameter.Examine this PL/SQL package ASWhich two definitions of totalEmp () result in an implicit conversion by Oracle Database on executing this PL/SQL block?

  1. A

    CREATE FUNCTION totalEmp (sal IN NUMBER) RETURN NUMBER IStotal NUMBER :=0;BEGIN...RETUNRN total;END;/

  2. B

    CREATE FUNCTION totalEmp (sal IN NUMBER) RETURN NUMBER IStotal NUMBER :=0;BEGIN...RETUNRN total;END;/

  3. C

    CREATE FUNCTION totalEmp (sal IN PLS_INTEGER) RETURN NUMBER IStotal NUMBER :=0;BEGIN...RETUNRN total;END;/

  4. D

    CREATE FUNCTION totalEmp (sal IN BINARY_FLOAT) RETURN NUMBER IStotal NUMBER :=0;BEGIN...RETUNRN total;END;/

  5. E

    CREATE FUNCTION totalEmp (sal IN POSITIVEN) RETURN NUMBER IStotal NUMBER :=0;BEGIN...RETUNRN total;END;/

Show answer and explanation

Correct answers: B, C

Question 10 Single choice

You have an external C procedure stored in a dynamic-link library (DLL). The C procedure takes an integer as argument and returns an integer. You want to invoke the C procedure through a PL/SQL program.

View the Exhibit.

Which statement is true about the C_OUTPUT PL/SQL program?

  1. A

    It invokes the external C procedure.

  2. B

    It only publishes the external C procedure.

  3. C

    It fails because the external C procedure is not published.

  4. D

    It fails because the input data type is BINARY_INTEGER and the external C procedure expects an integer.

Show answer and explanation

Correct answer: C