Oracle Database MCQ Banner

Oracle Database Multiple Choice Questions (MCQs) and Answers

Master Oracle Database with Practice MCQs. Explore our curated collection of Multiple Choice Questions. Ideal for placement and interview preparation, our questions range from basic to advanced, ensuring comprehensive coverage of Oracle Database concepts. Begin your placement preparation journey now!

Q91

Q91 A query using indexes is not performing well. What might be the reason?

A

Index is fragmented

B

Index is invalid

C

Statistics are outdated

D

Query syntax is incorrect

Q92

Q92 A SQL statement takes too long to execute. What could be the issue?

A

Poor indexing strategy

B

Excessive disk I/O

C

High contention for resources

D

All of the above

Q93

Q93 What is the purpose of user management in Oracle Database?

A

To define database structures

B

To manage database users and their privileges

C

To perform backups

D

To optimize queries

Q94

Q94 Which command is used to create a new user in Oracle Database?

A

CREATE ACCOUNT username IDENTIFIED BY password;

B

ADD USER username WITH password;

C

CREATE USER username IDENTIFIED BY password;

D

NEW USER username WITH password;

Q95

Q95 What is the purpose of the GRANT command in Oracle?

A

To delete user accounts

B

To revoke privileges

C

To assign privileges to users

D

To modify table structures

Q96

Q96 What does the ALTER USER command do in Oracle?

A

Changes user attributes

B

Deletes user accounts

C

Assigns privileges

D

Modifies table structures

Q97

Q97 What is the difference between a role and a privilege in Oracle?

A

Roles are more granular; privileges are broad

B

Roles are predefined; privileges are user-defined

C

Roles group privileges; privileges define specific actions

D

Roles are for users; privileges are for tables

Q98

Q98 Write a query to create a user named "john" with the password "password123".

A

CREATE USER john IDENTIFIED BY password123;

B

CREATE ACCOUNT john PASSWORD password123;

C

ADD USER john WITH password123;

D

NEW USER john IDENTIFIED password123;

Q99

Q99 Write a query to grant the SELECT privilege on the "employees" table to "john".

A

GRANT SELECT ON employees TO john;

B

GRANT READ ON employees TO john;

C

ASSIGN SELECT employees TO john;

D

PERMIT SELECT ON employees TO john;

Q100

Q100 Write a query to revoke the UPDATE privilege on the "employees" table from "john".

A

REVOKE UPDATE ON employees FROM john;

B

REMOVE UPDATE employees FROM john;

C

DELETE PRIVILEGE UPDATE ON employees FROM john;

D

REMOVE PRIVILEGE UPDATE FROM john;

Q101

Q101 Write a query to create a role named "HR_MANAGER" with the SELECT and UPDATE privileges on the "employees" table.

A

CREATE ROLE HR_MANAGER; GRANT SELECT, UPDATE ON employees TO HR_MANAGER;

B

CREATE ROLE HR_MANAGER WITH SELECT, UPDATE;

C

GRANT SELECT, UPDATE TO ROLE HR_MANAGER;

D

CREATE HR_MANAGER ROLE WITH PRIVILEGES;

Q102

Q102 A user cannot log in to the database. What could be the issue?

A

User account is locked

B

User lacks privileges

C

Table is missing

D

Query syntax error

Q103

Q103 A GRANT command fails with "ORA-01031: insufficient privileges." What is the cause?

A

User lacks GRANT option

B

Table does not exist

C

Database is in restricted mode

D

Invalid syntax

Q104

Q104 A user cannot perform SELECT queries after being granted SELECT privilege. What could be the issue?

A

Privilege not committed

B

Object does not exist

C

User was not granted access to the schema

D

User is locked

Q105

Q105 What is the purpose of the Data Pump utility in Oracle?

A

To optimize queries

B

To perform high-speed export and import operations

C

To create backups

D

To manage user privileges

Q106

Q106 Which command is used to export data using the Data Pump Export utility?

A

EXPDP

B

IMPDP

C

EXPORT

D

IMPORT

Q107

Q107 What is the function of the "DIRECT" parameter in Data Pump Export?

A

Compresses data during export

B

Skips validation

C

Improves performance by bypassing the buffer

D

Encrypts the data

Q108

Q108 What is the difference between FULL and SCHEMA mode in Data Pump Export?

A

FULL exports all objects; SCHEMA exports only objects in a specific schema

B

FULL exports only data; SCHEMA exports data and metadata

C

FULL requires admin privileges; SCHEMA does not

D

FULL is faster than SCHEMA mode

Q109

Q109 Write a Data Pump Export command to export a schema named "HR."

A

EXPDP SYSTEM/password SCHEMAS=HR DIRECTORY=exp_dir DUMPFILE=hr_exp.dmp LOGFILE=hr_exp.log;

B

EXPDP HR/password FULL=y DIRECTORY=exp_dir DUMPFILE=full_exp.dmp LOGFILE=full_exp.log;

C

EXPORT HR/password SCHEMA_ONLY DIRECTORY=exp_dir DUMPFILE=hr_only.dmp;

D

EXPDP SYSTEM/password SCHEMA HR DIRECTORY=exp_dir LOG=hr_exp.log;

Q110

Q110 Write a Data Pump Import command to import a dump file named "hr_exp.dmp."

A

IMPDP SYSTEM/password DIRECTORY=exp_dir DUMPFILE=hr_exp.dmp LOGFILE=hr_imp.log;

B

IMPDP HR/password FILE=hr_exp.dmp LOG=hr_imp.log DIRECTORY=exp_dir;

C

IMPORT SYSTEM/password FILE=hr_exp.dmp LOGFILE=hr_imp.log DIRECTORY=exp_dir;

D

IMPDP HR/password FILE=hr_only.dmp LOGFILE=imp_hr.log DIRECTORY=exp_dir;

Q111

Q111 Write a command to export only tables "employees" and "departments" using Data Pump.

A

EXPDP SYSTEM/password TABLES=employees,departments DIRECTORY=exp_dir DUMPFILE=table_exp.dmp LOGFILE=table_exp.log;

B

EXPDP SYSTEM/password TABLE_ONLY=employees,departments DIRECTORY=exp_dir FILE=table_exp.dmp LOG=table_exp.log;

C

EXPORT SYSTEM/password TABLE=employees,departments DIRECTORY=exp_dir FILE=table_exp.dmp LOG=table_exp.log;

D

EXPDP SYSTEM/password TABLES=employees,departments FILE_ONLY=table_exp.dmp LOG=table_exp.log DIRECTORY=exp_dir;

Q112

Q112 A Data Pump Export command fails with "ORA-39002: invalid operation." What is the likely cause?

A

Incorrect directory parameter

B

Insufficient privileges

C

Incorrect syntax

D

File does not exist

Q113

Q113 A Data Pump Import fails with "ORA-31655: no data objects selected." What could be the cause?

A

Dump file does not exist

B

Incorrect SCHEMAS parameter

C

Dump file corrupted

D

Target database is offline

Q114

Q114 What is the purpose of Oracle Net Services?

A

To connect Oracle databases and client applications

B

To back up data

C

To monitor user sessions

D

To optimize queries

Q115

Q115 Which file stores the network configuration for Oracle Database?

A

listener.ora

B

tnsnames.ora

C

sqlnet.ora

D

All of the above

Q116

Q116 What is the role of the Oracle Listener?

A

Handles SQL queries

B

Facilitates connections to the database

C

Monitors database performance

D

Manages backups

Q117

Q117 What is the difference between dedicated and shared server configurations?

A

Dedicated assigns one process per client; shared uses fewer server processes

B

Shared requires more memory; dedicated requires less

C

Dedicated is faster; shared is more secure

D

Both configurations are identical

Q118

Q118 Write a command to start the Oracle Listener.

A

lsnrctl start

B

lsnrctl begin

C

start listener

D

listener start

Q119

Q119 Write a command to view the status of the Oracle Listener.

A

lsnrctl status

B

show listener status

C

listener status

D

status listener

Q120

Q120 Write a command to reload the Oracle Listener configuration.

A

lsnrctl reload

B

reload listener

C

listener reload

D

lsnrctl reconfigure

ad verticalad vertical
ad