Oracle DBA Interview Questions
Oracle DBA Interview Questions
What is OWB?
Oracle Warehouse Builder (OWB) is an information integration tool that leverages the Oracle Database
to transform data into high-quality information. The Oracle Database is a central component in the
Warehouse Builder architecture because the Database hosts the Warehouse Builder repository and the
code generated by Warehouse Builder.
What are the major components of warehouse builder?
Oracle Warehouse Builder(OWB) is composed of Design centre,Control center manager,target
schema,Warehouse builder repository,Repository browser,control center service.
What is OMB Plus?
OMB plus is a flexible, high-level command line metadata access tool for Oracle
Warehouse Builder. We use OMB Plus to create, modify, delete, and retrieve object metadata in
Warehouse Builder design and runtime repositories.
What is the Scriping language used to manipulate OWB?
OMB Plus is a scripting language used to manipulate object and runtime repositories of OWB.OMB Plus
is an extension TCL Programming language and hence has variable constructs,looping and control
structures.
Where are the SQL scripts located in OWB?
OWB scripts are installed at \owb\rtp\sql and are used for managing deployment jobs,execution
jobs,control centers from SQL*PLUS.
How do you launch OMBPlus at Unix Prompt?
We can alunch OMB plus at the unix prompt using
OWB_HOME/owb/bin/unix/OMBPlus.sh
How do you connect to a OWB repository from OMB Plus?
From OMB Plus console enter the following :
OMBCONNECT repos/password@host:port:service_name USE WORKSPACE
wokspace_name
What is ASM?
ASM is a Volume Manager and a file system for Oracle Database Files that supports single instance
Oracle Database and Oracle Real Application cluster (RAC) configuration.
What is the recommended storage management solution from Oracle?Why?
ASM is the recommended storage management solution from oracle as it provides an alternative to
conventional volume managers,file systems and raw devices.
How is datafile stored in ASM?
ASM uses disk groups to store data files.
What is an ASM disk group?
An ASM disk group is a group of disks that ASM manages as an unit.Within the diskgroups an file
system interface maintains the Oracle database files. ASM simplifies database storage by consolidating
disks into disk groups.This reduces I/O overhead.
How is the performance of disk group comparable to raw disks?/Are disk groups a good
alternative to raw disks?
The files distributed across the set of disks in a disk group are striped or distributed across the disks to
eliminate hot spots and improve performance.Thus they perform equally well as raw disks.
How does ASM eliminate downtime?
Disks can be added and removed from the disk groups online,(i.e)during the operation of the database
without any downtime. When disks are added or removed ASM automatically redistributes the contents
without any downtime.Thus ASM eliminates downtime.
Give details on server-based mirroring:-
This is a flexible option provided by ASM. The normal and redundant options of ASM provides two and
three way mirroring. We can use external option to enable RAID(Redundant Array Of Independent
Disks).
How does an ASM manage files?/How is the file management simplified using ASM?
ASM uses the Oracle Managed Files(OMF) feature which simplifies file management.Files are created at
specified location,renames files,deletes files when operations at tablespace level happens(say
tablespace deletion).
Give some interfaces used to manage ASM:-
Oracle Enterprise Manager(OEM),SQL*PLUS,ASMCMD command-line interface are some interfaces that
can be used with ASM.
Can ASM co-exist with non-ASM system:-
Yes,ASM can co-exist with non-ASM third-party file systems and thus can be integrated into pre-existing
environments.OEM has an interface for migrating non-ASM files to ASM.
What is an ASM instance?
An ASM instance is the instance that manages ASM disk groups. It composes of System Global
Area(SGA) and background processes. ASM instance mounts a disk group that is made available to the
database instance. An ASM instance manages the metadata of a disk group and provides file layout
information to the database instances.
Will the SGA(System Global Area) of ASM is comparable in size to an Oracle database
instance?
No.The SGA size of an ASM is smaller than that of an Oracle database instance,as an ASM performs
fewer tasks than a database.
Can ASM instance mount a database?
No.An ASM instance can mount a disk group that can be used by a database instance.
What is ASM metadata and where is it present?
ASM metadata is the information that ASM uses to control the disk group.It is present within a disk
group.
What is an ASM metadata composed of?
An ASM metadata includes the following:
1) The disks that belong to a disk group
2) Amount of space available within a disk group
3) The filenames of the files within a disk group
4) The location of disk group datafile data extents
5) A redo log that records information about automatically changing data blocks
What are the possible ASM configurations?
ASM and database instances share access to disks in a disk group.
1) There can be one ASM instance and one database instance serving single database in a node
2) There can be one ASM instance,multiple database instances serving many database in a node. If the
ASM instance fails,all the databases fails.The advantage is that this doesn't demand a Server
reboot(Operating system restart)
3) There can be clustered ASM instances that are clustered using Oracle Clusterware.(i.e)One ASM
instance on each node that are integrated using Oracle clusterware.
How does an ASM instance communicate with a database instance?
The ASM instance manages the metadata and provides space allocation for the ASM
files.When a database instance creates or opens an ASM file,it communicates those
requests to the ASM instance.In response the ASM instance provides the file extent map
information to the database instance
What is RAC?
RAC stands for Real Application cluster. It is a clustering solution from Oracle Corporation that ensures
high availability of databases by providing instance failover, media failover features.
Mention the Oracle RAC software components:-
Oracle RAC is composed of two or more database instances. They are composed of Memory structures
and background processes same as the single instance database.Oracle RAC instances use two
processes GES(Global Enqueue Service), GCS(Global Cache Service) that enable cache fusion.Oracle
RAC instances are composed of following background processes:
ACMS—Atomic Controlfile to Memory Service (ACMS)
GTX0-j—Global Transaction Process
LMON—Global Enqueue Service Monitor
LMD—Global Enqueue Service Daemon
LMS—Global Cache Service Process
LCK0—Instance Enqueue Process
RMSn—Oracle RAC Management Processes (RMSn)
RSMN—Remote Slave Monitor
What is GRD?
GRD stands for Global Resource Directory. The GES and GCS maintains records of the statuses of each
datafile and each cahed block using global resource directory.This process is referred to as cache fusion
and helps in data integrity.
Give Details on Cache Fusion:-
Oracle RAC is composed of two or more instances. When a block of data is read from datafile by an
instance within the cluster and another instance is in need of the same block,it is easy to get the block
image from the insatnce which has the block in its SGA rather than reading from the disk. To enable
inter instance communication Oracle RAC makes use of interconnects. The Global Enqueue
Service(GES) monitors and Instance enqueue process manages the cahce fusion. Give Details on
ACMS:-
ACMS stands for Atomic Controlfile Memory Service.In an Oracle RAC environment ACMS is an agent
that ensures a distributed SGA memory update(ie)SGA updates are globally committed on success or
globally aborted in event of a failure.
Give details on GTX0-j :-
The process provides transparent support for XA global transactions in a RAC environment.The
database autotunes the number of these processes based on the workload of XA global transactions.
Give details on LMON:-
This process monitors global enques and resources across the cluster and performs global enqueue
recovery operations.This is called as Global Enqueue Service Monitor.
Give details on LMD:-
This process is called as global enqueue service daemon. This process manages incoming remote
resource requests within each instance.
Give details on LMS:-
This process is called as Global Cache service process.This process maintains statuses of datafiles and
each cahed block by recording information in a Global Resource Dectory(GRD).This process also
controls the flow of messages to remote instances and manages global data block access and
transmits block images between the buffer caches of different instances.This processing is a part of
cache fusion feature.
Give details on LCK0:-
This process is called as Instance enqueue process.This process manages non-cache fusion resource
requests such as libry and row cache requests.
Give details on RMSn:-
This process is called as Oracle RAC management process.These pocesses perform managability tasks
for Oracle RAC.Tasks include creation of resources related Oracle RAC when new instances are added to
the cluster.
Give details on RSMN:-
This process is called as Remote Slave Monitor.This process manages background slave process
creation andd communication on remote instances. This is a background slave process.This process
performs tasks on behalf of a co-ordinating process running in another instance.
What components in RAC must reside in shared storage?
All datafiles, controlfiles, SPFIles, redo log files must reside on cluster-aware shred storage.
What is the significance of using cluster-aware shared storage in an Oracle RAC
environment?
All instances of an Oracle RAC can access all the datafiles,control files, SPFILE's, redolog files when
these files are hosted out of cluster-aware shared storage which are group of shared disks.
Give few examples for solutions that support cluster storage:-
ASM(automatic storage management),raw disk devices,network file system(NFS), OCFS2 and
OCFS(Oracle Cluster Fie systems).
What is an interconnect network?
an interconnect network is a private network that connects all of the servers in a cluster. The
interconnect network uses a switch/multiple switches that only the nodes in the cluster can access.
How can we configure the cluster interconnect?
Configure User Datagram Protocol(UDP) on Gigabit ethernet for cluster interconnect.On unia and linux
systems we use UDP and RDS(Reliable data socket) protocols to be used by Oracle
Clusterware.Windows clusters use the TCP protocol.
Can we use crossover cables with Oracle Clusterware interconnects?
No, crossover cables are not supported with Oracle Clusterware intercnects.
What is the use of cluster interconnect?
Cluster interconnect is used by the Cache fusion for inter instance communication.
How do users connect to database in an Oracle RAC environment?
Users can access a RAC database using a client/server configuration or through one or more middle
tiers ,with or without connection pooling.Users can use oracle services feature to connect to database.
What is the use of a service in Oracle RAC environemnt?
Applications should use the services feature to connect to the Oracle database.Services enable us to
define rules and characteristics to control how users and applications connect to database instances.
What are the characteriscs controlled by Oracle services feature?
The charateristics include a unique name, workload balancing and failover options,and high availability
characteristics.
Which enable the load balancing of applications in RAC?
Oracle Net Services enable the load balancing of application connections across all of the instances in
an Oracle RAC database.
What is a virtual IP address or VIP?
A virtl IP address or VIP is an alternate IP address that the client connectins use instead of the standard
public IP address. To configureVIP address, we need to reserve a spare IP address for each node, and
the IP addresses must use the same subnet as the public network.
What is the use of VIP?
If a node fails, then the node's VIP address fails over to another node on which the VIP address can
accept TCP connections but it cannot accept Oracle connections.
Give situations under which VIP address failover happens:-
VIP addresses failover happens when the node on which the VIP address runs fails, all interfaces for
the VIP address fails, all interfaces for the VIP address are disconnected from the network.
What is the significance of VIP address failover?
When a VIP address failover happens, Clients that attempt to connect to the VIP address receive a
rapid connection refused error .They don't have to wait for TCP connection timeout messages.
What are the administrative tools used for Oracle RAC environments?
Oracle RAC cluster can be administered as a single image using OEM(Enterprise
Manager),SQL*PLUS,Servercontrol(SRVCTL),clusterverificationutility(cvu),DBCA,NETCA
How do we verify that RAC instances are running?
Issue the following query from any one node connecting through SQL*PLUS.
$connect sys/sys as sysdba
SQL>select * from V$ACTIVE_INSTANCES;
The query gives the instance number under INST_NUMBER column,host_:instancename under
INST_NAME column.
What is FAN?
Fast application Notification as it abbreviates to FAN relates to the events related to instances,services
and nodes.This is a notification mechanism that Oracle RAc uses to notify other processes about the
configuration and service level information that includes service status changes such as,UP or DOWN
events.Applications can respond to FAN events and take immediate action.
Where can we apply FAN UP and DOWN events?
FAN UP and FAN DOWN events can be applied to instances,services and nodes.
State the use of FAN events in case of a cluster configuration change?
During times of cluster configuration changes,Oracle RAC high availability framework publishes a FAN
event immediately when a state change occurs in the cluster.So applications can receive FAN events
and react immediately.This prevents applications from polling database and detecting a problem after
such a state change.
Why should we have seperate homes for ASm instance?
It is a good practice to have ASM home seperate from the database hom(ORACLE_HOME).This helps in
upgrading and patching ASM and the Oracle database software independent of each other.Also,we can
deinstall the Oracle database software independent of the ASM instance.
What is the advantage of using ASM?
Having ASM is the Oracle recommended storage option for RAC databases as the ASM maximizes
performance by managing the storage configuration across the disks.ASM does this by distributing the
database file across all of the available storage within our cluster database environment.
What is rolling upgrade?
It is a new ASM feature from Database 11g.ASM instances in Oracle database 11g release(from 11.1)
can be upgraded or patched using rolling upgrade feature. This enables us to patch or upgrade ASM
nodes in a clustered environment without affecting database availability.During a rolling upgrade we
can maintain a functional cluster while one or more of the nodes in the cluster are running in different
software versions.
Can rolling upgrade be used to upgrade from 10g to 11g database?
No,it can be used only for Oracle database 11g releases(from 11.1).
State the initialization parameters that must have same value for every instance in an
Oracle RAC database:-
Some initialization parameters are critical at the database creation time and must have same
values.Their value must be specified in SPFILE or PFILE for every instance.The list of parameters that
must be identical on every instance are given below:
ACTIVE_INSTANCE_COUNT
ARCHIVE_LAG_TARGET
COMPATIBLE
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCE
CONTROL_FILES
DB_BLOCK_SIZE
DB_DOMAIN
DB_FILES
DB_NAME
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
DB_UNIQUE_NAME
INSTANCE_TYPE (RDBMS or ASM)
PARALLEL_MAX_SERVERS
REMOTE_LOGIN_PASSWORD_FILE
UNDO_MANAGEMENT
Can the DML_LOCKS and RESULT_CACHE_MAX_SIZE be identical on all instances?
These parameters can be identical on all instances only if these parameter values are set to zero.
What two parameters must be set at the time of starting up an ASM instance in a RAC
environment?The parameters CLUSTER_DATABASE and INSTANCE_TYPE must be set.
Mention the components of Oracle clusterware:-
Oracle clusterware is made up of components like voting disk and Oracle Cluster Registry(OCR). What
is a CRS resource?
Oracle clusterware is used to manage high-availability operations in a cluster.Anything that Oracle
Clusterware manages is known as a CRS resource.Some examples of CRS resources are database,an
instance,a service,a listener,a VIP address,an application process etc.
What is the use of OCR?
Oracle clusterware manages CRS resources based on the configuration information of CRS resources
stored in OCR(Oracle Cluster Registry).
How does a Oracle Clusterware manage CRS resources?
Oracle clusterware manages CRS resources based on the configuration information of CRS resources
stored in OCR(Oracle Cluster Registry).
Name some Oracle clusterware tools and their uses?
OIFCFG - allocating and deallocating network interfaces
OCRCONFIG - Command-line tool for managing Oracle Cluster Registry
OCRDUMP - Identify the interconnect being used
CVU - Cluster verification utility to get status of CRS resources
What are the modes of deleting instances from ORacle Real Application cluster Databases?
We can delete instances using silent mode or interactive mode using DBCA(Database Configuration
Assistant).
How do we remove ASM from a Oracle RAC environment?
We need to stop and delete the instance in the node first in interactive or silent mode.After that asm
can be removed using srvctl tool as follows:
srvctl stop asm -n node_name
srvctl remove asm -n node_name
We can verify if ASM has been removed by issuing the following command:
srvctl config asm -n node_name
How do we verify that an instance has been removed from OCR after deleting an instance?
Issue the following srvctl command:
srvctl config database -d database_name
cd CRS_HOME/bin
./crs_stat
How do we verify an existing current backup of OCR?
We can verify the current backup of OCR using the following command : ocrconfig -showbackup
What are the performance views in an Oracle RAC environment?
We have v$ views that are instance specific. In addition we have GV$ views called as global views that
has an INST_ID column of numeric data type.GV$ views obtain information from individual V$ views.
What are the types of connection load-balancing?
There are two types of connection load-balancing:server-side load balancing and client-side load
balancing.
What is the differnece between server-side and client-side connection load balancing?
Client-side balancing happens at client side where load balancing is done using listener.In case of
server-side load balancing listener uses a load-balancing advisory to redirect connections to the
instance providing best service.
Give the usage of srvctl:-
srvctl start instance -d db_name -i "inst_name_list" [-o start_options]srvctl stop instance -d name -i
"inst_name_list" [-o stop_options]srvctl stop instance -d orcl -i "orcl3,orcl4" -o immediatesrvctl start
database -d name [-o start_options]srvctl stop database -d name [-o stop_options]srvctl start database
-d orcl -o mount
What is a SAN ?
A storage area network (SAN) is a specialized high-speed network of storage devices and computer
systems (also referred to as servers, hosts, or host servers).
Currently,most SANs use the Fibre Channel protocol.
A storage area network presents shared pools of storage devices to multiple servers.
Each server can access the storage as if it were directly attached to that server. The SAN makes it
possible to move data between various storage devices, share data between multiple servers, and back
up and restore data rapidly and efficiently.
In addition, a properly configured SAN provides robust security, which facilitates both disaster recovery
and business continuance.
Components of a SAN can be grouped closely together in a single room or connected over long
distances.
This makes SAN a feasible solution for businesses of any size: the SAN can grow easily with the
business it supports.
What are the components of SAN(storage area network)?/List the SAN (storage area
network)Components:-
SAN(storage area network)is made of the following components :
1. SAN Switches
2. Fabric
3. Connections:HBA(Host Bus Adapters and Controllers)
SAN Switches :
Specialized switches called SAN switches are at the heart of the typical SAN. Switches provide
capabilities to match the number of host SAN connections to the number of connections provided by
the storage array.Switches also provide path redundancy in the event of a path failure from host server
to switch or from storage array to switch.
Fabric :
When one or more SAN switches are connected, a fabric is created.
The fabric is the actual network portion of the SAN. A special communications
protocol called Fibre Channel (FC) is used to communicate over the entire
network. Multiple fabrics may be interconnected in a single SAN, and even for a simple SAN it is not
unusual to be composed of two fabrics for redundancy.