Top 40 Oracle DBA Interview Questions and Answers - Techgoeasy
Top 40 Oracle DBA Interview Questions and Answers - Techgoeasy
Oracle SQL interview questions Linux PHP and HTML Downloads General New? Start Here About Us Hire me
Top 40 oracle dba interview questions and answers Search this website
June 7, 2019 by techgoeasy — 4 Comments
This article contains the most commonly asked top 40 oracle dba interview Top Posts & Pages
questions and answers
Oracle Indexes and types of indexes in oracle
with example
Subscribe
Recent Posts
ORA-errors
1. ORA-06512
2. ORA-00911
3. ORA-03113
4. ORA-29913
5. ORA-00257
6. ORA-00054
7. ORA-27154
8. ORA-29285
9. ORA-29280
Question 2 What is the di erence between Oracle database and Oracle instance? 10. ORA-29283
11. ORA-01017
Answer:Oracle database is the collection of datafiles,redologs and control files while Oracle 12. ORA-00900
13. ORA-00001
instance is the SGA ,processes in the Memory.
14. ORA-00936
We can have 1 or more instance serving a oracle database . In Oracle RAC, we have one set of
Privacy Policy
datafiles,control file and redo logs while instance on one ore more boxes accesses the same
database
Data Segment(for storing User Data), Index Segment (for storing index), Rollback Segment
and Temporary Segment.
The background process ARCn automates archiving operations when automatic archiving is
enabled. The database starts multiple archiver processes as needed to ensure that the
archiving of filled redo logs does not fall behind. No archive log means archive log are not
generated and redo are overwritten
Answer: The shared pool portion of the SGA contains three major areas:
library cache(contains parsed sql statements,cursor information,execution plans)
dictionary cache (contains cache -user account information,privileges
information,datafile,segment and extent information)
bu ers for parallel execution messages
control structure.
Related Article
Question 19. You have many instances running on the same UNIX box. How can you
determine which shared memory and semaphores are associated with which instance?
Answer:
There are two ways
$ORACLE_HOME/bin/sysresv
Related article
Answer
A library cache lock means that a session is waiting to use or change an object definition or to
use a SQL statement that another session is loading, changing or parsing, or is waiting to
change or parse. This usually indicates that database object definitions are being changed
regularly.
Another example is gathering statistics on an object. When statistics are gathered all
references to that object in the shared pool or library cache become invalid, requiring a new
hard parse for each SQL statement referencing the object. Statistics should only be gathered
when there are no active users or system activity is very low.
Question 23. How do we find the blocker for Library cache lock?
Answer:
We can run hanganalyze to find the blocking session.
ORADEBUG setmypid
ORADEBUG setinst all
ORADEBUG -g def hanganalyze <level>
Question 25. How do you recover the database if you lost one of the controlfile in the
database?
Answer
sqlplus / as sysdba
shutdown abort
Change Init.ora file to remove the lost controlfile or copy the existing controlfile to that
location
startup the database
Check below link for all the useful scenario for recovery
Question 26. How do you recover the database if you lost all of the controlfile in the
database?
Answer
Check below link for all the useful scenario for recovery
Answer:
It is New feature in Oracle database post 10.1 onwards. It Uses past block images to back out
changes to a oracle database. As the name suggest, we can use this flashback database in
previous time
a.During normal database operation, Oracle occasionally logs past block images in flashback
logs
b.Flashback logs are written sequentially not archived
c. Oracle automatically creates, resizes and deletes flashback logs in the flash recovery area
d. DBA should be aware of flashback logs to monitor performance,to decide how much space
to allocate to flash recovery area
e. Allows database to be recovered to a previous time to correct problems caused by logical
data corruptions,user errors
Flashback database explained and limitation
If it is to be online
If it is to be rebuild o line
Answer:
1. High water mark is the maximum amount of database blocks used so far by a segment.
This mark cannot be reset by delete operations.
2. Delete Table operation won’t reset HWM.
3. TRUNCATE will reset HWM.
4. The high water mark level is just a line separate the used blocks and free blocks.
The blocks above the HWM level is free blocks, they are ready to use.
The blocks below the HWM level is used blocks, they are already used.
PARALLEL_SERVER,
PARALLEL_SERVER_INSTANCES,
PARALLEL_MIN_SERVERS,
PARALLEL_MAX_SERVERS
PARALLEL_THREADS_PER_CPU
Question 33. If the table is fragmented, how would you rebuild it?
Answer
First we need to rebuild the table
Related article
Question 34. What view would you use to determine free space in a tablespace?
Answer dba_free_space
Answer:
Create spfile from pfile;
shutdown instance
startup
Question 36. You are experiencing high “busy bu er waits” . how can you find what’s causing
it?
Answer Bu er busy wait means that the queries are waiting for the blocks to be read into the
db cache.There could be the reason when the block may be busy in the cache and session is
waiting for it. It could be undo, data block or segment header wait.
Run the following query to find out the p1,p2 and p3 of a session causing bu er busy wait
sql> select p1 "File #",p2 "Block #",p3 "Reason Code" from v$session_wait
where event = 'buffer busy waits';
A er that running the following query to find the segment causing bu er busy wait:-
Question 38. What is di erence between startup mount and startup nomount?
Related Articles
How to easily find the database startup and shutdown time using sqlplus
Answer
Major The first digit is the most general identifier. It represents a major new version
Database of the so ware that contains significant new functionality.
Release
Number
Database The second digit represents a maintenance release level. Some new features
Maintenance may also be included.
Release
Number
Application The third digit reflects the release level of the Oracle Application Server
Server (OracleAS).
Release
Number
Component- The fourth digit identifies a release level specific to a component. Di erent
Specific components can have di erent numbers in this position depending upon, for
Release example, component patch sets or interim releases.
Number
Platform- The fi h digit identifies a platform-specific release. Usually this is a patch set.
Specific When di erent platforms require the equivalent patch set, this digit will be
Release the same across the a ected platforms.
Number
Answer The system change number (SCN) is an ever-increasing value that uniquely identifies
a committed version of the database at a point in time. Every time a user commits a
transaction Oracle records a new SCN in redo logs.
Oracle uses SCNs in control files datafile headers and redo records. Every redo log file has
both a log sequence number and low and high SCN. The low SCN records the lowest SCN
recorded in the log file while the high SCN records the highest SCN in the log file
Applying patch
cd <patch no>
opatch apply
Rollback
Answer
Answer
This kind of block corruptions are normally reported by Oracle with error ORA-1578 and the
detailed corruption description is printed in the alert log.
Bad header – the beginning of the block (cache header) is corrupt with invalid values
The block is Fractured/Incomplete – header and footer of the block do not match
The block checksum is invalid
The block is misplaced
Answer
Row chaining happens when a row is too large to fit into a single database block.
For example, Suppose you have 4 KB block size for your database,and you need to insert a
row of 8 KB into it, Oracle will use 3 blocks and store the row in pieces.
In this case, Oracle stores the data for the row in a chain of data blocks (one or more) reserved
for that segment.So, instead of just having a forwarding address on one block and the data on
another we have data on two or more blocks.And Row Chaining happens only when the row is
being inserted and whenever it has inserted it cannot be chained.
In most cases chaining is unavoidable, especially when this involves tables with large columns
such as LONGS, LOBs, etc. When you have a lot of chained rows in di erent tables and the
average row length of these tables is not that large, then you might consider rebuilding the
database with a larger block size.
Tables with more than 255 columns can potentially force Chaining
Answer
We will migrate a row when an update to that row would cause it to not fit on the block
anymore (with all of the the «forwarding address». So, the original block just has the ROWID of
the new block and the entire row is moved.
Question 46. How to find the physical location of the datafiles,redo logs,controlfile?
Answer
select name
from sys.v_$controlfile
/
Answer
$ORACLE_HOME/rdbms/admin/awrrpt.sql
Oracle Database 12c Related questions and articles are given below
5 Simple (But Important) Things To Remember About Oracle Database 12c views ,parameters
and packages
Hope you like this compilation of core oracle dba interview questions and answers.This will be
helpful to senior DBA & experienced DBA also. Please do provide the feedback
Recommended Books
OCA/OCP Oracle Database 12c All-in-One Exam Guide (Exams 1Z0-061, 1Z0-062, & 1Z0-063)
Oracle DBA All-in-one Scripts – A guide every DBA must have: Oracle dba scripts collection
used by expert database administrators everyday. Must have dba scripts for your daily
activities!
Related Articles
Oracle-dba-interview-questions
oracle-dba-interview-questions.pdf
319.4 KiB
904 Downloads
DETAILS
Comments
Reply
Reply
Trackbacks
Oracle Database Insurance Agent Interview | List of Insurance Firms says:
February 9, 2018 at 4:37 am
[…] questions, , . […]
Database Insurance Agent Interview Questions Answers | List of Insurance Firms says:
March 27, 2018 at 1:37 am
[…] This post has awesome oracle dba and to succeed in any oracle . This will test your
knowledge on var… […]
Leave a Reply