Sie sind auf Seite 1von 9

1 .

Explain the difference between a hot backup and a cold backup and the benefits
associated with each .
A hot backup is basically taking a backup of the database while it is still up and running and
it must be in archive log mode. A cold backup is taking a backup of the database while it is
shut down and does not require being in archive log mode. The benefit of taking a hot
backup is that the database is still available for use while the backup is occurring and you
can recover the database to any point in time. The benefit of taking a cold backup is that it
is typically easier to administer the backup and recovery process. In addition, since you are
taking cold backups the database does not require being in archive log mode and thus there
will be a slight performance gain as the database is not cutting archive logs to disk .
2 . ou have !ust had to restore from backup and do not have any control files. "ow would
you go about bringing up this database ?
I would create a text based backup control file, stipulating where on disk all the data files
where and then issue the recover command with the using backup control file clause .
3 . "ow do you switch from an init.ora file to a spfile ?
Issue the create spfile from pfile command .
4 . Explain the difference between a data block, an extent and a segment .
A data block is the smallest unit of logical storage for a database ob!ect. As ob!ects grow
they take chunks of additional storage that are composed of contiguous data blocks. These
groupings of contiguous data blocks are called extents. All the extents that an ob!ect takes
when grouped together are considered the segment of the database ob!ect .
5 . #ive two examples of how you might determine the structure of the table $E%T .
&se the describe command or use the dbms'metadata.get'ddl package .
6 . (here would you look for errors from the database engine ?
In the alert log .
7 . )ompare and contrast T*&+)ATE and $E,ETE for a table .
-oth the truncate and delete command have the desired outcome of getting rid of all the
rows in a table. The difference between the two is that the truncate command is a $$,
operation and !ust moves the high water mark and produces a now rollback. The delete
command, on the other hand, is a $., operation, which will produce a rollback and thus
take longer to complete .
8 . #ive the reasoning behind using an index .
/aster access to data blocks in a table .
9 . #ive the two types of tables involved in producing a star schema and the type of data
they hold .
/act tables and dimension tables. A fact table contains measurements while dimension
tables will contain data that will help describe the fact tables .
10 . . (hat type of index should you use on a fact table ?
A -itmap index .
11 . #ive two examples of referential integrity constraints .
A primary key and a foreign key .
12 . A table is classified as a parent table and you want to drop and re0create it. "ow would
you do this without affecting the children tables ?
$isable the foreign key constraint to the parent, drop the table, re0create the table,
enable the foreign key constraint .
13 . Explain the difference between A*)"I1E,2# mode and +2A*)"I1E,2# mode and the
benefits and disadvantages to each .
A*)"I1E,2# mode is a mode that you can put the database in for creating a backup of all
transactions that have occurred in the database so that you can recover to any point in
time. +2A*)"I1E,2# mode is basically the absence of A*)"I1E,2# mode and has the
disadvantage of not being able to recover to any point in time. +2A*)"I1E,2# mode does
have the advantage of not having to write transactions to an archive log and thus increases
the performance of the database slightly .
14 . (hat command would you use to create a backup control file ?
Alter database backup control file to trace .
15 . #ive the stages of instance startup to a usable state where normal users may access it .
3TA*T&% +2.2&+T 0 Instance startup
3TA*T&% .2&+T 0 The database is mounted
3TA*T&% 2%E+ 0 The database is opened
16 . (hat column differentiates the 14 views to the #14 views and how ?
The I+3T'I$ column which indicates the instance in a *A) environment the information
came from .
17 . "ow would you go about generating an E5%,AI+ plan ?
)reate a plan table with utlxplan.sql .
&se the explain plan set statement'id 6 7tst87 into plan'table for a 39, statement
,ook at the explain plan with utlxplp.sql or utlxpls.sql
18 . "ow would you go about increasing the buffer cache hit ratio ?
&se the buffer cache advisory over a given workload and then query the v4db'cache'advice
table. If a change was necessary then I would use the alter system set db'cache'si:e
command .
19 . Explain an 2*A0;8<<<
ou get this error when you get a snapshot too old within rollback. It can usually be solved
by increasing the undo retention or increasing the si:e of rollbacks. ou should also look at
the logic involved in the application getting the error message .
20 . Explain the difference between 42*A),E'"2.E and 42*A),E'-A3E .
2*A),E'-A3E is the root directory for oracle. 2*A),E'"2.E located beneath
2*A),E'-A3E is where the oracle products reside .
(ell, we have gone through the first =< questions as I would answer them during an
interview. %lease feel free to add your personal experiences to the answers as it will always
improve the process and add your particular touch. As always remember these are >core>
$-A questions and not necessarily related to the 2racle options that you may encounter in
some interviews. Take a close look at the requirements for any !ob and try to come up with
questions that the interviewer may ask. +ext time we will tackle the rest of the questions.
&ntil then, good luck with the process .
I promised the second part of this a couple of weeks ago. (ell here it is .
Again this is an article I put together a while back but still get quite a bit of email in its
regard. 3o thought it might be of interest to the readers at ITtoolbox .
The 2racle Technical Interview can be quite daunting. ou never quite know what to study
for and how to prepare. I am fully aware of this, as I have received many emails since my
original article on interview questions was released. (hile these questions are only
guidelines as to what should and more than likely will be asked, I hope that you find some
comfort in the review of them. As always, do not !ust memori:e the answers, as there are
!ewels to be found in the quest of figuring out the answer from the question. As always,
remember that as you go through the article, it is not enough to know the answer to a
particular question? you must try to put yourself in an interview situation and experience
answering the question for yourself. Therefore, after you have gone through the questions
and answers read the question again and then answer it with your own words. As always,
good luck, and cheers .
Technical 0 2racle
,ast time, we answered questions 8 thru =; of the technical part of the interview. "ere are
the next @; in this section. $epending on the mood of the interview and your ability to
elaborate on the answer, try to give some insight that you know more than !ust the simple
answer to some of these questions. Also, be sensitive to the interviewer getting tired of you
talking too much. (ell here they are .
21 . "ow would you determine the time :one under which a database was operating ?
select $-TI.EA2+E from dual ;
22 . Explain the use of setting #,2-A,'+A.E3 equal to T*&E .
3etting #,2-A,'+A.E3 dictates how you might connect to a database. This variable is
either T*&E or /A,3E and if it is set to T*&E it enforces database links to have the same
name as the remote database to which they are linking .
23 . (hat command would you use to encrypt a %,B39, application ?
(*A%
24 . Explain the difference between a /&+)TI2+, %*2)E$&*E and %A)CA#E .
A function and procedure are the same in that they are intended to be a collection of
%,B39, code that carries a single task. (hile a procedure does not have to return any
values to the calling application, a function will return a single value. A package on the
other hand is a collection of functions and procedures that are grouped together based on
their commonality to a business function or application .
25 . Explain the use of table functions .
Table functions are designed to return a set of rows through %,B39, logic but are intended
to be used as a normal table or view in a 39, statement. They are also used to pipeline
information in an ET, process .
26 . +ame three advisory statistics you can collect .
-uffer )ache Advice, 3egment ,evel 3tatistics, D Timed 3tatistics
27 . (here in the 2racle directory tree structure are audit traces placed ?
In unix 42*A),E'"2.EBrdbmsBaudit, in (indows the event viewer
28 . Explain materiali:ed views and how they are used .
.ateriali:ed views are ob!ects that are reduced sets of information that have been
summari:ed, grouped, or aggregated from base tables. They are typically used in data
warehouse or decision support systems .
29 . (hen a user process fails, what background process cleans up after it ?
%.2+
30 . (hat background process refreshes materiali:ed views ?
The Eob 9ueue %rocesses .
31 . "ow would you determine what sessions are connected and what resources they are
waiting for ?
&se of 143E33I2+ and 143E33I2+'(AIT
32 . $escribe what redo logs are .
*edo logs are logical and physical structures that are designed to hold all the changes made
to a database and are intended to aid in the recovery of a database .
33 . "ow would you force a log switch ?
A,TE* 33TE. 3(IT)" ,2#/I,E ;
34 . #ive two methods you could use to determine what $$, changes have been made .
ou could use ,ogminer or 3treams
35 . (hat does coalescing a tablespace do ?
)oalescing is only valid for dictionary0managed tablespaces and de0fragments space by
combining neighboring free extents into large single extents .
36 . (hat is the difference between a TE.%2*A* tablespace and a %E*.A+E+T
tablespace ?
A temporary tablespace is used for temporary ob!ects such as sort structures while
permanent tablespaces are used to store those ob!ects meant to be used as the true
ob!ects of the database .
37 . +ame a tablespace automatically created when you create a database .
The 33TE. tablespace .
38 . (hen creating a user, what permissions must you grant to allow them to connect to the
database ?
#rant the )2++E)T to the user .
39 . "ow do you add a data file to a tablespace ?
A,TE* TA-,E3%A)E A$$ $ATA/I,E 3IAE
40 . "ow do you resi:e a data file ?
A,TE* $ATA-A3E $ATA/I,E *E3IAE ;
41 . (hat view would you use to look at the si:e of a data file ?
$-A'$ATA'/I,E3
42 . (hat view would you use to determine free space in a tablespace ?
$-A'/*EE'3%A)E
43 . "ow would you determine who has added a row to a table ?
Turn on fine grain auditing for the table .
44 . "ow can you rebuild an index ?
A,TE* I+$E5 *E-&I,$ ;
45 . Explain what partitioning is and what its benefit is .
%artitioning is a method of taking large tables and indexes and splitting them into smaller,
more manageable pieces .
46 . ou have !ust compiled a %,B39, package but got errors, how would you view the
errors ?
3"2( E**2*3
47 . "ow can you gather statistics on a table ?
The A+A,AE command .
48 . "ow can you enable a trace for a session ?
&se the $-.3'3E33I2+.3ET'39,'T*A)E or
&se A,TE* 3E33I2+ 3ET 39,'T*A)E 6 T*&E ;
49 . (hat is the difference between the 39,F,oader and I.%2*T utilities ?
These two 2racle utilities are used for loading data into the database. The difference is
that the import utility relies on the data being produced by another 2racle utility E5%2*T
while the 39,F,oader utility allows data to be loaded that has been produced by other
utilities from different data sources !ust so long as it conforms to A3)II formatted or
delimited files .
50 . +ame two files used for network connection to a database .
T+3+A.E3.2*A and 39,+ET.2*A
Technical 0 &+I5
Every $-A should know something about the operating system that the database will be
running on. The questions here are related to &+I5 but you should equally be able to
answer questions related to common (indows environments .
1 . "ow do you list the files in an &+I5 directory while also showing hidden files ?
ls 0ltra
2 . "ow do you execute a &+I5 command in the background ?
&se the "&"
3 . (hat &+I5 command will control the default file permissions when files are created ?
&mask
4 . Explain the read, write, and execute permissions on a &+I5 directory .
*ead allows you to see and list the directory contents .
(rite allows you to create, edit and delete files and subdirectories in the directory .
Execute gives you the previous readBwrite permissions plus allows you to change into the
directory and execute programs or shells from the directory .
5 . the difference between a soft link and a hard link ?
A symbolic GsoftH linked file and the targeted file can be located on the same or different
file system while for a hard link they must be located on the same file system .
6 . #ive the command to display space usage on the &+I5 file system .
df 0lk
7 . Explain iostat, vmstat and netstat .
Iostat reports on terminal, disk and tape IB2 activity .
1mstat reports on virtual memory statistics for processes, disk, tape and )%& activity .
+etstat reports on the contents of network data structures .
8 . "ow would you change all occurrences of a value using 1I ?
&se IJsBBBg
9 . #ive two &+I5 kernel parameters that effect an 2racle install
3"..A5 D 3"..+I
10 . -riefly, how do you install 2racle software on &+I5 .
-asically, set up disks, kernel parameters, and run orainst .
I hope that these interview questions were not too hard. *emember these are >core> $-A
questions and not necessarily related to the 2racle options that you may encounter in some
interviews. Take a close look at the requirements for any !ob and try to extract questions
that interviewers may ask from manuals and real life experiences. /or instance, if they are
looking for a $-A to run their databases in *A) environments, you should try to determine
what hardware and software they are using -E/2*E you get to the interview. This would
allow you to brush up on particular environments and not be caught off0guard. #ood luck !
1. Which types of backups you can take in Oracle?
2. A database is running in NOARCH!"#O$ %ode then &hich type of backups you
can take?
'. Can you take partial backups if the (atabase is running in NOARCH!"#O$
%ode?
). Can you take Online *ackups if the the database is running in NOARCH!"#O$
%ode?
+. Ho& do you bring the database in ARCH!"#O$ %ode fro% NOARCH!"#O$
%ode?
,. -ou cannot shutdo&n the database for e.en so%e %inutes/ then in &hich %ode you
should run
the database?
0. Where should you place Archi.e logfiles/ in the sa%e disk &here (* is or another
disk?
1. Can you take online backup of a Control file if yes/ ho&?
2. What is a #ogical *ackup?
13. 4hould you take the backup of #ogfiles if the database is running in
ARCH!"#O$ %ode?
11. Why do you take tablespaces in *ackup %ode?
12. What is the ad.antage of R5AN utility?
1'. Ho& R5AN i%pro.es backup ti%e?
1). Can you take Offline backups using R5AN?
1+. Ho& do you see infor%ation about backups in R5AN?
1,. What is a Reco.ery Catalog?
10. 4hould you place Reco.ery Catalog in the 4a%e (*?
11. Can you use R5AN &ithout Reco.ery catalog?
12. Can you take %age *ackups using R5AN?
23. Can you use *ackupsets created by R5AN &ith any other utility?
21. Where R5AN keeps infor%ation of backups if you are using R5AN
&ithout Catalog?
22. -ou ha.e taken a %anual backup of a datafile using o6s. Ho& R5AN &ill kno&
about it?
2'. -ou &ant to retain only last ' backups of datafiles. Ho& do you go for it in
R5AN?
2). Which is %ore efficient ncre%ental *ackups using R5AN or ncre%ental
"7port?
2+. Can you start and shutdo&n (* using R5AN?
2,. Ho& do you reco.er fro% the loss of datafile if the (* is running in
NOARCH!"#O$ %ode?
20. -ou loss one datafile and it does not contain i%portant ob8ects. 9he i%portant
ob8ects are there in other datafiles &hich are intact. Ho& do you proceed in this
situation?
21. -ou lost so%e datafiles and you don:t ha.e any full backup and the database &as
running in NOARCH!"#O$ %ode. What you can do no&?
22. Ho& do you reco.er fro% the loss of datafile if the (* is running in
ARCH!"#O$ %ode?
'3. -ou loss one datafile and (* is running in ARCH!"#O$ %ode. -ou ha.e full
database backup of 1 &eek old and partial backup of this datafile &hich is 8ust 1 day
old. ;ro% &hich backup should you restore this file?
'1. -ou loss controlfile ho& do you reco.er fro% this?
'2. 9he current logfile gets da%aged. What you can do no&?
''. What is a Co%plete Reco.ery?
'). What is Cancel *ased/ 9i%e based and Change *ased Reco.ery?
'+. 4o%e user has accidentally dropped one table and you reali<e this after t&o days.
Can you reco.er this table if the (* is running in ARCH!"#O$ %ode?
',. (o you ha.e to restore (atafiles %anually fro% backups if you are doing reco.ery
using R5AN?
'0. A database is running in ARCH!"#O$ %ode since last one %onth. A datafile is
added to the database last &eek. 5any ob8ects are created in this datafile. After one
&eek this datafile gets da%aged before you can take any backup. No& can you
reco.er this datafile &hen you don:t ha.e any backups?
'1. Ho& do you reco.er fro% the loss of a controlfile if you ha.e backup of
controlfile?
'2. Only so%e blocks are da%aged in a datafile. Can you 8ust reco.er these blocks if
you are using R5AN?
)3. 4o%e datafiles &ere there on a secondary disk and that disk has beco%e da%aged
and it &ill take so%e days to get a ne& disk. Ho& &ill you reco.er fro% this
situation?
)1. Ha.e you faced any e%ergency situation. 9ell us ho& you resol.ed it?
)2. At one ti%e you lost para%eter file accidentally and you don:t ha.e any backup.
Ho& you &ill recreate a ne& para%eter file &ith the para%eters set to pre.ious
.alues.

Das könnte Ihnen auch gefallen