
Q121
Q121 A connection attempt fails with "ORA-12541: TNS:no listener." What could be the issue?
Listener is not running
Incorrect connection string
User lacks privileges
Database is offline
Q122
Q122 A database client cannot connect, showing "ORA-12154: TNS:could not resolve the connect identifier specified." What is the likely cause?
Incorrect tnsnames.ora configuration
Listener not running
Database not started
Missing privileges
Q123
Q123 What is a PL/SQL collection?
A single variable
A group of elements of the same type
A database table
A SQL query
Q124
Q124 What is the difference between a VARRAY and a nested table in PL/SQL?
VARRAYs are unbounded; nested tables are bounded
Nested tables maintain order; VARRAYs do not
VARRAYs have a fixed size; nested tables do not
Nested tables are faster than VARRAYs
Q125
Q125 What is the purpose of the BULK COLLECT clause in PL/SQL?
To handle single-row queries
To fetch multiple rows into a collection
To speed up DML operations
To update indexes
Q126
Q126 Write a PL/SQL block to declare and use a VARRAY with 5 elements.
DECLARE my_varray VARRAY(5) OF NUMBER; BEGIN ...
DECLARE my_varray ARRAY[5] OF NUMBER; BEGIN ...
DECLARE VARRAY my_varray(5) AS NUMBER; BEGIN ...
DECLARE my_varray VARRAY(5) IS NUMBER; BEGIN ...
Q127
Q127 Write a PL/SQL block to perform a BULK COLLECT operation.
DECLARE my_collection TABLE OF NUMBER; BULK COLLECT INTO my_collection ...
DECLARE my_collection TABLE IS NUMBER; BEGIN BULK COLLECT ...
DECLARE TYPE my_collection IS TABLE OF NUMBER; BEGIN SELECT * BULK COLLECT INTO my_collection ...
DECLARE TABLE my_collection OF NUMBER; BEGIN BULK SELECT ...
Q128
Q128 A PL/SQL block using BULK COLLECT fails with "ORA-06504: PL/SQL: Return types of Result Set variables or query do not match." What could be the issue?
Collection type mismatch
Missing INTO clause
Invalid syntax
Null values in the table
Q129
Q129 A PL/SQL block fails with "ORA-06531: Reference to uninitialized collection." What is the likely cause?
Collection is declared but not initialized
Invalid loop construct
Incorrect data type
Invalid bulk operation
Q130
Q130 What is the primary purpose of Oracle RAC?
To improve data security
To provide high availability and scalability
To optimize SQL queries
To backup data
Q131
Q131 How does Oracle RAC ensure data consistency across nodes?
By using redo logs
By using cache fusion
By using control files
By using archive logs
Q132
Q132 What is the difference between a cluster node and an instance in Oracle RAC?
Nodes are physical servers; instances are memory and processes
Nodes are virtual; instances are physical
Nodes and instances are the same
Instances manage storage; nodes manage connections
Q133
Q133 Write a query to check the status of all instances in an Oracle RAC environment.
SELECT INSTANCE_NAME, STATUS FROM V$INSTANCE;
SELECT NODE_NAME, STATUS FROM V$NODE_STATUS;
SELECT * FROM GV$INSTANCE_STATUS;
SELECT INSTANCE_STATUS FROM GV$INSTANCE;
Q134
Q134 Write a query to check the load balancing distribution in Oracle RAC.
SELECT * FROM GV$LOAD_BALANCING;
SELECT INSTANCE_NAME, LOAD FROM GV$LOAD_BALANCING_STATUS;
SELECT INSTANCE_NAME, LOAD FROM GV$SESSION;
SELECT INSTANCE_NAME, SESSIONS_ACTIVE FROM GV$INSTANCE;
Q135
Q135 An Oracle RAC instance fails with "ORA-29702: error occurred in Cluster Group Service operation." What could be the issue?
Cluster synchronization failure
Instance corruption
Redo log missing
Datafile is corrupted
Q136
Q136 A query fails in Oracle RAC with "ORA-12545: Connect failed because target host or object does not exist." What could be the issue?
Incorrect TNS configuration
Listener not running
Node is down
Database is offline
Q137
Q137 What is the primary purpose of Oracle Data Guard?
To improve query performance
To provide disaster recovery and data protection
To manage user privileges
To optimize storage
Q138
Q138 What is the difference between a physical standby and a logical standby database?
Physical standby is a block-for-block copy; logical standby allows data transformations
Physical standby stores only redo logs; logical standby stores only transactions
Physical standby is slower
Logical standby does not support updates
Q139
Q139 What is the role of the Data Guard broker in Oracle Data Guard?
To manage user sessions
To automate configuration and monitoring
To create backups
To optimize queries
Q140
Q140 Write a command to enable Data Guard broker.
ALTER SYSTEM SET DG_BROKER_START=TRUE;
START DG BROKER;
ENABLE DATAGUARD BROKER;
ALTER DATABASE ENABLE DG_BROKER;
Q141
Q141 Write a command to switch the primary database to a standby role.
ALTER DATABASE SWITCH TO STANDBY;
ALTER DATABASE CONVERT TO STANDBY;
ALTER DATABASE SWITCHOVER TO STANDBY;
SWITCH DATABASE ROLE TO STANDBY;
Q142
Q142 A Data Guard configuration shows "ORA-16810: multiple errors in database." What could be the issue?
Redo logs not applied
Standby database not synchronized
Network connection issue
All of the above
Q143
Q143 A switchover operation fails with "ORA-16664: unable to receive Data Guard messages." What could be the cause?
Network issue
Redo logs corrupted
Primary database is down
Standby database is corrupted
Q144
Q144 What is the importance of case studies in Oracle applications?
To explore practical applications
To improve database security
To study query performance
To optimize backups
Q145
Q145 How does Oracle optimize data warehousing applications?
By using parallel queries
By indexing all columns
By enabling Data Pump
By disabling constraints
Q146
Q146 What is the role of partitioning in Oracle applications?
To improve query performance and manage large datasets
To create database backups
To enhance user privileges
To secure the database
Q147
Q147 Write a query to implement range partitioning on a table "sales" based on the "sales_date" column.
CREATE TABLE sales (id NUMBER, sales_date DATE, amount NUMBER) PARTITION BY RANGE (sales_date) (PARTITION p1 VALUES LESS THAN (TO_DATE('2023-01-01','YYYY-MM-DD')), PARTITION p2 VALUES LESS THAN (MAXVALUE));
CREATE TABLE sales PARTITION BY RANGE ON sales_date;
CREATE TABLE sales PARTITION BY RANGE (sales_date) PARTITION LESS_THAN ('2023-01-01');
PARTITION TABLE sales (sales_date RANGE) LESS_THAN ('2023-01-01');
Q148
Q148 Write a query to use a materialized view to improve query performance in a data warehouse application.
CREATE MATERIALIZED VIEW mv_sales AS SELECT product_id, SUM(amount) FROM sales GROUP BY product_id;
CREATE VIEW mv_sales AS SELECT product_id, SUM(amount) FROM sales;
CREATE TABLE mv_sales AS SELECT product_id, SUM(amount) FROM sales GROUP BY product_id;
MATERIALIZE VIEW mv_sales SELECT product_id, SUM(amount) FROM sales;
Q149
Q149 A materialized view in a case study fails to refresh automatically. What could be the cause?
Missing refresh clause
Corrupted base table
Incorrect query syntax
Database in read-only mode
Q150
Q150 A partitioned table query in a case study performs poorly. What could be the issue?
Missing index on partition key
Incorrect partition strategy
Outdated statistics
All of the above