Interview Qns With Unix

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Oracle Interview Questions

 How much experience do you have with Oracle?

 Have you ever installed a new release of Oracle? What version and on what OS?

 What is the SGA and what is contained in it?


o System Global Area
o Contains the data block buffers, redo log buffers, shared SQL pool
 Data block buffer cache – data read from database
 Redo log buffers – changes made to the database
 Shared SQL pool - data dictionary cache, library cache (SQL statements)

 Name the main Oracle Background processes and what they do?
o SMON – performs instance recovery as needed, cleans up objects no longer needed
o PMON – cleans up failed user processes, frees up the resources
o DBWR – writes changed blocks from the SGA to the data files
o LGWR – writes redo log buffer contents to the redo log data files
o CKPT (optional) - causes DBWR to write to data files, and records checkpoint info
(timestamp) on the data file headers and the control files
o RECO (optional) – manages distributed databases
o ARCH (optional) – copies redo log file to an archive file

 What are rollback segments used for?


o Used to roll back a transaction and used for read consistency

 Backup – what is a cold backup and what is a hot backup?


o Cold backup
 Cold backup also referred to as an offline backup, is the backup performed while the database
is in a cold state (No Activity). To ensure consistency in the backup, the database needs to be
shutdown while performing this kind of backup.
Data files, Control Files, Redo Log Files and Parameter Files must be copied to offline storage
using the copy utility.
o Hot Backup
 Hot Backups are also referred to as online backups. This is the process of backing up a
database that is open.
Online Backups can only be performed if your system is running in an Archive Log Mode.
These modes of backups are recommended when the databases have to be highly available.
When a database is backed up in an online mode, the files are inconsistent and during the
recovery process, archive logs are applied to bring them to a consistent state.
The steps involved are
alter tablespace begin backup;
copy all data files of the tablespace to tape;
alter tablespace end backup

 What is a Database link?


o Used to reference data in another database (remote queries). The database link defines the db
service name, login name and password. The db service name must be identified in the local
tnsnames.ora file.

 What steps would you perform to recover from a disk failure on a data file?
o Restore data file from backup
o Roll forward using the redo logs (archive and current redo logs)

/conversion/tmp/scratch/43374783.docx Created on 04/01/2010


Oracle Interview Questions

 What are the two types of Oracle optimizers and how do they work?
o Cost-based optimizer
 The Cost Based Optimizer calculates the cost of different execution plans and then chooses the
plan with the lowest cost. To calculate the cost, the Cost Based Optimizer uses statistics
gathered when tables and/or indexes are analyzed.
o Rule-based optimizer
 The RULE Based Optimizer uses a strict set of rules to determine the plan.

 What is a Synonym and what is it used for?


o Synonym can be used to rename an object and allow users to access that object without
qualifying it with the owner.

 What is a Materialized view?


o Stores replicated data based on an underlying query. It is a “physical” view of data. May be
used to create a ‘view’ of data with tables pre-joined to improve performance. Materialized
views can be populated with incremental changes, instead of a complete refresh.

 What are Locally managed tablespaces?


o Extent management is handled within the tablespace itself. A bitmap in each datafile details
the free and used blocks in the datafile. The dictionary in Oracle is not maintained.

 What 3rd party tools have you used in your job as a DBA

 What was the most difficult technical obstacle you encountered in your job this past year?

 What parts of your job do you like most? What parts do you like least?

Unix questions:

1. Explain in as much detail as possible what the UNIX command chmod does:
2. If I’m unix user oracle and I own a file named “hello.world” and I execute “Chmod 754
hello.world”, what permissions have I set?
3. How would you show the permissions for all files in a directory?
4. Lets say you have two Oracle instances installed on a HPUX machine called Prod1 and Prod2, and
you want to set a unix login to automatically be set to log into the Prod2 instance. How would you
accomplish that?
5. What is the difference between a “fully qualified pathname” and a “relative” path name?
6. What is the difference between the unix commands “mv” and “cp” ?
7. How do you bring up the native UNIX help facility for the unix command “chown”?
8. A user calls you and wants you to end their database session, you use a tool such as OEM to end
their session, but its not going away and they want you to attempt to end the session more quickly
via UNIX, how do you go about that? After you’ve accomplished that,how do you verify via a
unix command line?

/conversion/tmp/scratch/43374783.docx Created on 04/01/2010

You might also like