Oracle 1z0-148 Exam Practice Questions (P. 2)
- Full Access (75 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #6
Which two blocks of code execute successfully?
- ADECLARE SUBTYPE new_one IS BINARY_INTERGER RANGE 0..9; my_val new_one; BEGIN my_val :=0; END;Most Voted
- BDECLARE SUBTYPE new_string IS VARCHAR2 (5) NOT NULL; my_str_new_string; BEGIN my_str := abc; END;
- CDECLARE SUBTYPE new_one IS NUMBER (2, 1); my_val new_one; BEGIN my_val :=12.5; END;
- DDECLARE SUBTYPE new_one IS INTEGER RANGE 1..10 NOT NULL; my_val new_one; BEGIN my_val :=2; END;
- EDECLARE SUBTYPE new_one IS NUMBER (1, 0); my_val new_one; BEGIN my_val := -1;Most Voted
Correct Answer:
AD
AD
send
light_mode
delete
Question #7
Which statement is correct about DBMS_LOB.SETOPTIONS and DBMS_LOB.GETOPTIONS for SecureFiles?
- ADBMS_LOB.GETOPTIONS can only be used for BLOB data types.
- BDBMS_LOB.SETOPTIONS can perform operations on individual SecureFiles but not an entire column.Most Voted
- CDBMS_LOB. SETOPTIONS can set option types COMPRESS, DUPLICATE, and ENCRYPT.
- DIf a table was not created with compression specified in the store as securefile clause then DBMS_LOB.SETOPTIONS can be used to enable it later.
Correct Answer:
D
Reference:
https://docs.oracle.com/cd/E11882_01/appdev.112/e18294/adlob_smart.htm
D
Reference:
https://docs.oracle.com/cd/E11882_01/appdev.112/e18294/adlob_smart.htm
send
light_mode
delete
Question #8
You are designing and developing a complex database application built using many dynamic SQL statements. Which option could expose your code to SQL injection attacks?
- AUsing bind variables instead of directly concatenating parameters into dynamic SQL statements
- BUsing automated tools to generate code
- CNot validating parameters which are concatenated into dynamic SQL statementsMost Voted
- DValidating parameters before concatenating them into dynamic SQL statements
- EHaving excess database privileges
Correct Answer:
A
Reference:
https://docs.oracle.com/database/121/LNPLS/dynamic.htm#LNPLS645
A
Reference:
https://docs.oracle.com/database/121/LNPLS/dynamic.htm#LNPLS645
send
light_mode
delete
Question #9
Examine this code executed as SYS:

Examine this code executed as SPIDER and the error message received upon execution:

What is the reason for this error?

Examine this code executed as SPIDER and the error message received upon execution:

What is the reason for this error?
- AThe procedure needs to be granted the DYNAMIC_TABLE_ROLE role.
- BThe EXECUTE IMMEDIATE clause is not supported with roles.
- CPrivileges granted through roles are never in effect when running definer’s rights procedures.Most Voted
- DThe user SPIDER needs to be granted the CREATE TABLE privilege and the procedure needs to be granted the DYNAMIC_TABLE_ROLE.
Correct Answer:
C
C
send
light_mode
delete
Question #10
Which codes executes successfully?
- ACREATE PACKAGE pkg AS TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); PROCEDURE calc_price (price_rec IN OUT rec_typ); END pkg; / CREATE PACAKGE BODY pkg AS PROCEDURE calc_price (price_rec IN OUT rec_typ) AS BEGIN price_rec.price := price_rec.price + (price_rec.price * price_rec.inc_pct)/100; END calc_price; END pkg; / DECLARE 1_rec pkg. rec_typ; BEGIN 1_rec_price :=100; 1_rec.inc_pct :=50; EXECUTE IMMEDIATE BEGIN pkg. calc_price (:rec); END; USING IN OUT 1_rec; END;Most Voted
- BCREATE PACKAGE pkg AS TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); END pkg; / CREATE PROCEDURE calc_price (price_rec IN OUT pkg. rec_typ) AS BEGIN price_rec.price := price_rec.price + (price_rec.price * price_rec.inc_pct)/100; END / DECLARE 1_rec pkg.rec_typ; BEGIN EXECUTE IMMEDIATE BEGIN calc_price (:rec); END; USING IN OUT 1_rec (100, 50); END;
- CCREATE PACKAGE pkg AS TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); END pkg; / CREATE PROCEDURE calc_price (price_rec IN OUT pkg. rec_typ) AS BEGIN price_rec.price := price_rec.price + (price_rec.price * price_rec.inc_pct)/100; END ; / DECLARE 1_rec pkg. rec_typ; BEGIN 1_rec_price :=100; 1_rec.inc_pct :=50; EXECUTE IMMEDIATE BEGIN calc_price (1_rec); END;; END;
- DDECLARE TYPE rec_typ IS RECORD (price NUMBER, inc_pct NUMBER); 1_rec rec-typ; PROCEDURE calc_price (price_rec IN OUT rec_typ) AS BEGIN price_rec.price := price-rec.price+ (price_rec.price * price_rec.inc_pct)/100; END; BEGIN 1_rec_price :=100; 1_rec.inc_pct :=50; EXECUTE IMMEDIATE BEGIN calc_price (:rec); END; USING IN OUT 1_rec;
Correct Answer:
B
B
send
light_mode
delete
All Pages