Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
139 views

Oracle DBA Job Interview Questions and Answers

BA guide

Uploaded by

Tryscribb New
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

Oracle DBA Job Interview Questions and Answers

BA guide

Uploaded by

Tryscribb New
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Oracle DBA Job Interview

Questions And Answers

Interview Questions Answers


https://interviewquestionsanswers.org/
About Interview Questions Answers

Interview Questions Answers . ORG is an interview preparation guide of thousands of Job


Interview Questions And Answers, Job Interviews are always stressful even for job seekers who have
gone on countless interviews. The best way to reduce the stress is to be prepared for your job
interview. Take the time to review the standard interview questions you will most likely be asked.
These interview questions and answers on Oracle DBA will help you strengthen your technical skills,
prepare for the interviews and quickly revise the concepts.

If you find any question or answer is incorrect or incomplete then you can submit your question or
answer directly with out any registration or login at our website. You just need to visit Oracle DBA
Interview Questions And Answers to add your answer click on the Submit Your Answer links on the
website; with each question to post your answer, if you want to ask any question then you will have a
link Submit Your Question; that's will add your question in Oracle DBA category. To ensure quality,
each submission is checked by our team, before it becomes live. This Oracle DBA Interview
preparation PDF was generated at Saturday 6th February, 2021

You can follow us on FaceBook for latest Jobs, Updates and other interviews material.
www.facebook.com/InterviewQuestionsAnswers.Org

Follow us on Twitter for latest Jobs and interview preparation guides.


https://twitter.com/InterviewQA

If you need any further assistance or have queries regarding this document or its material or any of
other inquiry, please do not hesitate to contact us.

Best Of Luck.

Interview Questions Answers.ORG Team


https://InterviewQuestionsAnswers.ORG/
Support@InterviewQuestionsAnswers.ORG
Oracle DBA Interview Questions And Answers
In
te

Oracle DBA Interview Questions And Answers Guide.


rv
ie
w
Q

Question - 1:
Explain FORCE LOGGING feature in 9i.
ue

Ans:
By setting FORCE LOGGING to TRUE, all transactions will generate REDO. This is used for Data Guard, so no data will be missed (i.e. transactions that were run
with NOLOGGING option) in Standby database
st

View All Answers

Question - 2:
io

How can you tell if an index on particular table is USED or NOT USED in 9i?
Ans:
ns

By turning MONITORING ON that index and querying into INDEX_USAGE table


View All Answers

Question - 3:
A

How do you put database is ARCHIVELOG mode, explain procedure?


Ans:
ns

1. Modify init.ora parameter START_ARCHIVE=TRUE


2. SQL> SHUTDOWN IMMEDIATE;
3. STARTUP MOUNT;
4. ALTER DATAVASE ARCHIVELOG;
w

5. ALTER DATABASE OPEN;


View All Answers
er

Question - 4:
If you had a tablespace, TEST_TABLESPACE, which consists of three files:
s.

TEST01.dbf, TEST02.dbf, and TEST03.dbf, and someone accidentally used the Unix command
"rm" to delete the file TEST02.dbf, what else would you need in order to recover all the data that
was present in TEST_TABLESPACE at the time that TEST02.dbf was deleted?
O

Ans:
All Archivelogs
R

View All Answers


G

Question - 5:
Explain procedure to Change CHARACTERSET of a database.
Ans:
Can't change CHARACTERSET of a database, you will need to re-create the database with
appropriate CHARACTERSET.
View All Answers

Question - 6:
You see a wait on LMS process in statspack, what does that mean?
Ans:
Wait is due to Data Guard Broker.
View All Answers

Question - 7:

Copyright © https://InterviewQuestionsAnswers.org Page 3/10


Oracle DBA Interview Questions And Answers

How do you analyze table partition using Oracle provided package?


Ans:
DBMS_STATS.GATHER_TABLE_STATS with GRANULARITY => 'PARTITION' OPTION
In

View All Answers

Question - 8:
te

What is PGA_AGGREGATE_TARGET?
Ans:
rv

This parameter controls the maximum amount of memory PGA which can be used by the queries when WORKAREA_SIZE_POLICY is set to Auto.
The value you can be set in Bytes, kilobytes (K), megabytes (M) or gigabytes (G). The default value is 0
This parameter also has an effect on the execution plans of the cost based optimizer. The optimizer uses the value of the parameter PGA_AGGREGATE_TARGET to
derive an estimate
ie

for the minimum and maximum amount of memory which should be available at run-time for each sort, hash-join and bitmap operator in the query. Based on this
minimum and maximum value, the
optimizer selects the best plan.
w

View All Answers

Question - 9:
Q

List five most important parameter in 9i affecting performance?


Ans:
ue

CURSOR_SHARING
DB_CACHE_SIZE
PGA_AGGREGATE_TARGET
DB_16K_CACHE_SIZE, DB_8K_CACHE_SIZE, DB_2K_CACHE_SIZE
st

View All Answers


io

Question - 10:
Explain below wait events in STATSPACK report DB SCATTERED READ, DB SEQUENTIAL REAL, ENQUEUE?
ns

Ans:
DB SCATTERED READ - FULL TABLE SCAN
DB SEQUENTIAL REAL - IO
ENQUEUE - LOCKING
View All Answers
A

Question - 11:
ns

Process you follow to start looking into Performance issue at database level
(If the application is running very slow, at what points do you need to go about the database in
order to improve the performance?)
w

Ans:
* Run a TOP command in Unix to see CPU usage (identify CPU killer processes)
* Run VMSTAT, SAR, and PRSTAT command to get more information on CPU and memory usage and possible blocking
er

* Run STATSPACK report to identify:


1. TOP 5 WAIT EVENTS
2. RESOURCE intensive SQL statements
s.

* See if STATISTICS on affected tables needs to be re-generated


* IF poorly written statements are culprit, run a EXPLAIN PLAN on these statements and see whether new index or use of HINT brings the cost of SQL down.
View All Answers
O

Question - 12:
R

How do you install Statspack?


Ans:
G

By running $ORACLE_HOME/rdbms/admin/spcreate.sql script


View All Answers

Question - 13:
Which RMAN command is used to create an exact replica of a database in
new host?
Ans:
DUPLICATE DATABASE
View All Answers

Question - 14:
A DBA had to remove some Archivelogs to free up space in filesystem. Now
when the RMAN job starts to backup Archivelogs, it complains about missing Archivelogs that
were deleted by DBA. To resolve the issue and continue backing up remainder of Archivelogs,
which RMAN command can be used so it wo not complain about missing Archivelogs.

Copyright © https://InterviewQuestionsAnswers.org Page 4/10


Oracle DBA Interview Questions And Answers

Ans:
Crosscheck command
View All Answers
In

Question - 15:
what is the difference between group by and order by?
te

Ans:
group by is used when we use aggregate functions on the columns in a query the other columns
should be in group by query
rv

example:
select empno,ename,sum(sal) from emp
group by empno,ename
ie

Order by is used to sort values either in ascending or descending order


View All Answers
w

Question - 16:
How would you pass hints to the SQL processor?
Q

Ans:
USING COMMENT LINES WITH (+) SIGN YOU CAN PASS THE HINTS TO SQL ENGINE
For example
ue

/* +PARALLEL( ) */
View All Answers
st

Question - 17:
Do you need a commit after DDL statements?
Ans:
io

DDL IS A AUTO COMMIT, YOU DON􀂶T NEED TO COMMIT AGAIN


View All Answers
ns

Question - 18:
What are the steps involved in Instance Recovery in Oracle?
Ans:
A

Rolling forward to recover data that has not been recorded in data files, yet has been recorded
in the on-line redo log, including the contents of rollback segments.
ns

Rolling back transactions that have been explicitly rolled back or have not been committed as
indicated by the rollback segments regenerated in step a.
Releasing any resources (locks) held by transactions in process at the time of the failure.
Resolving any pending distributed transactions undergoing a two-phase commit at the time of
the instance failure.
w

View All Answers


er

Question - 19:
What is Oracle Log Switch?
s.

Ans:
The point at which ORACLE ends writing to one online redo log file and begins writing to another
is called a log switch.
O

View All Answers


R

Question - 20:
What are the advantages of operating a database in ARCHIVELOG mode
G

over operating it in NO ARCHIVELOG mode?


Ans:
Complete database recovery from disk failure is possible only in ARCHIVELOG mode.
Online database backup is possible only in ARCHIVELOG mode.
View All Answers

Question - 21:
What is Oracle Archived Redo Log?
Ans:
Archived Redo Log consists of Redo Log files that have archived before being reused.
View All Answers

Question - 22:
What is Oracle Partial Backup?

Copyright © https://InterviewQuestionsAnswers.org Page 5/10


Oracle DBA Interview Questions And Answers

Ans:
A Partial Backup is any operating system backup short of a full backup, taken while the
database is open or shut down.
View All Answers
In

Question - 23:
te

What is Oracle Full Backup?


Ans:
A full backup is an operating system backup of all data files, on-line redo log files and control
rv

file that constitute ORACLE database and the parameter.


View All Answers
ie

Question - 24:
What are the different modes of mounting a Database with the Parallel
w

Server?
Ans:
Exclusive Mode If the first instance that mounts a database does so in exclusive mode, only
Q

that Instance can mount the database.


Parallel Mode If the first instance that mounts a database is started in parallel mode, other
instances that are started in parallel mode can also mount the database.
ue

View All Answers

Question - 25:
st

What are the steps involved in Database Start up?


Ans:
io

Start an instance, Mount the Database and Open the Database.


View All Answers
ns

Question - 26:
What operator tests column for the absence of data?
Ans:
IS NULL operator
A

View All Answers


ns

Question - 27:
Which function is used to find the largest integer less than or equal to a
specific value?
w

Ans:
FLOOR
er

View All Answers

Question - 28:
s.

What is the advantage of specifying WITH GRANT OPTION in the GRANT


command?
O

Ans:
The privilege receiver can further grant the privileges he/she has obtained from the owner to any
other user.
R

View All Answers


G

Question - 29:
Which date function is used to find the difference between two dates?
Ans:
MONTHS_BETWEEN
View All Answers

Question - 30:
What is the use of the DROP option in the ALTER TABLE command?
Ans:
It is used to drop constraints specified on the table.
View All Answers

Question - 31:

Copyright © https://InterviewQuestionsAnswers.org Page 6/10


Oracle DBA Interview Questions And Answers

What operator performs pattern matching


Ans:
LIKE operator
In

View All Answers

Question - 32:
te

How do I write a cron which will run a SQL query and mail the results to a
group?
rv

Ans:
Use DBMS_JOB for scheduling a cron job and DBMS_MAIL to send the results through email.
View All Answers
ie

Question - 33:
w

what is difference between Co-related sub query and nested sub query?
Ans:
Co-related sub query is one in which inner query is evaluated only once and from that result outer
Q

query is evaluated.
Nested query is one in which Inner query is evaluated for multiple times for getting one row of that
outer query.
ue

ex. Query used with IN() clause is Co-related query.


Query used with = operator is Nested query
View All Answers
st

Question - 34:
What is the difference between RAID 5 and RAID 10? Which is better for Oracle?
io

Ans:
RAID 5 is striping with an extra disk for parity. If we lose a disk we can reconstruct from that parity disk.
RAID 10 is mirroring pairs of disks, and then striping across those sets.
ns

RAID 5 was created when disks were expensive. Its purpose was to provide RAID on the cheap. If a disk fails, the IO subsystem will perform VERY slowly during
the rebuild process. What's more your liklihood of failure increases dramatically during this period, with all the added weight of the rebuild. Even when it is operating
normally RAID 5 is slow for everything but reading. Given that and knowing databases (especially Oracle's redo logs) continue to experience write activity all the
time, we should avoid RAID5 in all but the rare database that is MOSTLY read activity. Don't put redologs on RAID5.
RAID10 is just all around goodness. If you lose one disk in a set of 10 for example, you could lose any one of eight other disks and have no troubles. What's more
A

rebuilding does not impact performance at all since you're simply making a mirror copy. Lastly RAID10 perform exceedingly well in all types of databases.
View All Answers
ns

Question - 35:
What are the tradeoffs between many vs few indexes? When would you want to have many, and when would it be better to have fewer?
w

Ans:
Fewer indexes on a table mean faster inserts/updates. More indexes mean faster, more specific WHERE clauses possibly without index merges.
View All Answers
er

Question - 36:
s.

Why is SQL*Loader direct path so fast?


Ans:
O

SQL*Loader with direct path option can load data ABOVE the high water mark of a table, and DIRECTLY into the datafiles, without going through the SQL engine
at all. This avoids all the locking, latching, and so on, and doesn't impact the db (except possibly the I/O subsystem) at all.
View All Answers
R

Question - 37:
G

In PL/SQL, what is bulk binding, and when/how would it help performance?


Ans:
Oracle's SQL and PL/SQL engines are separate parts of the kernel which require context switching, like between unix processes. This is slow, and uses up resources.
If we loop on an SQL statement, we are implicitely flipping between these two engines. We can minimize this by loading our data into an array, and using PL/SQL
bulk binding operation to do it all in one go!
View All Answers

Question - 38:
What are bind variables and why are they important?
Ans:
With bind variables in SQL, Oracle can cache related queries a single time in the SQL cache (area). This avoids a hard parse each time, which saves on various
locking and latching resources we use to check objects existence and so on. BONUS: For rarely run queries, especially BATCH queries, we explicitely DO NOT
want to use bind variables, as they hide information from the Cost Based Opitmizer.
BONUS BONUS: For batch queries from 3rd party apps like peoplesoft, if we can't remove bind variables, we can use bind variable peeking!
View All Answers

Copyright © https://InterviewQuestionsAnswers.org Page 7/10


Oracle DBA Interview Questions And Answers

Question - 39:
What is the difference between RMAN and a traditional hotbackup?
Ans:
In

RMAN is faster, can do incremental (changes only) backups, and does not place tablespaces into hotbackup mode.
View All Answers
te

Question - 40:
Tell me about standby database? What are some of the configurations of it? What should we watch out for?
rv

Ans:
Standby databases allow us to create a copy of our production db, for disaster recovery. We merely switch mode on the target db, and bring it up as read/write. Can
setup as master->slave or master->master. The latter allows the former prod db to become the standby, once the failure cause is remedied. Watch out for NO
ie

LOGGING!! Be sure we're in archivelog mode.


View All Answers
w

Question - 41:
What does the NO LOGGING option do? Why would we use it? Why would we be careful of using it?
Q

Ans:
It disables the logging of changes to the redologs. It does not disable ALL LOGGING, however as Oracle continues to use a base of changes, for recovery if you pull
the plug on the box, for instance. However it will cause problems if you are using standby database. Use it to speed up operations, like an index rebuild, or partition
ue

maintenance operations.
View All Answers
st

Question - 42:
What is the difference between a materialized view (snapshot) fast refresh versus complete refresh? When is one better, and when the other?
Ans:
io

Fast refresh maintains a change log table, which records change vectors, not unlike how the redo logs work. There is overhead to this, as with a table that has a LOT
of indexes on it, and inserts and updates will be slower. However if you are performing refreshes often, like every few minutes, you want to do fast refresh so you
don't have to full-table-scan the source table. Complete refresh is good if you're going to refresh once a day. Does a full table scan on the source table, and recreats the
ns

snapshot/mview. Also inserts/updates on the source table are NOT impacted on tables where complete refresh snapshots have been created.
View All Answers

Question - 43:
A

What is the difference between Truncate and Delete? Why is one faster?
Can we ROLLBACK both? How would a full table scan behave after?
ns

Ans:
Truncate is nearly instantaenous, cannot be rolled back, and is fast because Oracle simply resets the HWM. When a full table scan is performed on a table, such as for
a sort operation, Oracle reads to the HWM. So if you delete every single solitary row in 10 million row table so it is now empty, sorting on that table of 0 rows would
still be extremely slow.
w

View All Answers


er

Question - 44:
What is your favorite tool for day-to-day Oracle operation?
s.

Ans:
Hopefully we hear some use of command line as the answer!
View All Answers
O

Question - 45:
R

Name three SQL operations that perform a SORT.


Ans:
G

a. CREATE INDEX
b. DISTINCT
c. GROUP BY
d. ORDER BY
f. INTERSECT
g. MINUS
h. UNION
i. UNINDEXED TABLE JOIN
View All Answers

Question - 46:
Explain two easy SQL optimizations.
Ans:
a. EXISTS can be better than IN under various conditions
b. UNION ALL is faster than UNION (not sorting)

Copyright © https://InterviewQuestionsAnswers.org Page 8/10


Oracle DBA Interview Questions And Answers

View All Answers

Question - 47:
In

How do you use automatic PGA memory management with Oracle 9i and above?
Ans:
Set the WORKAREA_SIZE_POLICY parameter to AUTO and set PGA_AGGREGATE_TARGET
te

View All Answers


rv

Question - 48:
When using Oracle export/import what character set concerns might come up? How do you handle them?
Ans:
ie

Be sure to set NLS_LANG for example to "AMERCIAN_AMERICA.WE8ISO8859P1". If your source database is US7ASCII, beware of 8-bit characters. Also be
wary of multi-byte characters sets as those may require extra attention. Also watch export/import for messages about any "character set conversions" which may
w

occur.
View All Answers
Q
ue
st
io
ns
A
ns
w
er
s.
O
R
G

Copyright © https://InterviewQuestionsAnswers.org Page 9/10


Oracle Most Popular & Related Interview Guides

1 : Oracle PL-SQL Interview Questions and Answers.

2 : Oracle D2K Interview Questions and Answers.

3 : Forms Reports Interview Questions and Answers.

4 : Oracle AOL Interview Questions and Answers.

5 : Database Management Interview Questions and Answers.

6 : Oracle DB Optimization Interview Questions and Answers.

7 : SQL Plus Interview Questions and Answers.

8 : Oracle Developer Interview Questions and Answers.

9 : Oracle Database Interview Questions and Answers.

10 : Oracle Scenarios Interview Questions and Answers.

Follow us on FaceBook
www.facebook.com/InterviewQuestionsAnswers.Org

Follow us on Twitter
https://twitter.com/InterviewQA

For any inquiry please do not hesitate to contact us.

Interview Questions Answers.ORG Team


https://InterviewQuestionsAnswers.ORG/
support@InterviewQuestionsAnswers.ORG

You might also like