Oracle technical interview questions and answers are crucial for candidates preparing for database-related roles such as Database Developer, SQL Programmer, DBA, or Data Analyst. Oracle is widely used in enterprise applications, so interviewers frequently test a candidate’s concepts in SQL, PL/SQL, joins, indexing, triggers, views, transaction management, and performance tuning. Companies like TCS, Wipro, Infosys, Capgemini, and Cognizant often include Oracle questions in both technical interviews and written tests. This guide covers the most frequently asked Oracle interview questions with clear explanations, practical examples, and beginner-friendly definitions. Whether you are preparing for a campus placement or an experienced-level interview, mastering these Oracle concepts will help you answer confidently. You can also download Oracle interview PDFs and practice company-wise mock tests to enhance your preparation.
Database professionals can deepen their Oracle expertise by studying PL/SQL programming and understanding DBMS concepts thoroughly
Showing 10 of 113 questions
61. What are the different approaches used by Optimizer in choosing an execution plan ?
Rule-based and Cost-based.
62. What does ROLLBACK do ?
ROLLBACK retracts any of the changes resulting from the SQL statements in the transaction.
63. How does one coalesce free space ? (for DBA)
SMON coalesces free space (extents) into larger, contiguous extents every 2 hours and even then, only for a short period of time.
SMON will not coalesce free space if a tablespaces default storage parameter “pctincrease” is set to 0. With Oracle 7.3 one
can manually coalesce a tablespace using the ALTER TABLESPACE … COALESCE; command, until then use:
64. How does one prevent tablespace fragmentation? (for DBA)
Always set PCTINCREASE to 0 or 100.
Bizarre values for PCTINCREASE will contribute to fragmentation. For example if you set PCTINCREASE to 1 you will see that your extents are going to have weird and wacky sizes: 100K, 100K, 101K, 102K, etc. Such extents of bizarre size are rarely re-used in their entirety. PCTINCREASE of 0 or 100 gives you nice round extent sizes that can easily be reused. E.g.. 100K, 100K, 200K, 400K, etc.
65. What is a database buffer cache in Oracle?
Use the same extent size for all the segments in a given tablespace. Locally Managed tablespaces (available from 8i onwards) with uniform extent sizes virtually eliminates any tablespace fragmentation. Note that the number of extents per segment does not cause any performance issue anymore, unless they run into thousands and thousands where additional I/O may be required to fetch the additional blocks where extent maps of the segment are stored.
66. Where can one find the high water mark for a table? (for DBA)
There is no single system table, which contains the high water mark (HWM) for a table. A tables HWM can be calculated using the results from the following SQL statements:
SELECT BLOCKS
FROM DBA_SEGMENTS
WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);
ANALYZE TABLE owner.table ESTIMATE STATISTICS;
SELECT EMPTY_BLOCKS
FROM DBA_TABLES
WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);
Thus, the tables HWM = (query result 1) - (query result 2) - 1
NOTE: You can also use t
67. What is COST-based approach to optimization ?
Considering available access paths and determining the most efficient execution plan based on statistics in the data dictionary for the tables accessed by the statement and their associated clusters and indexes.
68. What does COMMIT do ?
COMMIT makes permanent the changes resulting from all SQL statements in the transaction. The changes made by the SQL statements of a transaction become visible to other user sessions transactions that start only after transaction is committed.
69. How are extents allocated to a segment? (for DBA)
Oracle8 and above rounds off extents to a multiple of 5 blocks when more than 5 blocks are requested. If one requests 16K or 2 blocks (assuming a 8K block size), Oracle doesnt round it up to 5 blocks, but it allocates 2 blocks or 16K as requested. If one asks for 8 blocks, Oracle will round it up to 10 blocks.Space allocation also depends upon the size of contiguous free space available. If one asks for 8 blocks and Oracle finds a contiguous free space that is exactly 8 blocks, it would give it
70. Name the data dictionary that stores user-defined constraints?
Can one rename a database user (schema)? (for DBA)
No, this is listed as Enhancement Request 158508. Workaround:
Do a user-level export of user A
create new user B
Import system/manager fromuser=A touser=B
Drop user A