Sunteți pe pagina 1din 305

1. What are the components of Physical database structure of Oracle Database?

ORACLE database is comprised of three types of files. One or more Data files, two are
more Redo Log files, and one or more Control files.
2. What are the components of Logical database structure of ORACLE database?
Tablespaces and the Database's Schema Objects.
3. What is a Tablespace?
A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to
grouped related logical structures together.
4. What is SYSTEM tablespace and When is it Created?
Every ORACLE database contains a tablespace named SYSTEM, which is automatically
created when the database is created. The SYSTEM tablespace always contains the data
dictionary tables for the entire database.
5. Explain the relationship among Database, Tablespace and Data file.
Each databases logically divided into one or more tablespaces One or more data files are
explicitly created for each tablespace.
6. What is schema?
A schema is collection of database objects of a User.
7. What are Schema Objects ?
Schema objects are the logical structures that directly refer to the database's data. Schema
objects include tables,views,sequences,synonyms, indexes, clusters, database triggers,
procedures, functions packages and database links.
8. Can objects of the same Schema reside in different tablespaces.?
Yes.
9. Can a Tablespace hold objects from different Schemes ?
Yes.
10. what is Table ?
A table is the basic unit of data storage in an ORACLE database. The tables of a database
hold all of the user accessible data. Table data is stored in rows and columns.
11. What is a View ?
A view is a virtual table. Every view has a Query attached to it. (The Query is a SELECT
statement that identifies the columns and rows of the table(s) the view uses.)
12. Do View contain Data ?
Views do not contain or store data.
13. Can a View based on another View ?

Yes.
14. What are the advantages of Views ?
Provide an additional level of table security, by restricting access to a predetermined set of
rows and columns of a table.Hide data complexity.Simplify commands for the
user.Present the data in a different perpecetive from that of the base table.Store complex
queries.
15. What is a Sequence ?
A sequence generates a serial list of unique numbers for numerical columns of a database's
tables.
16. What is a Synonym ?
A synonym is an alias for a table, view,sequence or program unit.
17. What are the type of Synonyms ?
There are two types of Synonyms Private and Public.
18. What is a Private Synonyms ?
A Private Synonyms can be accessed only by the owner.
19. What is a Public Synonyms ?
A Public synonyms can be accessed by any user on the database.
20. What are synonyms used for ?
Synonyms are used to : Mask the real name and owner of an object.Provide public access
to an objectProvide location transparency for tables,views or program units of a remote
database.Simplify the SQL statements for database users.
21. What is an Index ?
An Index is an optional structure associated with a table to have direct access to
rows,which can be created to increase the performance of data retrieval. Index can be
created on one or more columns of a table.
22. How are Indexes Update ?
Indexes are automatically maintained and used by ORACLE. Changes to table data are
automatically incorporated into all relevant indexes.
23. What are Clusters ?
Clusters are groups of one or more tables physically stores together to share common
columns and are often used together.
24. What is cluster Key ?
The related columns of the tables in a cluster is called the Cluster Key.
25. What is Index Cluster ?
A Cluster with an index on the Cluster Key.
26. What is Hash Cluster ?

A row is stored in a hash cluster based on the result of applying a hash function to the row's
cluster key value. All rows with the same hash key value are stores together on disk.
27. When can Hash Cluster used ?
Hash clusters are better choice when a table is often queried with equality queries. For such
queries the specified cluster key value is hashed. The resulting hash key value points
directly to the area on disk that stores the specified rows.
28. What is Database Link ?
A database link is a named object that describes a "path" from one database to another.
29. What are the types of Database Links?
Private Database Link, Public Database Link & Network Database Link.
30. What is Private Database Link?
Private database link is created on behalf of a specific user. A private database link can be
used only when the owner of the link specifies a global object name in a SQL statement or
in the definition of the owner's views or procedures.
31. What is Public Database Link?
Public database link is created for the special user group PUBLIC. A public database link
can be used when any user in the associated database specifies a global object name in a
SQL statement or object definition.
32. What is Network Database link?
Network database link is created and managed by a network domain service. A network
database link can be used when any user of any database in the network specifies a global
object name in a SQL statement or object definition.
33. What is Data Block?
ORACLE database's data is stored in data blocks. One data block corresponds to a specific
number of bytes of physical database space on disk.
34. How to define Data Block size?
A data block size is specified for each ORACLE database when the database is created. A
database users and allocated free database space in ORACLE datablocks. Block size is
specified in INIT.ORA file and cann't be changed latter.
35. What is Row Chaining?
In Circumstances, all of the data for a row in a table may not be able to fit in the same data
block. When this occurs, the data for the row is stored in a chain of data block (one or
more) reserved for that segment.
36. What is an Extent?
An Extent is a specific number of contiguous data blocks, obtained in a single allocation,
used to store a specific type of information.

37. What is a Segment?


A segment is a set of extents allocated for a certain logical structure.
38. What are the different types of Segments?
Data Segment, Index Segment, Rollback Segment and Temporary Segment.
39. What is a Data Segment?
Each Non-clustered table has a data segment. All of the table's data is stored in the extents
of its data segment. Each cluster has a data segment. The data of every table in the cluster is
stored in the cluster's data segment.
40. What is an Index Segment?
Each Index has an Index segment that stores all of its data.
41. What is Rollback Segment?
A Database contains one or more Rollback Segments to temporarily store "undo"
information.
42. What are the uses of Rollback Segment?
Rollback Segments are used:To generate read-consistent database information during
database recovery to rollback uncommitted transactions for users.
43. What is a Temporary Segment?
Temporary segments are created by ORACLE when a SQL statement needs a temporary
work area to complete execution. When the statement finishes execution, the temporary
segment extents are released to the system for future use.
44. What is a Data File?
Every ORACLE database has one or more physical data files. A database's data files
contain all the database data. The data of logical database structures such as tables and
indexes is physically stored in the data files allocated for a database.
45. What are the Characteristics of Data Files?
A data file can be associated with only one database.Once created a data file can't change
size.One or more data files form a logical unit of database storage called a tablespace.
46. What is a Redo Log?
The set of Redo Log files for a database is collectively known as the database's redo log.
47. What is the function of Redo Log?
The Primary function of the redo log is to record all changes made to data.
48. What is the use of Redo Log Information?
The Information in a redo log file is used only to recover the database from a system or
media failure the prevents database data from being written to a database's data files.
49. What does a Control file Contain?
A Control file records the physical structure of the database. It contains the following

information.Database NameNames and locations of a database's files and redolog


files.Time stamp of database creation.
50. What is the use of Control File?
When an instance of an ORACLE database is started, its control file is used to identify the
database and redo log files that must be opened for database operation to proceed. It is also
used in database recovery.
51. What is a Data Dictionary?
The data dictionary of an ORACLE database is a set of tables and views that are used as a
read-only reference about the database.It stores information about both the logical and
physical structure of the database, the valid users of an ORACLE database, integrity
constraints defined for tables in the database and space allocated for a schema object and
how much of it is being used.
52. What is an Integrity Constrains?
An integrity constraint is a declarative way to define a business rule for a column of a
table.
53. Can an Integrity Constraint be enforced on a table if some existing table data does not
satisfy the constraint?
No.
54. Describe the different type of Integrity Constraints supported by ORACLE?
NOT NULL Constraint - Disallows NULLs in a table's column.UNIQUE Constraint Disallows duplicate values in a column or set of columns.PRIMARY KEY Constraint Disallows duplicate values and NULLs in a column or set of columns.FOREIGN KEY
Constrain - Require each value in a column or set of columns match a value in a related
table's UNIQUE or PRIMARY KEY.CHECK Constraint - Disallows values that do not
satisfy the logical expression of the constraint.
55. What is difference between UNIQUE constraint and PRIMARY KEY constraint?
A column defined as UNIQUE can contain NULLs while a column defined as PRIMARY
KEY can't contain Nulls.
56. Describe Referential Integrity?
A rule defined on a column (or set of columns) in one table that allows the insert or update
of a row only if the value for the column or set of columns (the dependent value) matches a
value in a column of a related table (the referenced value). It also specifies the type of data
manipulation allowed on referenced data and the action to be performed on dependent data
as a result of any action on referenced data.
57. What are the Referential actions supported by FOREIGN KEY integrity constraint?
UPDATE and DELETE Restrict - A referential integrity rule that disallows the update or
deletion of referenced data.DELETE Cascade - When a referenced row is deleted all
associated dependent rows are deleted.
58. What is self-referential integrity constraint?

If a foreign key reference a parent key of the same table is called self-referential integrity
constraint.
59. What are the Limitations of a CHECK Constraint?
The condition must be a Boolean expression evaluated using the values in the row being
inserted or updated and can't contain subqueries, sequence, the SYSDATE,UID,USER or
USERENV SQL functions, or the pseudocolumns LEVEL or ROWNUM.
60. What is the maximum number of CHECK constraints that can be defined on a column?
No Limit.

1) What is ASM?
In Oracle Database 10g/11g there are two types of instances: database and ASM instances. The
ASM instance, which is generally named +ASM, is started with the INSTANCE_TYPE=ASM
init.ora parameter. This parameter, when set, signals the Oracle initialization routine to start an
ASM instance and not a standard database instance. Unlike the standard database instance, the
ASM instance contains no physical files; such as logfiles, controlfiles or datafiles, and only
requires a few init.ora parameters for startup.
Upon startup, an ASM instance will spawn all the basic background processes, plus some new
ones that are specific to the operation of ASM. The STARTUP clauses for ASM instances are
similar to those for database instances. For example, RESTRICT prevents database instances
from connecting to this ASM instance. NOMOUNT starts up an ASM instance without mounting
any disk group. MOUNT option simply mounts all defined diskgroups
For RAC configurations, the ASM SID is +ASMx instance, where x represents the instance
number.
2) What are the key benefits of ASM?
ASM provides filesystem and volume manager capabilities built into the Oracle database kernel.
Withthis capability, ASM simplifies storage management tasks, such as creating/laying out
databases and disk space management. Since ASM allows disk management to be done using
familiar create/alter/drop SQL statements, DBAs do not need to learn a new skill set or make
crucial decisions on provisioning.
The following are some key benefits of ASM:

ASM spreads I/O evenly across all available disk drives to prevent hot spots and
maximize performance.

ASM eliminates the need for over provisioning and maximizes storage resource
utilization facilitating database consolidation.
Inherent large file support.
Performs automatic online redistribution after the incremental addition or removal of
storage capacity.
Maintains redundant copies of data to provide high availability, or leverages 3rd party
RAID functionality.
Supports Oracle Database as well as Oracle Real Application Clusters (RAC).
Capable of leveraging 3rd party multipathing technologies.
For simplicity and easier migration to ASM, an Oracle database can contain ASM and
non-ASM files.
Any new files can be created as ASM files whilst existing files can also be migrated to
ASM.
RMAN commands enable non-ASM managed files to be relocated to an ASM disk group.
Enterprise Manager Database Control or Grid Control can be used to manage ASM disk
and file activities.

3) Describe about ASM architecture.


Automatic Storage Management (ASM) instance
Instance that manages the diskgroup metadata
Disk Groups
Logcal grouping of disks
Determines file mirroring options
ASM Disks
LUNs presented to ASM
ASM Files
Files that are stored in ASM disk groups are called ASM files, this includes database files

Notes:
Many databases can connect as clients to single ASM instances
ASM instance name should only be +ASM only
One diskgroup can serve many databases
4) How does database connects to ASM Instance?
The database communicates with ASM instance using the ASMB (umblicus process) process.
Once the database obtains the necessary extents from extent map, all database IO going forward
is processed through by the database processes, bypassing ASM. Thus we say ASM is not really
in the IO path. So, the question how do we make ASM go faster..you dont have to.
4) What init.ora parameters does a user need to configure for ASM instances?
The default parameter settings work perfectly for ASM. The only parameters needed for 11g
ASM:
PROCESSES*
ASM_DISKSTRING*
ASM_DISKGROUPS
INSTANCE_TYPE
5) How does the database interact with the ASM instance and how do I make ASM go
faster?

ASM is not in the I/O path so ASM does not impede the database file access. Since the RDBMS
instance is performing raw I/O, the I/O is as fast as possible.
6) Do I need to define the RDBMS FILESYSTEMIO_OPTIONS parameter when I use
ASM?
No. The RDBMS does I/O directly to the raw disk devices, the FILESYSTEMIO_OPTIONS
parameter is only for filesystems.
7) Why Oracle recommends two diskgroups?
Oracle recommends two diskgroups to provide a balance of manageability, utilization, and
performance.
8) We have a 16 TB database. Im curious about the number of disk groups we should use;
e.g. 1 large disk group, a couple of disk groups, or otherwise?
For VLDBs you will probably end up with different storage tiers; e.g with some of our large
customers they have Tier1 (RAID10 FC), Tier2 (RAID5 FC), Tier3 (SATA), etc. Each one of
these is mapped to a diskgroup.
9) We have a new app and dont know our access pattern, but assuming mostly sequential
access, what size would be a good AU fit?
For 11g ASM/RDBMS it is recommended to use 4MB ASM AU for disk groups. See Metalink
Note 810484.1
10) Would it be better to use BIGFILE tablespaces, or standard tablespaces for ASM?
The use of Bigfile tablespaces has no bearing on ASM (or vice versa). In fact most database
object related decisions are transparent to ASM.
11) What is the best LUN size for ASM?
There is no best size! In most cases the storage team will dictate to you based on their
standardized LUN size. The ASM administrator merely has to communicate the ASM Best
Practices and application characteristics to storage folks :
Need equally sized / performance LUNs
Minimum of 4 LUNs
The capacity requirement
The workload characteristic (random r/w, sequential r/w) & any response time SLA
Using this info , and their standards, the storage folks should build a nice LUN group set for you.
12) In 11g RAC we want to separate ASM admins from DBAs and create different users
and groups. How do we set this up?

For clarification
Separate Oracle Home for ASM and RDBMS.
RDBMS instance connects to ASM using OSDBA group of the ASM instance.
Thus, software owner for each RDBMS instance connecting to ASM must be
a member of ASMs OSDBA group.
Choose a different OSDBA group for ASM instance (asmdba) than for
RDBMS instance (dba)
In 11g, ASM administrator has to be member of a separate SYSASM group to
separate ASM Admin and DBAs.
13) Can my RDBMS and ASM instances run different versions?
Yes. ASM can be at a higher version or at lower version than its client databases. Theres two
components of compatiblity:
Software compatibility
Diskgroup compatibility attributes:
compatible.asm
compatible.rdbms
14) Where do I run my database listener from; i.e., ASM HOME or DB HOME?
It is recommended to run the listener from the ASM HOME. This is particularly important for
RAC env, since the listener is a node-level resource. In this config, you can create additional
[user] listeners from the database homes as needed.
15) How do I backup my ASM instance?
Not applicable! ASM has no files to backup, as its does not contain controlfile,redo logs etc.
16) When should I use RMAN and when should I use ASMCMD copy?

RMAN is the recommended and most complete and flexible method to backup and
transport database files in ASM.
ASMCMD copy is good for copying single files
Supports all Oracle file types
Can be used to instantiate a Data Guard environment
Does not update the controlfile
Does not create OMF files

17) Im going to do add disks to my ASM diskgroup, how long will this rebalance take?

Rebalance time is heavily driven by the three items:


1) Amount of data currently in the diskgroup
2) IO bandwidth available on the server
3) ASM_POWER_LIMIT or Rebalance Power Level

18) We are migrating to a new storage array. How do I move my ASM database from
storage A to storage B?
Given that the new and old storage are both visible to ASM, simply add the new disks to the
ASM disk group and drop the old disks. ASM rebalance will migrate data online.
Note 428681.1 covers how to move OCR/Voting disks to the new storage array
19) Is it possible to unplug an ASM disk group from one platform and plug into a server on
another platform (for example, from Solaris to Linux)?
No. Cross-platform disk group migration not supported. To move datafiles between endian-ness
platforms, you need to use XTTS, Datapump or Streams.
20) How does ASM work with multipathing software?
It works great! Multipathing software is at a layer lower than ASM, and thus is transparent.
You may need to adjust ASM_DISKSTRING to specify only the path to the multipathing pseudo
devices.
21) Is ASM constantly rebalancing to manage hot spots?
NoNoNope!! ASM provides even distribution of extents across all disks in a disk group.
Since each disk will equal number of extents, no single disk will be hotter than another. Thus the
answer NO, ASM does not dynamically move hot spots, because hot spots simply do not
occur in ASM configurations. Rebalance only occurs on storage configuration changes (e.g. add,
drop, or resize disks).
22) What are the file types that ASM support and keep in disk groups?
Control files
Flashback logs
Data Pump dump sets
Data files
DB SPFILE
Data Guard configuration
Temporary data files
RMAN backup sets
Change tracking bitmaps
Online redo logs
RMAN data file copies
OCR files

Archive logs
Transport data files
ASM SPFILE
23. List Key benefits of ASM?

Stripes files rather than logical volumes


Provides redundancy on a file basis
Enables online disk reconfiguration and dynamic rebalancing
Reduces the time significantly to resynchronize a transient failure by tracking changes
while disk is offline
Provides adjustable rebalancing speed
Is cluster-aware
Supports reading from mirrored copy instead of primary copy for extended clusters
Is automatically installed as part of the Grid Infrastructure

24. What is ASM Striping?


ASM can use variable size data extents to support larger files, reduce memory requirements, and
improve performance.
Each data extent resides on an individual disk.
Data extents consist of one or more allocation units.
The data extent size is:

Equal to AU for the first 20,000 extents (019999)


Equal to 4 AU for the next 20,000 extents (2000039999)
Equal to 16 AU for extents above 40,000

ASM stripes files using extents with a coarse method for load balancing or a fine method to
reduce latency.

Coarse-grained striping is always equal to the effective AU size.


Fine-grained striping is always equal to 128 KB.

26. How many ASM Diskgroups can be created under one ASM Instance?
ASM imposes the following limits:

63 disk groups in a storage system


10,000 ASM disks in a storage system
Two-terabyte maximum storage for each ASM disk (non-Exadata)
Four-petabyte maximum storage for each ASM disk (Exadata)
40-exabyte maximum storage for each storage system

1 million files for each disk group


ASM file size limits (database limit is 128 TB):

1. External redundancy maximum file size is 140 PB.


2. Normal redundancy maximum file size is 42 PB.
3. High redundancy maximum file size is 15 PB.
27) What is a diskgroup?
A disk group consists of multiple disks and is the fundamental object that ASM manages. Each
disk group contains the metadata that is required for the management of space in the disk group.
The ASM instance manages the metadata about the files in a Disk Group in the same way that a
file system manages metadata about its files. However, the vast majority of I/O operations do not
pass through the ASM instance. In a moment we will look at how file
I/O works with respect to the ASM instance.
29) Diagram that how database interacts with ASM when a request is to read or open a
datafile.

1A. Database issues open of a database file


1B. ASM sends the extent map for the file to database instance. Starting with 11g, the RDBMS
only receives first 60 extents the remaining extents in the extent map are paged in on demand,
providing a faster open
2A/2B. Database now reads directly from disk
3A.RDBMS foreground initiates a create tablespace for example
3B. ASM does the allocation for its essentially reserving the allocation units
for the file creation
3C. Once allocation phase is done, the extent map is sent to the RDBMS
3D. The RDBMS initialization phase kicks in. In this phase the initializes all
the reserved AUs
3E. If file creation is successful, then the RDBMS commits the file creation
Going forward all I/Os are done by the RDBMS directly.

30) Can my disks in a diskgroup can be varied size? For example one disk is of 100GB and
another disk is of 50GB. If so how does ASM manage the extents?
Yes, disk sizes can be varied, Oracle ASM will manage data efficiently and intelligent by placing
the extents proportional to the size of the disk in the disk group, bigger diskgroups have more
extents than lesser ones.
31) What is Intelligent Data Placement?
32) What is ASM preferred Mirror read? How does it useful?
33) What is ACFS?
34. What is ADVM?
35.

What is ASM in Oracle?


Oracle ASM is Oracles volume manager specially designed for Oracle database data. It is
available since Oracle database version 10g and many improvements have been made in versions
11g release 1 and 2.
ASM offers support for Oracle RAC clusters without the requirement to install 3rd party
software, such as cluster aware volume managers or filesystems.
ASM is shipped as part of the database server software (Enterprise and Standard editions) and
does not cost extra money to run.
ASM simplifies administration of Oracle related files by allowing the administrator to reference
disk groups
rather than individual disks and files, which are managed by ASM.
The ASM functionality is an extention of the Oracle Managed Files (OMF) functionality that
also includes striping and mirroring to provide balanced and secure storage. The new ASM
functionality can be used in combination with existing raw and cooked file systems, along with
OMF and manually managed files.
Advantages of ASM in Oracle?

Provides automatic load balancing over all the available disks, thus reducing hot spots in the file
system
Prevents fragmentation of disks, so you don't need to manually relocate data to tune I/O
performance
Adding disks is straight forward - ASM automatically performs online disk reorganization when
you add or remove storage
Uses redundancy features available in intelligent storage arrays
The storage system can store all types of database files
Using disk group makes configuration easier, as files are placed into disk groups
ASM provides stripping and mirroring (fine and coarse gain - see below)
ASM and non-ASM oracle files can coexist
StripingASM spreads data evenly across all disks in a disk group to optimize performance and
utilization. This even distribution of database files eliminates the need for regular monitoring and
I/O performance tuning.
For example, if there are six disks in a disk group, pieces of each ASM file are written to all six
disks. These pieces come in 1 MB chunks known as extents. When a database file is created, it is
striped (divided into extents and distributed) across the six disks, and allocated disk space on all
six disks grows evenly. When reading the file, file extents are read from all six disks in parallel,
greatly increasing performance.
MirroringASM can increase availability by optionally mirroring any file. ASM mirrors at the
file level, unlike operating system mirroring, which mirrors at the disk level. Mirroring means
keeping redundant copies, or mirrored copies, of each extent of the file, to help avoid data loss
caused by disk failures. The mirrored copy of each file extent is always kept on a different disk
from the original copy. If a disk fails, ASM can continue to access affected files by accessing
mirrored copies on the surviving disks in the disk group.
ASM supports 2-way mirroring, where each file extent gets one mirrored copy, and 3-way
mirroring, where each file extent gets two mirrored copies.
Online storage reconfiguration and dynamic rebalancingASM permits you to add or remove
disks from your disk storage system while the database is operating. When you add a disk, ASM
automatically redistributes the data so that it is evenly spread across all disks in the disk group,
including the new disk. This redistribution is known as rebalancing. It is done in the background
and with minimal impact to database performance. When you request to remove a disk, ASM
first rebalances by evenly relocating all file extents from the disk being removed to the other
disks in the disk group.

Managed file creation and deletionASM further reduces administration tasks by enabling files
stored in ASM disk groups to be Oracle-managed files. ASM automatically assigns filenames
when files are created, and automatically deletes files when they are no longer needed.
What is ASM instance in Oracle?
The ASM functionality is controlled by an ASM instance. This is not a full database instance,
just the memory structures and as such is very small and lightweight.
Characteristics of Oracle ASM instance
-------------------------------------1. do not have controlfile and datafiles, do not have online redo logs
2. do have init.ora and a passwordfile
3. for connecting remotely, create passwordfile and set following in init.ora
remote_login_passwordfile=exclusive
create a password file:
$ORACLE_HOME/bin/orapwd file=orapw+ASM1 password=yourpw entries=10
4. ASM instance can not be in open status as there are not datafiles. Can be in mount (although
there is no controlfile) and nomount status. When in mount status, database can use the
diskgroup. The mount status actually means mount disk groups.
What are ASM Background Processes in Oracle?Both an Oracle ASM instance and an Oracle
Database instance are built on the same technology. Like a database instance, an Oracle ASM
instance has memory structures (System Global Area) and background processes. Besides,
Oracle ASM has a minimal performance impact on a server. Rather than mounting a database,
Oracle ASM instances mount disk groups to make Oracle ASM files available to database
instances.
There are at least two new background processes added for an ASM instance:
ASM Instance Background Processes:
--------------------------------ARBx (ASM) Rebalance working processARBn performs the actual rebalance data extent
movements in an Automatic Storage Management instance. There can be many of these
processes running at a time, named ARB0, ARB1, and so on.These processes are managed by the
RBAL process. The number of ARBx processes invoked is directly influenced by the
asm_power_limit parameter.
RBAL (Re-balancer) RBAL runs in both database and ASM instances. In the database instance,
it does a global open of ASM disks. In an ASM instance, it also coordinates rebalance activity for
disk groups.RBAL, which coordinates rebalance activities
for disk resources controlled by ASM.
Database Instance ASM Background Processes:

------------------------------------------In the database instances, there are three background process


to support ASM, namely:
ASMB, this process contact CSS using the group name and acquires the associated ASM connect
string. The connect string is subsequently used to connect to the ASM instance.
RBAL, which performs global opens on all disks in the disk group.A global open means that
more than one database instance can be accessing the ASM disks at a time.
O00x, a group slave processes, with a numeric sequence starting at 000.
What are the components of components of ASM are disk groups?
The main components of ASM are disk groups, each of which comprise of several physical disks
that are controlled as a single unit. The physical disks are known as ASM disks, while the files
that reside on the disks are know as ASM files. The locations and names for the files are
controlled by ASM, but user-friendly aliases and directory structures can be defined for ease of
reference.
Failure groups are defined within a disk group to support the required level of redundancy. For
two-way mirroring you would expect a disk group to contain two failure groups so individual
files are written to two locations.
What are ASM instance initialization parameters?
INSTANCE_TYPE - Set to ASM or RDBMS depending on the instance type. The default is
RDBMS.
DB_UNIQUE_NAME - Specifies a globally unique name for the database. This defaults to
+ASM but must be altered if you intend to run multiple ASM instances.
ASM_POWER_LIMIT -The maximum power for a rebalancing operation on an ASM instance.
The valid values range from 1 to 11, with 1 being the default. The higher the limit the more
resources are allocated resulting in faster rebalancing operations. This value is also used as the
default when the POWER clause is omitted from a rebalance operation.
ASM_DISKGROUPS - The list of disk groups that should be mounted by an ASM instance
during instance startup, or by the ALTER DISKGROUP ALL MOUNT statement. ASM
configuration changes are automatically reflected in this parameter.
ASM_DISKSTRING - Specifies a value that can be used to limit the disks considered for
discovery. Altering the default value may improve the speed of disk group mount time and the
speed of adding a disk to a disk group. Changing the parameter to a value which prevents the
discovery of already mounted disks results in an error. The default value is NULL allowing all
suitable disks to be considered.
Advantages of ASM in Oracle?
Provides automatic load balancing over all the available disks, thus reducing hot spots in the file

system
Prevents fragmentation of disks, so you don't need to manually relocate data to tune I/O
performance
Adding disks is straight forward - ASM automatically performs online disk reorganization when
you add or remove storage
Uses redundancy features available in intelligent storage arrays
The storage system can store all types of database files
Using disk group makes configuration easier, as files are placed into disk groups
ASM provides stripping and mirroring (fine and coarse gain - see below)
ASM and non-ASM oracle files can coexist
StripingASM spreads data evenly across all disks in a disk group to optimize performance
and utilization. This even distribution of database files eliminates the need for regular monitoring
and I/O performance tuning.
For example, if there are six disks in a disk group, pieces of each ASM file are written to all six
disks. These pieces come in 1 MB chunks known as extents. When a database file is created, it is
striped (divided into extents and distributed) across the six disks, and allocated disk space on all
six disks grows evenly. When reading the file, file extents are read from all six disks in parallel,
greatly increasing performance.
MirroringASM can increase availability by optionally mirroring any file. ASM mirrors at the
file level, unlike operating system mirroring, which mirrors at the disk level. Mirroring means
keeping redundant copies, or mirrored copies, of each extent of the file, to help avoid data loss
caused by disk failures. The mirrored copy of each file extent is always kept on a different disk
from the original copy. If a disk fails, ASM can continue to access affected files by accessing
mirrored copies on the surviving disks in the disk group.
ASM supports 2-way mirroring, where each file extent gets one mirrored copy, and 3-way
mirroring, where each file extent gets two mirrored copies.
Online storage reconfiguration and dynamic rebalancingASM permits you to add or
remove disks from your disk storage system while the database is operating. When you add a
disk, ASM automatically redistributes the data so that it is evenly spread across all disks in the
disk group, including the new disk. This redistribution is known as rebalancing. It is done in the
background and with minimal impact to database performance. When you request to remove a
disk, ASM first rebalances by evenly relocating all file extents from the disk being removed to
the other disks in the disk group.

Managed file creation and deletionASM further reduces administration tasks by enabling
files stored in ASM disk groups to be Oracle-managed files. ASM automatically assigns
filenames when files are created, and automatically deletes files when they are no longer needed.
Why should we use separate ASM home?
ASM should be installed separately from the database software in its own ORACLE_HOME
directory. This will allow you the flexibility to patch and upgrade ASM and the database
software independently.
How many ASM instances should one have?
Several databases can share a single ASM instance. So, although one can create multiple ASM
instances on a single system, normal configurations should have one and only one ASM instance
per system.
For clustered systems, create one ASM instance per node (called +ASM1, +ASM2, etc).
How many diskgroups should one have?
Generally speaking one should have only one disk group for all database files - and, optionally a
second for recovery files (see FRA).
Data with different storage characteristics should be stored in different disk groups. Each disk
group can have different redundancy (mirroring) settings (high, normal and external), different
fail-groups, etc. However, it is generally not necessary to create many disk groups with the same
storage characteristics (i.e. +DATA1, +DATA2, etc. all on the same type of disks).
To get started, create 2 disk groups - one for data and one for recovery files. Here is an example:
CREATE DISKGROUP data EXTERNAL REDUNDANCY DISK '/dev/d1', '/dev/d2',
'/dev/d3', ....;
CREATE DISKGROUP recover EXTERNAL REDUNDANCY DISK '/dev/d10', '/dev/d11',
'/dev/d12', ....;
Here is an example how you can enable automatic file management with such a setup:
ALTER SYSTEM SET db_create_file_dest = '+DATA' SCOPE=SPFILE;
ALTER SYSTEM SET db_recovery_file_dest = '+RECOVER' SCOPE=SPFILE;
You may also decide to introduce additional disk groups - for example, if you decide to put
historic data on low cost disks, or if you want ASM to mirror critical data across 2 storage
cabinets.
What is ASM Rebalancing?
The rebalancing speed is controlled by the ASM_POWER_LIMIT initialization parameter.
Setting it to 0 will disable disk rebalancing.
ALTER DISKGROUP data REBALANCE POWER 11;

What happens when an Oracle ASM diskgroup is created?


When an ASM diskgroup is created, a hierarchialfilesystem structure is created.
How does this filesystem structure appear?
Oracle ASM diskgroup'sfilesystem structure is similar to UNIX filesystem hierarchy or Windows
filesystem hierarchy.
Where are the Oracle ASM files stored?
Oracle ASM files are stored within the Oracle ASM diskgroup. If we dig into internals, oracle
ASM files are stored within the Oracle ASM filesystem structures.
How are the Oracle ASM files stored within the Oracle ASM filesystem structure?
Oralce ASM files are stored within the Oracle ASM filesystem structures as objects that RDBMS
instances/Oracle database instance access. RDBMS/Oracle instance treats the Oracle ASM files
as standard filesystem files.
What are the Oracle ASM files that are stored within the Oracle ASM file hierarchy?
Files stored in Oracle ASM diskgroup/Oracl ASM filestructures include:
1) Datafile
2) Controlfiles
3) Server Parameter Files(SPFILE)
4) Redo Log files
What happens when you create a file/database file in ASM?What commands do you use to
create database files?
Some common commands used for creating database files are :
1) Create tabespace
2) Add Datafile
3) Add Logfile
For example,
SQL> CREATE TABLESPACE TS1 DATAFILE '+DATA1' SIZE 10GB;
Above command creates a datafile in DATA1 diskgroup
How can you access a databasefile in ASM diskgroup under RDBMS?
Once the ASM file is created in ASM diskgroup, a filename is generated. This file is now visible
to the user via the standard RDBMS view V$DATAFILE.
What will be the syntax of ASM filenames?
ASM filename syntax is as follows:
+diskgroup_name/database_name/database_file_type/tag_name.file_number.incarnation
where,
+diskgroup_name - Name of the diskgroup that contains this file
database_name - Name of the database that contains this file
datafile - Can be one among 20 different ASM file types

tag_name - corresponds to tablespace name for datafiles, groupnumber for redo log files
file_number - file_number in ASM instance is used to correlate filenames in database instance
incarnation_number - It is derived from the timestamp. IT is used to provide uniqueness
What is an incarnation number?
An incarnation number is a part of ASM filename syntax. It is derived from the timestamp. Once
the file is created, its incarnation number doesnot change.
What is the use of an incarnation number in Oracle ASM filename?
Incarnation number distinguishes between a new file that has been created using the same file
number and another file that has been deleted
ASM's SPFile will be residing inside ASM itself. This could be found out in number of ways,
looking at the alert log of ASM when ASM starts
Machine:
x86_64
Using parameter settings in server-side spfile
+DATA/asm/asmparameterfile/registry.253.766260991
System parameters with non-default values:
large_pool_size
= 12M
instance_type
= "asm"
remote_login_passwordfile= "EXCLUSIVE"
asm_diskgroups
= "FLASH"
asm_diskgroups
= "DATA"
asm_power_limit
=1
diagnostic_dest
= "/opt/app/oracle"
Or using the asmcmd's spget command which shows the spfile location registered with GnP
profile
ASMCMD> spget
+DATA/asm/asmparameterfile/registry.253.766260991

Q.1) What init.ora parameters does a user need to


configure for ASM instances?
A. The default parameter settings work perfectly for
ASM. The only parameters needed for 11g ASM:

PROCESSES*
ASM_DISKSTRING*
ASM_DISKGROUPS
INSTANCE_TYPE
ASM is a very passive instance in that it doesnt have a lot concurrent transactions
or queries. So the memory footprint is quite small.
Even if you have 20 dbs connected to ASM , the ASM SGA does not need to change.
This is b/c the ASM metadata is not directly tied to the number of clients
The 11g MEMORY_TARGET (DEFAULT VALUE) will be more than sufficient.

The processes parameter may need to be modified. Use the formula to determine
the approp value:
processes = 40 + (10 + [max number of concurrent database file
creations, and file extend operations possible])*n
Where n is the number of databases connecting to ASM (ASM clients).
The source of concurrent file creations can be any of the following:
Several concurrent create tablespace commands

Creation of a Partitioned table with several tablespaces creations


RMAN backup channels
Concurrent archive logfile creations
Q.2)How does the database interact with the ASM
instance and how do I make ASM go faster?
A. ASM is not in the I/O path so ASM does not impede
the database file access. Since the RDBMS instance
is performing raw I/O, the I/O is as fast as possible.
Cover ASM instance architecture

Cover ASM-Communication via ASMB


The database communicates with ASM instance using the ASMB
(umblicus process) process. Once the database obtains the necessary
extents from extent map, all database IO going forward is processed
through by the database processes, bypassing ASM. Thus we say
ASM is not really in the IO path. So, the question how do we make
ASM go faster..you dont have to.
RDBMS and ASM Instance Interaction
Server
Operating System
DATABASE ASM
(1) Database opens file
(1A) OPEN
(1B) Extent Map
(2) Database Reads file
(2A) READ
(2B) I/O Completes
(3) Database Creates file
(3A) CREATE
(3B) Allocates file

(3C) Extent Map


(3D) Initializes file
(3D) Commit
1A. Database issues open of a database file
1B. ASM sends the extent map for the file to database instance. Starting
with 11g, the RDBMS only receives first 60 extents the remaining extents
in the extent map are paged in on demand, providing a faster open
2A/2B. Database now reads directly from disk
3A.RDBMS foreground initiates a create tablespace for example
3B. ASM does the allocation for its essentially reserving the allocation units
for the file creation
3C. Once allocation phase is done, the extent map is sent to the RDBMS
3D. The RDBMS initialization phase kicks in. In this phase the initializes all
the reserved AUs
3E. If file creation is successful, then the RDBMS commits the file creation
Going forward all I/Os are done by the RDBMS.
Q.3) Do I need to define the RDBMS
FILESYSTEMIO_OPTIONS parameter when I use ASM?
A. No. The RDBMS does I/O directly to the raw disk
devices, the FILESYSTEMIO_OPTIONS parameter is
only for filesystems.
A. Review what the use of FILESYSTEMIO_OPTIONS parameter;
essentially FILESYSTEMIO_OPTIONS is used for filesystem/block
storage.
This parameter controls which IO options are used. The value may be any of
the following:
*asynch - This allows asynchronous IO to be used where supported by the
OS.
*directIO - This allows directIO to be used where supported by the OS.
Direct IO bypasses any Unix buffer cache. *setall - Enables both
ASYNC and DIRECT IO. "none" - This disables ASYNC IO and DIRECT
IO so that Oracle uses normal synchronous writes, without any direct io
options.
A. RDBMS does raw IO against the ASM disks, so need for
FILESYSTEMIO_OPTIONS parameter. The only parameter that needs to
be set is disk_asyncio=true, which is true by default. If using ASMLIB
then even the disk_async does not need to be set.
ASM is also supported for NFS files as ASM disks. In such cases, the
required NFS mount options eliminate the need to set
FILESYSTEMIO_OPTIONS.
Q.4) I read in the ASM Best Practices paper that Oracle
recommends two diskgroups. Why?
A. Oracle recommends two diskgroups to provide a
balance of manageability, utilization, and
performance.

To reduce the complexity of managing ASM and its diskgroups, Oracle recommends that
generally no more than two diskgroups be maintained and managed per RAC cluster or
single ASM instance
oDatabase work area: This is where active database files such as datafiles, control files,
online redo logs, and change tracking files used in incremental backups are stored. This
location is indicated by DB_CREATE_FILE_DEST.
oFlash recovery area: Where recovery-related files are created, such as multiplexed copies
of the current control file and online redo logs, archived redo logs, backup sets, and
flashback log files. This location is indicated by DB-RECOVERY_FILE_DEST.
Having one DATA container means only place to store all your database files, and obviates
the need to juggle around datafiles or having to decide where to place a new tablespace.
By having one container for all your files also means better storage utilization. Making the IT
director very happy. If more storage capacity or IO capacity is needed, just add an ASM
disk.all online activities.
You have to ensure that this storage pool container houses enough spindles to
accommodate the IO rate of all the database objects
Bottom line, one container == one pool manage, monitor, and track
Note however, that additional diskgroups may be added to support tiered storage classes in
Information Lifecycle Management (ILM) or Hierarchical Storage Management (HSM)
deployments
Q.5) We have a 16 TB database. Im curious about the
number of disk groups we should use; e.g. 1 large
disk group, a couple of disk groups, or otherwise?
A. For VLDBs you will probably end up with different
storage tiers; e.g with some of our large customers
they have Tier1 (RAID10 FC), Tier2 (RAID5 FC), Tier3
(SATA), etc. Each one of these is mapped to a
diskgroup.
These custs mapped certain tablespaces to specific tiers; eg, system/rollback/syaux
and latency senstive tablespaces in Tier1, and not as IO critical on Tier2, etc.
For 10g VLDBs its best to set an AU size of 16MB, this is more for metadata space
efficiency than for performance. The 16MB recommendation is only necessary if the
diskgroup is going to be used by 10g databases. In 11g we introduced variable size
extents to solve the metadata problem. This requires compatible.rdbms &
compatible.asm to be set to 11.1.0.0. With 11g you should set your AU size to the largest
I/O that you wish to issue for sequential access (other parameters need to be set to
increase the I/O size issued by Oracle). For random small I/Os the AU size does not
matter very much as long as every file is broken into many more extents than there are
disks.
15
Q.6) We have a new app and dont know our access
pattern, but assuming mostly sequential access, what
size would be a good AU fit?
A. For 11g ASM/RDBMS it is recommended to use 4MB
ASM AU for disk groups.

See Metalink Note 810484.1


For all 11g ASM/DB users, it best to create a disk group using 4 MB ASM AU size. Metalink
Note 810484.1 covers this

Q.7) Would it be better to use BIGFILE tablespaces, or


standard tablespaces for ASM?
A. The use of Bigfile tablespaces has no bearing on ASM
(or vice versa). In fact most database object related
decisions are transparent to ASM.
Nevertheless, Bigfile tablespaces benefits:
Fewer datafiles - which means faster database open (fewer files to
open),
Faster checkpoints, as well fewer files to manage. But you'll need
careful consideration for backup/recovery of these large datafiles.
Q.8) What is the best LUN size for ASM
A. There is no best size! In most cases the storage
team will dictate to you based on their standardized
LUN size. The ASM administrator merely has to
communicate the ASM Best Practices and application
characteristics to storage folks :
Need equally sized / performance LUNs

Minimum of 4 LUNs
The capacity requirement
The workload characteristic (random r/w, sequential r/w) &
any response time SLA
Using this info , and their standards, the storage folks should build a
nice LUN group set for you.
In most cases the storage team will dictate to you what the standardized LUN size
is. This is based on several factors,
including RAID LUN set builds (concatenated, striped, hypers, etc..). Having too
many LUNs elongates boot
time and is it very hard to manage On the flip side, having too few LUNs makes array
cache management difficult to
control and creates un-manageable large LUNs (which are difficult to expand).
The ASM adminstrator merely has to communicate to SA/storage folks that you need
equally sized/performance LUNs and what the capacity requirement is, say 10TB.
Using this info, the workload characteristic (random r/w, sequential r/w), and their
standards, the storage folks should build a nice LUN group set for you
Having too many LUNs elongates boot time and is it very hard to manage (zoning,
provisioning, masking, etc..)...there's a $/LUN barometer!
Q.9) In 11g RAC we want to separate ASM admins from
DBAs and create different users and groups. How do
we set this up?
A. For clarification

Separate Oracle Home for ASM and RDBMS.


RDBMS instance connects to ASM using OSDBA group of the ASM instance.
Thus, software owner for each RDBMS instance connecting to ASM must be
a member of ASM's OSDBA group.
Choose a different OSDBA group for ASM instance (asmdba) than for
RDBMS instance (dba)
In 11g, ASM administrator has to be member of a separate SYSASM group to
separate ASM Admin and DBAs.
Operating system authentication using membership in the group or groups
designated
as OSDBA, OSOPER, and OSASM is valid on all Oracle platforms.
A typical deployment could be as follows:
ASM administrator:
User : asm
Group: oinstall, asmdba(OSDBA), asmadmin(OSASM)
Database administrator:
User : oracle
Group: oinstall, asmdba(OSDBA of ASM), dba(OSDBA)
ASM disk ownership : asm:oinstall
Remember that Database instance connects to ASM instance as
sysdba. The user id the database instance runs as needs to be the
OSDBA group of the ASM instance.
A typical deployment could be as follows:
ASM administrator:
User : asm
Group: oinstall, asmdba(OSDBA), asmadmin(OSASM)
Database administrator:
User : oracle
Group: oinstall, asmdba(OSDBA of ASM), dba(OSDBA)
A typical deployment could be as follows:
ASM administrator:
User : asm
Group: oinstall, asmdba(OSDBA), asmadmin(OSASM)
Database administrator:
User : oracle
Group: oinstall, asmdba(OSDBA of ASM), dba(OSDBA)
Q.10) Can my RDBMS and ASM instances run different
versions?
A. Yes. ASM can be at a higher version or at lower
version than its client databases. Theres two
components of compatiblity:
Software compatibility

Diskgroup compatibility attributes:


compatible.asm
compatible.rdbms

This is a diskgroup level change and not an instance level changeno


rolling upgrade here!
Disk Group Compatibility Example
Start with 10g ASM and RDBMS

Upgrade ASM to 11g


Advance compatible.asm
ALTER DISKGROUP data
SET ATTRIBUTE
compatible.asm = 11.1.0.7.0

10g RDBMS instances are still supported


10g ASM instance can no longer mount the disk
group
22
Disk Group Compatibility Example
Upgrade RDBMS to 11g

In the RDBMS instance set initialization parameter


compatible = 11.0
Advance compatible.rdbms
ALTER DISKGROUP data
SET ATTRIBUTE
compatible.rdbms = 11.1.0.7.0

New capabilities enabled


Variable size extents
Fast mirror resync
Preferred read
AUs > 16MB
10g RDBMS instances can no longer access the disk group
23
Disk Group Compatibility Example
Compatibility may be set during disk group creation

CREATE DISKGROUP data


DISK /dev/sdd[bcd]1
ATTRIBUTE
compatible.asm = 11.1.0.7.0,

compatible.rdbms = 11.1.0.7.0,
au_size = 4M
compatible.asm and compatible.rdbms cannot
be reversed
Q.11) Where do I run my database listener from; i.e., ASM
HOME or DB HOME?
A. It is recommended to run the listener from the ASM
HOME. This is particularly important for RAC env,
since the listener is a node-level resource. In this
config, you can create additional [user] listeners from
the database homes as needed.

- Allows registering multiple databases on the node to register with the


listener without being tied to a specific database home
- From configuration tool standpoint (netca), we promote best practice
of creating one listener per node with node name suffix (that is
registered with CRS) and subsequent tools that create/upgrade
databases will register instances to that listener. One can always
create multiple listeners in different homes and use'em but that would
complicate the configuration
Backups for ASM:
Top 10 ASM Questions
Q.1) How do I backup my ASM instance?
A. Not applicable! ASM has no files to backup
Unlike the database, ASM does require a controlfile type structure or
any other external metadata to bootstrap itself. All the data ASM needs
to startup is on on-disk structures (disk headers and other disk group
metadata).
A Disk Group is the fundamental object managed by ASM. It is
composed of multiple ASM disks. Each Disk Group is self-describing,
like a standard file system. All the metadata about the usage of the
space in the disk group is completely contained within the disk group.
If ASM can find all the disks in a disk group it can provide access to
the disk group without any additional metadata
Q.2)When should I use RMAN and when should I use
ASMCMD copy?
A. RMAN is the recommended and most complete and
flexible method to backup and transport database files
in ASM.
ASMCMD copy is good for copying single files
Supports all Oracle file types

Can be used to instantiate a Data Guard environment


Does not update the controlfile
Does not create OMF files
RMAN is the most complete and versatile means to backup databases
stored in ASM.
However, many customers use BCV/split-mirrors as backups for ASM
based databases. Many combine BCV mirrors with RMAN backup
of the mirrors. Why would you want to do that? RMAN ensures the
integrity of the database data blocks by running sanity checks as it
backs up the blocks
Now most of you are wondering about the 11g asmcmd copy
command, and how that fits in here. asmcmd cp is not intended to
do wholesale backups (plus youll have to put the database in hot
backup).
In 10g the possible ways to migrate - DBMS_FILE_TRANSFER, rman (copy vs.
backup), or XMLDB FTP

In 11g, we introduced the asmcmd copy command. Key point here is that copy files
out is great for:
1. archive logs
2. Controlfiles
3. Datafiles for debugging
4. Dumpsets (can be done across platforms)
Copying files in:
TTS
Copy in only supported files.
28
ASMCMD Copy
ASMCMD> ls
+fra/dumpsets/expdp_5_5.dat
ASMCMD> cp expdp_5_5.dat sys@rac1.orcl1:+DATA/dumpsets/ex
pdp_5_5.dat
source +fra/dumpsets/expdp_5_5.dat
target +DATA/dumpsets/expdp_5_5.dat
copying file(s)...
file, +DATA/dumpsets/expdp_5_5.dat,
copy committed.
Top 10 ASM Questions
Migration
Top 10 ASM Questions
Q. Im going to do add disks to my ASM diskgroup,
how long will this rebalance take?
A. Rebalance time is heavily driven by the three items:
Amount of data currently in the diskgroup

IO bandwidth available on the server


ASM_POWER_LIMIT or Rebalance Power Level
Use v$asm_operation
31
Q. We are migrating to a new storage array. How do I
move my ASM database from storage A to storage B?
A. Given that the new and old storage are both visible to
ASM, simply add the new disks to the ASM disk group
and drop the old disks. ASM rebalance will migrate
data online. Note 428681.1 covers how to move
OCR/Voting disks to the new storage array
If this is a RAC environment, the Note 428681.1 covers how to move
OCR/Voting disks to the new storage array
ASM_SQL> alter diskgroup DATA
drop disk
data_legacy1, data_legacy2,

data_legacy3
add disk
/dev/sddb1, /dev/sddc1,

/dev/sddd1;
ASM Rebalancing
Automatic online rebalance whenever
storage configuration changes
Only move data proportional to storage
added
No need for manual I/O tuning
Disk Group DATA (legacy disks)
ASM Rebalancing
Automatic online rebalance whenever
storage configuration changes
Online migration to new storage
Disk Group DATA
ASM Rebalancing
Automatic online rebalance whenever
storage configuration changes
Online migration to new storage
Disk Group DATA
ASM Rebalancing
Automatic online rebalance whenever
storage configuration changes
Online migration to new storage
Disk Group DATA
ASM Rebalancing
Automatic online rebalance whenever
storage configuration changes
Online migration to new storage
Disk Group DATA (new disks)
Top 10 ASM Questions
Q. Is it possible to unplug an ASM disk group from one
platform and plug into a server on another platform
(for example, from Solaris to Linux)?
A. No. Cross-platform disk group migration not
supported. To move datafiles between endian-ness
platforms, you need to use XTTS, Datapump or
Streams.
The first problem that you run into here is that Solaris and Linux
format their disks differently. Solaris and Linux do not recognize each

others partitions, etc.


ASM does track the endian-ness of its data. However, currently, the
ASM code does not handle disk groups whose endian-ness does not
match that of the ASM binary.
Experiments have been done to show that ASM disk groups can be
migrated from platforms that share a common format and endian-ness
(i.e. Windows to Linux), but this functionality is not currently officially
supported because is not regularly tested yet.
The following links show how to migrate across platforms
http://downloadwest.
oracle.com/docs/cd/B19306_01/server.102/b25159/outage.htm#CA
CFFIDD
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10
gR2_PlatformMigrationTTS.pdf
Top 10 ASM Questions
3rd Party Software
40
Top 10 ASM Questions
Q. How does ASM work with multipathing software?
A. It works great! Multipathing software is at a layer
lower than ASM, and thus is transparent.
You may need to adjust ASM_DISKSTRING to specify
only the path to the multipathing pseudo devices.
Multipathing tools provides the following benefits:
oProvide a single block device interface for a multi-pathed LUN
oDetect any component failures in the I/O path; e.g., fabric port, channel adapter, or
HBA.
oWhen a loss of path occurs, ensure that I/Os are re-routed to the available paths,
with no process disruption.
oReconfigure the multipaths automatically when events occur.
oEnsure that failed paths get revalidated as soon as possible and provide autofailback
capabilities.
oConfigure the multi-paths to maximize performance using various load balancing
methods; e.g., round robin, least I/Os queued, or least service time.
When a given disk has several paths defined, each one will be presented as a unique path
name at the OS level; e.g.; /dev/rdsk/c3t19d1s4 and /dev/rdsk/c7t22d1s4 could be pointing
to same disk device. ASM, however, can only tolerate the discovery of one unique device
path per disk. For example, if the asm_diskstring is /dev/rdsk/*, then several paths to the
same device will be discovered, and ASM will produce an error message stating this.
When using a multipath driver, which sits above this SCSI-block layer, the driver will
generally produce a pseudo device that virtualizes the sub-paths. For example, in the
case of EMCs PowerPath, you can use the following asm_diskstring setting of
/dev/rdsk/emcpower*. When I/O is issued to this disk device, the multipath driver will
intercept it and provide the necessary load balancing to the underlying subpaths.
As long as ASM can open/read/write to the multipathing pseudo device, it should
work. Most all MP products are known to work w/ ASM. But remember ASM does not

certify MP products, though we have a list products that work w/ ASM, this is more of
a guide of whats available by platform/OS.
Examples of multi-pathing software include EMC PowerPath, Veritas DMP, Sun Traffic
Manager, Hitachi HDLM, and IBM SDDPCM. Linux 2.6 has a kernel based multipathing
ASM/RDBMS
/dev/

Multipath driver
/dev/sda1 /dev/sdb1
Controller Controller
Cache
Disk
IO cloud
Top 10 ASM Questions
Q. Is ASM constantly rebalancing to manage hot
spots?
A. NoNoNope!!
Bad rumor. ASM provides even distribution of extents across all disks
in a disk group. Since each disk will equal number of extents, no
single disk will be hotter than another. Thus the answer NO, ASM does
not dynamically move hot spots, because hot spots simply do not
occur in ASM configurations.
Rebalance only occurs on storage configuration changes (e.g. add,
drop, or resize disks).
43
I/O Distribution
ASM spreads file extents evenly across all disks in disk group
Since ASM distributes extents evenly, there are no hot spots
Average IOPS per disk during OLTP workload
0
50
100
150
200
250
300
Total
Disk
IOPS
FG1: - cciss/c0d2
FG1: - cciss/c0d3
FG1: - cciss/c0d4
FG1: - cciss/c0d5
FG1: - cciss/c0d6
FG2: - cciss/c0d2
FG2: - cciss/c0d3

FG2: - cciss/c0d4
FG2: - cciss/c0d5
FG2: - cciss/c0d6
FG3: - cciss/c0d2
FG3: - cciss/c0d3
FG3: - cciss/c0d4
FG3: - cciss/c0d5
FG3: - cciss/c0d6
FG4: - cciss/c0d2
FG4: - cciss/c0d3
FG4: - cciss/c0d4
FG4: - cciss/c0d5
FG4: - cciss/c0d6
As indicated, ASM implements the policy of S.A.M.E. that stripes and mirrors
files across all the disks in a Disk Group. If the disks are highly reliable as
the case may be with a high-end array, mirroring can be optionally disabled
for a particular Disk Group. This policy of striping and mirroring across all
disks in a disk group greatly simplifies storage management and provides a
configuration of balanced performance.
Key Value Propositions
Manageability
Simple provisioning
Storage Array migration
VM/FS co-existence
SQL, EM, Command line
Consolidation
Self-tuning
Performance
Distribute load across all
available storage
No ASM code in data path
Availability
Automatic mirror rebuild
Automatic bad block correction
Rolling upgrades
Online patches
RAC and clusterware support
Cost Savings
Shared storage pool
Just-in-Time provisioning
No license fees
No support fees
45
Summary:
ASM requires very few parameters to run

ASM based databases inherently leverage raw disk


performance
No additional database parameters needed to support
ASM
Mixed ASM-database version support
Facilitates online storage changes
RMAN recommended for backing up ASM based
databases
Spreads I/O evenly across all disks to maximize
performance and eliminates hot spots
ASM provides filesystem and volume manager capabilities built into the Oracle database kernel.
With
this capability, ASM simplifies storage management tasks, such as creating/laying out databases
and
disk space management. Since ASM allows disk management to be done using familiar
create/alter/drop SQL statements, DBAs do not need to learn a new skill set or make crucial
decisions
on provisioning.
The following are some key benefits of ASM:
oASM spreads I/O evenly across all available disk drives to prevent hot spots and maximize
performance.
oASM eliminates the need for over provisioning and maximizes storage resource utilization
facilitating
database consolidation.
oInherent large file support.
oPerforms automatic online redistribution after the incremental addition or removal of storage
capacity.
oMaintains redundant copies of data to provide high availability, or leverages 3rd party RAID
functionality.
oSupports Oracle Database as well as Oracle Real Application Clusters (RAC).
oCapable of leveraging 3rd party multipathing technologies.
oFor simplicity and easier migration to ASM, an Oracle database can contain ASM and nonASM files.
Any new files can be created as ASM files whilst existing files can also be migrated to ASM.
oRMAN commands enable non-ASM managed files to be relocated to an ASM disk group.
oEnterprise Manager Database Control or Grid Control can be used to manage ASM disk and file
activities.
ASM reduces Oracle Database cost and complexity without compromising performance or
availability
46
ASM Collateral and Content
http://www.oracle.com/technology/asm
ASM 11g New Features
ASM Best Practices
ASM vendor papers
ASM-RAC Customer Case Studies

Top 10 ASM Questions


Extra credit questions
Top 10 ASM Questions
Q. Is ASMLIB required on Linux systems and are there
any benefits to using it?
A. ASMLIB is not required to run ASM, but it is certainly
recommended.
ASMLIB has following benefits:
Simplified disk discovery
Persistent disk names
Efficient use of system resources
o Reduced Overhead
ASMLIB provides the capability for a process (RBAL) to perform a global open/close
on the disks that are being dropped or closed.
This reduces the number of open file descriptors on the system, thus reduces the
probability of running out of global file descriptors on the system. Also, the open
and close operations are reduced, ensuring orderly cleanup of file descriptors when
storage configurations changes occur.
A side benefit of the aforementioned items is a faster startup of the database.
o Disk Management and Discovery
With ASMLib the ASM disk name is automatically taken from the name given it by the
administrative tool. This simplifies adding disks and correlating OS names with ASM
names, as well as eliminates erroneous disk management activities since disks are
already pre-named.
The default discovery string for ASM is NULL, however, if ASMLIB is used, the
ASMLIB default string replaces the NULL string, making disk discovery much more
straightforward. Note, disk discovery has been one of the big challenges for
administrators.
The ASMLib permissions are persistent across reboot and in the event of major/minor
number changes
In RAC environments, disk identification and discovery as simply as single instance.
Once the disks are labeled on one node, the other clustered nodes simply use the
default disk discovery string, and discovery is seamless.
o No requirement to setup raw links
With ASMLib, there is not a requirement to modify the initializations (e.g. /etc/init.d)
Top 10 ASM Questions
Q. Is it possible to do rolling upgrades on ASMLIB in a
RAC configuration
A. ASMLIB is independent of Oracle Clusterware and
Oracle Database, and thus can be upgraded on its
own
Upgrading ASMLIB one a given node will require that ASMLIB be
disabled/stop, will require the database and ASM to also be

shutdown on that node. Once the ASMLIB is upgarded then the stack can be
restarted.

SENIOR ORACLE DBA INTERVIEW QUESTIONS

Question 1. Explain the difference between a hot backup and a cold backup and the benefits
associated with each.
Answer:
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.
Question 2. You have just had to restore from backup and do not have any control files. How
would you go about bringing up this database?
Answer:
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.
Question 3. How do you switch from an init.ora file to a spfile?
Answer:
Issue the create spfile from pfile command.
Question 4. Explain the difference between a data block, an extent and a segment.
Answer:
A data block is the smallest unit of logical storage for a database object. As objects 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 object takes when grouped together are
considered the segment of the database object.
Question 5. Give two examples of how you might determine the structure of the table DEPT.
Answer:
Use the describe command or use the dbms_metadata.get_ddl package.

Question 6. Where would you look for errors from the database engine?
Answer:
In the alert log.

Question 7. Compare and contrast TRUNCATE and DELETE for a table.


Answer:
Both 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 DDL operation and just moves the high
water mark and produces a now rollback. The delete command, on the other hand, is a DML operation,
which will produce a rollback and thus take longer to complete.
Question 8. Give the reasoning behind using an index.
Answer:
Faster access to data blocks in a table.
Question 9. Give the two types of tables involved in producing a star schema and the type of data
they hold.
Answer:
Fact tables and dimension tables. A fact table contains measurements while dimension tables will contain
data that will help describe the fact tables.
Question 10. What type of index should you use on a fact table?
Answer:
A Bitmap index.
Question 11. Give two examples of referential integrity constraints.
Answer:
A primary key and a foreign key.
Question 12. A table is classified as a parent table and you want to drop and re-create it. How
would you do this without affecting the children tables?
Answer:
Disable the foreign key constraint to the parent, drop the table, re-create the table, and enable the foreign
key constraint.
Question 13. Explain the difference between ARCHIVELOG mode and NOARCHIVELOG
mode and the benefits and disadvantages to each.

Answer:
ARCHIVELOG 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. NOARCHIVELOG mode
is basically the absence of ARCHIVELOG mode and has the disadvantage of not being able to recover to
any point in time. NOARCHIVELOG mode does have the advantage of not having to write transactions to
an archive log and thus increases the performance of the database slightly.
Question 14. What command would you use to create a backup control file?
Answer:
ALTER DATABASE BACKUP CONTROLFILE TO TRACE

Question 15. Give the stages of instance startup to a usable state where normal users may access
it.
Answer:
STARTUP NOMOUNT - Instance startup
ALTER DATABASE MOUNT - The database is mounted
ALTER DATABASE OPEN - The database is opened
Question 16. What column differentiates the V$ views to the GV$ views and how?
Answer:
The INST_ID column which indicates the instance in a RAC environment the information came from.
Question 17. How would you go about generating an EXPLAIN plan?
Answer:
Create a plan table with utlxplan.sql.
Use the explain plan set statement_id = 'tst1' into plan_table for a SQL statement
Look at the explain plan with utlxplp.sql or utlxpls.sql
Question 18. How would you go about increasing the buffer cache hit ratio?
Answer:
Use the buffer cache advisory over a given workload and then query the v$db_cache_advice table. If a
change was necessary then I would use the alter system set db_cache_size command.
Question 19. Explain an ORA-01555
Answer:
You 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 size of rollbacks. You should also look at the logic involved in the
application getting the error message.
Question 20. Explain the difference between $ORACLE_HOME and $ORACLE_BASE.
Answer:
ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is
where the oracle products reside.

Question 21. How would you determine the time zone under which a database was operating?
Answer:
select DBTIMEZONE from dual;
Question 22. Explain the use of setting GLOBAL_NAMES equal to TRUE.
Answer:
Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or
FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database
to which they are linking.

Question 23. What command would you use to encrypt a PL/SQL application?
Answer:
WRAP
Question 24. Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.
Answer:
A function and procedure are the same in that they are intended to be a collection of PL/SQL code that
carries a single task. While 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.
Question 25. Explain the use of table functions.
Answer:
Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as
a normal table or view in a SQL statement. They are also used to pipeline information in an ETL process.
Question 26. Name three advisory statistics you can collect.
Answer:
Buffer Cache Advice, Segment Level Statistics, & Timed Statistics
Question 27. Where in the Oracle directory tree structure are audit traces placed?
Answer:
In unix $ORACLE_HOME/rdbms/audit,
in Windows the event viewer
Question 28. Explain materialized views and how they are used.
Answer:
Materialized views are objects that are reduced sets of information that have been summarized, grouped,
or aggregated from base tables. They are typically used in data warehouse or decision support systems.
Question 29. When a user process fails, what background process cleans up after it?
Answer:
PMON

Question 30. What background process refreshes materialized views?


Answer:
The Job Queue Processes.
Question 31. How would you determine what sessions are connected and what resources they
are waiting for?
Answer:

Use of V$SESSION and V$SESSION_WAIT


Question Question 32. Describe what redo logs are.
Answer:
Redo 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.
Question 33. How would you force a log switch?
Answer:
ALTER SYSTEM SWITCH LOGFILE;
Question 34. Give two methods you could use to determine what DDL changes have been made.
Answer:
You could use Logminer or Streams
Question 35. What does coalescing a tablespace do?
Answer:
Coalescing is only valid for dictionary-managed tablespaces and de-fragments space by combining
neighboring free extents into large single extents.
Question 36. What is the difference between a TEMPORARY tablespace and a PERMANENT
tablespace?
Answer:
A temporary tablespace is used for temporary objects such as sort structures while permanent
tablespaces are used to store those objects meant to be used as the true objects of the database.
Question 37. Name a tablespace automatically created when you create a database.
Answer:
The SYSTEM tablespace.
Question 38. When creating a user, what permissions must you grant to allow them to
connect to the database?
Answer:
Grant the CONNECT to the user.

Question 39. How do you add a data file to a tablespace?


Answer:
ALTER TABLESPACE <tablespace_name> ADD DATAFILE <datafile_name> SIZE <size>
Question 40. How do you resize a data file?
Answer:

ALTER DATABASE DATAFILE <datafile_name> RESIZE <new_size>;


Question 41. What view would you use to look at the size of a data file?
Answer:
DBA_DATA_FILES
Question 42. What view would you use to determine free space in a tablespace?
Answer:
DBA_FREE_SPACE
Question 43. How would you determine who has added a row to a table?
Answer:
Turn on fine grain auditing for the table.
Question 44. How can you rebuild an index?
Answer:
ALTER INDEX <index_name> REBUILD ONLINE;
Question 45. Explain Partitioning and benefits of using Partioning.
Answer:
Partitioning is a method of taking large tables and indexes and splitting them into smaller, more
manageable pieces.
Question 46. You have just compiled a PL/SQL package but got errors, how would you view the
errors?
Answer:
SHOW ERRORS
Question 47. How can you gather statistics on a table?
Answer:
The ANALYZE command or DBMS_STAT package.
Question 48. How can you enable a trace for a session?
Answer:
Use the DBMS_SESSION.SET_SQL_TRACE or Use

ALTER SESSION SET SQL_TRACE = TRUE;


Question 49. What is the difference between the SQL*Loader and IMPORT utilities?
Answer:
These two Oracle utilities are used for loading data into the database. The difference is that the import
utility relies on the data being produced by another Oracle utility EXPORT while the SQL*Loader utility

allows data to be loaded that has been produced by other utilities from different data sources just so long
as it conforms to ASCII formatted or delimited files.
Question 50. Name two files used for network connection to a database.
Answer:
TNSNAMES.ORA and SQLNET.ORA
Question 51. Explain difference between Oracle Database and Instance
Answer:
Oracle database consist of following:
Datafiles, Control Files, Redo Log Files
Oracle instance consist of following:
SGA and Oracle processes (DBWR, LGWR, SMON, PMON, ARCH, CKPT, etc.)
Question 52. What is Mutating Table error?
Answer:
Mutating table error happens when you try to modify the same row you are using it. Use temp table to
avoid this error.
Question 53. What is correlated sub-query?
Answer:
Correlated sub-query is a sub-query, which has reference to the main query
Question 54. Which one of the below change will decrease PAGING/SWAPPING
Answer:
1. INCREASE SORT_AREA_RETAINED_SIZE
2. DECREASE SHARED_POOL_SIZE (correct answer)
3. DECREASE OPEN_CURSORS parameters
4. INCREASE DB_CACHE_SIZE
Question 55. Explain steps involved in Migration from Oracle 9.0.1 to 9.2.0.6
Answer:
1. Shutdown 9.0.1 database

2. Apply software patch to new/old ORACLE_HOME


3. Change ORACLE_HOME to point to new 9.2.0.6 binaries
4. STARTUP MIGRATE
5. @ORACLE_HOME/rdbms/admin/catpatch.sql
6. @ORACLE_HOME/rdbms/admin/utlrp.sql
7. Change init.ora parameter COMPATIBLE = 9.2.0.6
8. Shutdown and startup normal
Question 56. Can you create database under any Unix userid besides oracle?
Answer:
Yes. You can create database user other then oracle as long as that user is part of DBA group in unix

Question 57. Locally Managed TEMP Tablespace is 100% FULL and there is no space available to
add datafile to increase TEMP tablespace. What can you do that might free up TEMP space?
Answer:
You can try one of the following to free up TEMP space
1. Issue ALTTER TABLESPACE PCTINCREASE 1 followed by
ALTTER TABLESPACE PCTINCREASE 0 command;
2. Close some of the idle sessions connected to the database
Question 58. List five most important features of Oracle 9i
Answer:
1. AUTOMATIC UNDO MANAGEMEND
2. AUTOMATICE PGA MEMORY MANAGEMENT
3. MULTI-TABLE INSERT statements
4. EXTERNAL TABLES
5. DYNAMIC MEMORY MANAGEMENT
Question 59. Name five top 9I init.ora parameters affecting performance
Answer:
1. CURSOR_SHARING
2. DB_CACHE_SIZE
3. PGA_AGGREGATE_TARGET
4. WORKAREA_SIZE_POLICY
5. DB_16K_CACHE_SIZE, DB_8K_CACHE_SIZE, DB_2K_CACHE_SIZE
Question 60. How do you recover database when you lost all of your control files?
Answer:
In case of loss of loss of all control files, you can still recover database as long as you have all
archivelog files. You can issue following command to recover the database.
RECOVER DATABASE USING BACKUP CONTROLFILES UNTIL CANCEL;
Apply all archivelog files

ALTER DATABASE OPEN RESETLOGS;


SHUTDOWN IMMEDIATE;
Backup database (COLD)
STARTUP;
Question 61. What is main purpose of CHECKPOINT?
Answer:
A Checkpoint is a database event, which synchronizes the data blocks in memory with the datafiles on disk.
A checkpoint has two purposes:
1. to establish data consistency
2. Enable faster database recovery.
Question 62. You got a call from Application team saying Application is running very SLOW.
Where do you start looking first?
Answer:
Below are some of very important you should gather to identify the root cause of slowness in
application/database.

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
Run STATSPACK report to identify:
a. TOP 5 WAIT EVENTS
b. RESOURCE intensive SQL statements
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.
Question 63. How to SWITCH from PRIMARY to PHYSICAL STANDBY in 9i
Answer:
Perform below on Primary DB:
1. ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH
SESSION SHUTDOWN;
2. SHUTDOWN IMMEDIATE;
3. STARTUP NOMOUNT;
4. ALTER DATABASE MOUNT STANDBY DATABASE;
5. RECOVER MANAGED STANDBY DATABASE DICONNECT FROM SESSION;
6. ALTER SYSEM SET LOG_ARCHIVE_DEST_2_STATUS= DEFER SCOPE=SPFILE;
Perform below on STANDBY DB:
7. ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
8. SHUTDOWN IMMEDIATE;
9. STARTUP;

10. ALTER SYSEM SET LOG_ARCHIVE_DEST_2_STATUS= ENABLE SCOPE=SPFILE;


At this time Standby becomes Primary and Primary becomes new Standby.
Question 64. How to ACTIVATE PHYSICAL STANDBY database in 9i
Answer:
Perform below on Primary DB if available to transfer all pending archive logs to standby:
1. ALTER SYSTEM SWITCH LOGFILE;
2. ALTER SYSTEM SWITCH LOGFILE;
Perform below on STANDBY DB:
1. ALTER DATABASE ACTIVATE STANDBY DATABASE;
2. SHUTDOWN IMMEDIATE;
3. STARTUP
4. Add TEMP file if needed.
At this time Standby database becomes PRIMARY database and relationship between Primary and
Standby has been lost by activating standby database.
Question 65. Explain different protection mode in DATAGURD
Answer:
MAXIMUM PROTECTION
MAXIMUM AVAILIBILITY
MAXIMUM PERFORMANCE
Question 66. What is CASCADING STANDBY database?
Answer:

A CASCADING STANDBY is a standby database that receives its REDO information from another
STANDBY database (not from Primary database).
Question 67. What are some of the dba tables you query to find out about UNDO segments?
Answer:
You would query:

DBA_UNDO_SEGS
V$UNDOSTAT
Question 68. What does Block Media Recovery (BMR) do?
Answer:
BMR is responsible for restore and recover of specified BLOCK
Question 69. What is the difference between Fine Grained Audit (FGA) and Fine Grained Access
Control (FGAC)?
Answer:
FGA tracks when sensitive rows have been accesses, where FGAC prevents access to sensitive rows
Question 70. Which dynamic performance view DBA can query to see who deleted data from a
particular table sometime back?
Answer:
V$LOGMNR_CONTENTS
Question 71. What do you use DBMS_REDEFINITION package for?
Answer:
DBMS_REDEFINITION package is used to perform an ONLINE REBUILD of a table
Question 72. How do you add second or subsequent BLOCK SIZE to an existing database?
Answer:

Re-Create the CONTROLFILE to specify the new BLOCK SIZE for specific data files

Or Take the database OFFLINE, and the bring back online with a new BLOCK SIZE
specification
Question 73. What are new RMAN features in 9i?
Answer:

It allows you to set retention period of backups


It enables you to store the CHANNEL attributes so you do not have to specify in each
BACKUP or RESTORE command
Question 74, Explain different PARTITIONING options available in 9i
Answer:
Range Partitioning Used when there are logical ranges of data. Possible usage: dates, part numbers,
and serial numbers.

Hash Partitioning Used to spread data evenly over partitions. Possible usage: data has no logical
groupings.
List Partitioning Used to list together unrelated data into partitions. Possible usage: a number of states
list partitioned into a region.
Composite Range-Hash Partitioning Used to range partition first, then spreads data into hash partitions.
Possible usage: range partition by date of birth then hash partition by name; store the results into the
hash partitions.
Composite Range-List Partitioning Used to range partition first, then spreads data into list partitions.
Possible usage: range partition by date of birth then list partition by state, then store the results into the
list partitions.
Question 75. How to convert a Single Instance 9i database to a Real Application Clusters 9i (RAC)
database without using export/import tools.
Answer:
1. Make a full database backup before you change anything
2. Copy the existing $ORACLE_HOME/dbs/init<SID1>.ora to
$ORACLE_HOME/dbs/init<db_name>.ora. Add the following parameters to
$ORACLE_HOME/dbs/init<db_name>.ora:
a. *.cluster_database = TRUE
b. *.cluster_database_instances = 2
c. *.undo_management=AUTO (Add if you don't have it )
d. <SID1>.undo_tablespace=undotbs (undo tablespace which already exists)
e. <SID1>.instance_name=RAC1
f. <SID1>.instance_number=1
g. <SID1>.thread=1
h. <SID1>.local_listener=LISTENER_RAC1
3. Open your database and run $ORACLE_HOME/rdbms/admin/catclust.sql to create cluster
database specific views within the existing instance

4. Recreate control file if you defined maxinstances to be 1 when you created the single instance
database
5. Add instance specific parameters in the init<db_name>.ora for the second instance on the
second node and set appropriate values for it
a. <SID2>.instance_name=RAC2
b. <SID2>.instance_number=2
c. <SID2>.local_listener=LISTENER_RAC2
d. <SID2>.thread=2
e. <SID2>.undo_tablespace=UNDOTBS2
f. <SID2>.cluster_database = TRUE
g. <SID2>.cluster_database_instances = 2
6. From the first instance, mount the database and run the following command
alter database
add logfile thread 2
group 3 ('/dev/RAC/redo2_01_100.dbf') size 100M,
group 4 ('/dev/RAC/redo2_02_100.dbf') size 100M;
alter database enable public thread 2;
7. Create a second Undo Tablespace from the existing instance
8. Set ORACLE_SID and ORACLE_HOME environment variables on the second node and
START second instance.
Question 76. Explain RAC and advantages of using RAC
Answer:
In Real Application Clusters environments, all nodes concurrently execute transactions against the same
database. Real Application Clusters coordinates each node's access to the shared data to provide
consistency and integrity.
Advantages of RAC:

Improved throughput
Scalability over single instance systems
Improved response time
High availability
Transparency
Question 77. Explain Row Locking and Multi-version Read Consistency in RAC
Answer:
Oracle's row locking feature allows multiple transactions from separate nodes to lock and update
different rows of the same data block. This is done without any of the transactions waiting for the others
to commit. If a row has been modified but not yet committed, then the original row values are available to
all instances for read access. This is called multi-version read consistency.
Question 78. What is an External table introduced in 9i?
Answer:
Oracle9i introduces external tables, which provide a mechanism to view data stored in external sources
as if it were a table in the database. This ability to read external data provides a more straightforward
method of loading and transforming data from external sources. Administrators no longer need to reserve
space inside the database for staging tables or write external programs to transform the data outside of
the database environment. By making it no longer necessary to stage data in the Oracle database,
Oracle9i's external tables have essentially streamlined the ETL function by merging the transformation
and loading processes.
Question 79. What is SPFILE?

Answer:
The SPFILE (server parameter file) is Oracle's new method of maintaining database parameters. The old
method of editing a text based parameter file (INIT.ORA) has given way to the new method of maintaining
persistent parameters. By this Oracle means that you can change a system parameter and have its value
be maintained across shutdown and startup. This is a great savings from the past where you had to issue
the ALTER SYSTEM command and then remember to edit the INIT.ORA parameter file. Here is how to
create SPFILE:

SQL> CREATE SPFILE [='spfile_name'] FROM PFILE [='pfile_name'];


SQL> CREATE PFILE [='pfile_name'] FROM SPFILE [='spfile_name'];
SQL> create spfile from pfile;
Usage:
1. SQL> ALTER SYSTEM SET DB_CACHE_SIZE=1000M SCOPE=SPFILE;
Question 80. How do you backup and restore using Transportable Tablespaces
Answer:
1.
2.
3.
4.
5.
6.
7.
Run DBMS_TTS against the tablespace to see if tablespace is self contained or not.
Make tablespace Read Only.
Export Metadata (EXP TRANSPORT_TABLESPACES=Y TABLESPACE=ts1)
Copy data file to target host
Copy export dump to target
Import the Metadata (IMP TRANSPORT_TABLESPACES=Y DATAFILES (file1,file2) )

Bring Tablespace ONLINE and enable SOURCE tablespace to READ WRITE


Question 81. Explain different type of Database Failures
Answer:

Statement failure failed SQL is automatically rolled back and an error is returned to user.
User Process failure abnormal disconnect PMON detects and rolls back and releases
locks.
User Error (drop table, data) DBA is required to recover data (import or incomplete
recovery)
Media Failure Loss or corruption of files DBA needs to apply appropriate recovery.
Instance Failure Abnormal shutdown Instance simply needs restarted, SMON auto
recovers by:

Rolling forward changes in the redo log not recorded in the data files before Open of
database.

Rollbacks can occur after the database is open, when block data is requested.
Question 82. What does RESETLOGS option do?
Answer:
1. Creates a new incarnation of the database, putting a new SCN in all data file headers.
2. Reset Log Sequence number to 1
3. Reformats ONLINE REDO LOGFILES if they exists
Question 83. Name 5 system views that can be used to retrieve information about backup and
recovery
Answer:
1.

2.
3.
4.
5.
V$BACKUP
V$DATAFILE_HEADER
V$RECOVER_FILE
V$RECOVERY_LOG
V$RECOVERY_STATUS
Question 84. What is the quickest way to clone a database give your backup is done via RMAN?
Answer:
Using RMAN command DUPLICATE DATABASE
Question 85. What is the use of the RESUMABLE parameter in EXPORT?
Answer:
The RESUMABLE parameter allows the export to
1. Suspend if a space allocation issue occurs
2. Wait until the space allocation issue is solved
3. Then resume and therefore not to abort, provided a timeout is set appropriately.
Question 86. Name init.ora parameters need to set for Advanced Replication
Answer:
1.
2.
3.
4.
5.
6.
DISTRIBUTED_TRANSACTIONS
GLOBAL_NAMES

JOB_QUEUE_PROCESSES
OPEN_LINKS
PARALLEL_MAX_SERVERS
PARALLEL_MIN_SERVERS

Question 87. Name 5 init.ora parameters that needs to set in Primary database for DataGuard
configuration
Answer:
1.
2.
3.
4.
5.
6.
LOG_ARCHIVE_DEST_2
LOG_ARCHIVE_DEST_2_STATE
FAL_CLIENT
FAL_SERVER
STANDBY_ARCHIVE_DEST
STANDBY_FILE_MANAGEMENT
Question 88. What is the use of FORCE LOGGING option?
Answer:
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.
Question 89. (On UNIX) When should more than one DB writer process be used? How many
should be used?
Answer:
If the UNIX system being used is capable of asynchronous IO then only one is required, if the system is
not capable of asynchronous IO then up to twice the number of disks used by Oracle number of DB
writers should be specified by use of the db_writers initialization parameter.
Question 90. If you have an example table, what is the best way to get sizing data for the
production table implementation?

Answer:
The best way is to analyze the table and then use the data provided in the DBA_TABLES view to get the
average row length and other pertinent data for the calculation. The quick and dirty way is to look at the
number of blocks the table is actually using and ratio the number of rows in the table to its number of
blocks against the number of expected rows.
Question 91. What special Oracle feature allows you to specify how the cost based system treats a
SQL statement?
Answer:
The COST based system allows the use of Hints to control the optimizer path selection. If they can give
some example hints such as FIRST ROWS, ALL ROWS, USING INDEX, STAR, even better.
Question 92. You want to determine the location of identical rows in a table before attempting to
place a unique index on the table, how can this be done?
Answer:
select rowid from emp e
where e.rowid > (select min(x.rowid)
from emp x
where x.emp_no = e.emp_no);
Question 93. You are joining a local and a remote table, the network manager complains about the
traffic involved, how can you reduce the network traffic?

Answer:
Push the processing of the remote data to the remote instance by using a view to pre-select the
information for the join. This will result in only the data required for the join being sent across.
Question 94. How do you prevent output from coming to the screen?
Answer:
The SET option TERMOUT controls output to the screen. Setting TERMOUT OFF turns off screen output.
This option can be shortened to TERM.
Question 95. You see multiple fragments in the SYSTEM tablespace, what should you check first?
Answer:
Ensure that users dont have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace
assignment by checking the DBA_USERS view.
Question 96. What are some indications that you need to increase the SHARED_POOL_SIZE
parameter?
Answer:
Poor data dictionary or library cache hit ratios, getting error ORA-04031. Another indication is steadily
decreasing performance with all other tuning parameters the same.
Question 97. When should you increase copy latches? What parameters control copy latches?
Answer:
When you get excessive contention for the copy latches as shown by the redo copy latch hit ratio. You
can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the
number of CPUs on your system.
Question 98. Describe hit ratio as it pertains to the database buffers. What is the difference
between instantaneous and cumulative hit ratio and which should be used for tuning?
Answer:
The hit ratio is a measure of how many times the database was able to read a value from the buffers
verses how many times it had to re-read a data value from the disks. A value greater than 80-90% is
good, less could indicate problems. If you simply take the ratio of existing parameters this will be a

cumulative value since the database started. If you do a comparison between pairs of readings based on
some arbitrary time span, this is the instantaneous ratio for that time span. Generally speaking an
instantaneous reading gives more valuable data since it will tell you what your instance is doing for the
time it was generated over.
Question 99. What can cause a high value for recursive calls? How can this be fixed?
Answer:
A high value for recursive calls is cause by improper cursor usage, excessive dynamic space
management actions, and or excessive statement re-parses. You need to determine the cause and
correct it By either re-linking applications to hold cursors, use proper space management techniques
(proper storage and sizing) or ensure repeat queries are placed in packages for proper reuse.
Question 100. You look at the dba_rollback_segs view and see that there is a large number of
shrinks and they are of relatively small size, is this a problem? How can it be fixed if it is a
problem?

Answer:
A large number of small shrinks indicates a need to increase the size of the rollback segment extents.
Ideally you should have no shrinks or a small number of large shrinks. To fix this just increase the size of
the extents and adjust optimal accordingly.
Question 101. You look at the dba_rollback_segs view and see that you have a large number of
wraps is this a problem?
Answer:
A large number of wraps indicates that your extent size for your rollback segments are probably too small.
Increase the size of your extents to reduce the number of wraps. You can look at the average transaction
size in the same view to get the information on transaction size.
Question 102. How many redo logs should you have and how should they be configured for
maximum recoverability?
Answer:
You should have at least three groups of two redo logs with the two logs each on a separate disk spindle
(mirrored by Oracle). The redo logs should not be on raw devices on UNIX if it can be avoided.
Question 103. If the database cannot be bounced, how would you kill a user?
Answer:
Use command:
ALTER SYSTEM KILL SESSION SID,SERIAL# ;
Question 104: What is the frequency of log Updated..?
Answer:
On commit or
On checkpoint or
Redolog buffer is 1/3rd full
Question 105: How do you rename a database?
Answer:
You can change Database name by following below procedure:

1. Alter Database backup control file to trace;


2. Above step will create a text control file in user_dump_dest directory.
3. Change name of the Database in above file and in init.ora file.
4. STARTUP NOMOUNT
5. Run the script that was modified in step 3
6. ALTER DATABASE OPEN RESETLOGS;
Question 106: Is it possible to configure primary server and stand by server on different OS?
Answer:
Answer for this questions is NO. Standby database must be on same version of database and same
version of Operating system.

Question 107: What does database do during mounting process?


Answer:
while mounting the database oracle reads the data from controlfile which is used for verifying physical
database files during sanity check. Background processes are started before mounting the database only.
Question 108: What is a deadlock and Explain
Answer:
A deadlock is a condition where two or more users are waiting for data locked by each other. Oracle
automatically detects a deadlock and resolves them by rolling back one of the statements involved in the
deadlock, thus releasing one set of data locked by that statement. Statement rolled back is usually the
one which detects the deadlock. Deadlocks are mostly caused by explicit locking because oracle does
not do lock escalation and does not use read locks. Multi-table deadlocks can be avoided by locking the
tables in same order in all the applications, thus precluding a deadlock.
Question 109: What are the options available to refresh snapshots?
Answer:
COMPLETE - Tables are completely regenerated using the snapshots query and the master tables
every time the snapshot referenced.
FAST - If simple snapshot used then a snapshot log can be used to send the changes to the snapshot
tables.
FORCE - Default value. If possible it performs a FAST refresh; otherwise it will perform a complete
refresh.
Question 110: What is snapshot log?
Answer:
It is a table that maintains a record of modifications to the master table in a snapshot. It is stored in the
same database as master table and is only available for simple snapshots. It should be created before
creating snapshots.
Question 111: What is Two-Phase Commit?
Answer:

Two-phase commit is mechanism that guarantees a distributed transaction either commits on all
involved nodes or rolls back on all involved nodes to maintain data consistency across the global
distributed database. It has two phase, a Prepare Phase and a Commit Phase.
Question 112: Describe two phases of Two-phase commit?
Answer:
Prepare phase - The global coordinator (initiating node) ask a participants to prepare (to promise to
commit or rollback the transaction, even if there is a failure)
Commit - Phase - If all participants respond to the coordinator that they are prepared, the coordinator
asks all nodes to commit the transaction, if all participants cannot prepare, the coordinator asks all
nodes to roll back the transaction.
Question 113: What are the factors causing the reparsing of SQL statements in SGA
Answer:

There are main two causes for reparsing:


1. The objects which the query is referencing has been modified
2. The parsed version of sql text has been aged out of the library cache.
Question 114: How to implement the multiple control files for an existing database
Answer:
1. Edit init.ora file, set control_files parameter with multiple location
2. shutdown immediate
3. copy control file to multiple locations & confirm from init.ora contol_files parameter
4. start the database.
5. run this query for changes confirmation - select name from v$controlfile;
Question 115: What is mean by Program Global Area (PGA)
Answer:
PGA - Program Global Area
or the Process Global Area is a memory region that contains data and control information for a single
server process or a single background process.
The PGA is allocated when a process is created and de-allocated when the process is terminated. PGA is
an area that is used by only one process.
Question 116: What is meant by recursive hints?
Answer:
Number of times processes repeatedly query the dictionary table is called recursive hints. It is due to
the data dictionary cache is too small. By increasing the SHARED_POOL_SIZE parameter we can
optimize the size of Data Dictionary Cache.
Question 117: Is it possible to use raw devices as data files and what is the advantages over
filesystem files ?
Answer:
Yes.
The advantages over file system files:

I/O will be improved because Oracle will bypass the OS. Disk Corruption will be very less.
Question 118: What are disadvantages of having raw devices?
Answer:
We have to depend on export/import utility for backup/recovery
The tar command cannot be used for physical file backup, instead we have to use dd command which is
less flexible and has limited recoveries.
Question 119. What are the system resources that can be controlled by profile?
Answer:
1. Number of concurrent sessions by user
2. CPU processing time
3. Amount of Logical I/O
4. Amount of Idle time

Question 120. Explain different level of Auditing


Answer:
Statement Auditing
Privilege Auditing
Object Auditing
Question 121. Explain the difference between $ORACLE_HOME and $ORACLE_BASE.
Answer:
ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is
where the oracle products reside.
Question 122. Name three advisory statistics you can collect.
Answer:
Database Cache Advisory
Shared Pool Advisory
PGA Advisory
Question 123. When a user process fails, what background process cleans up after it?
Answer:
PMON
Question 124. How would you force a log switch?
Answer:
ALTER SYSTEM SWITCH LOGFILE;
Question 125. When creating a user, what permissions must you grant to allow them to connect to
the database?
Answer:
CREATE SESSION
Question 126. What view would you use to determine free space in a tablespace?
Answer:
DBA_FREE_SPACE

Question 127. How would you determine who has added a row to a table?
Answer:
If database auditing is turned ON, query SYS.AUD$ table
Question 128. You have just compiled a PL/SQL package but got errors, how would you view the
errors?
Answer:
SHOW ERRORS

Question 129. How can you enable a trace for a session?


Answer:
ALTER SESSION SET TRACING ON
Question 130. 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 won't complain about missing Archivelogs.
Answer:
Crosscheck command
Question 131. Which RMAN command is used to create an exact replica of a database in new
host?
Answer:
DUPLICATE DATABASE
Question 132. How do you install STATSPACK?
Answer:
By running $ORACLE_HOME/rdbms/admin/spcreate.sql script
Question 133. 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?)
Answer:

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

Run STATSPACK report to identify:


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

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.
Question 134. Which is most important v$ view to see performance related information?
Answer:
V$WAITSTAT
Question 135. Explain below wait events in STATSPACK report
DB SCATTERED READ, DB SEQUENTIAL REAL, ENQUEUE
Answer:
DB SCATTERED READ
DB SEQUENTIAL REAL
ENQUEUE
- FULL TABLE SCAN
- IO
- LOCKING

Question 135. List five most important parameter in 9i affecting performance


Answer:
CURSOR_SHARING
DB_CACHE_SIZE
PGA_AGGREGATE_TARGET
DB_16K_CACHE_SIZE, DB_8K_CACHE_SIZE, DB_2K_CACHE_SIZE
Question 136. What is PGA_AGGREGATE_TARGET?
Answer:
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 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.
Question 137. How do you analyze table partition using Oracle provided package?
Answer:
DBMS_STATS.GATHER_TABLE_STATS with GRANULARITY => 'PARTITION' OPTION
Question 138. You see a wait on LMS process in statspack, what does that mean?
Answer:
A. Wait is due to Data Guard Broker.
Question 139. Name three advisory statistics you can collect.
Answer:
SHARED_POOL_ADVICE
PGA_TARGET_ADVICE
DB_CACHE_ADVICE
Question 140. Explain procedure to Change CHARACTERSET of a database.

Answer:
Can't change CHARACTERSET of a database, you will need to re-create the database with appropriate
CHARACTERSET.
Question 141. If you had a tablespace, TEST_TABLESPACE, which consists of three files:
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?
Answer:
All Archivelogs

Question 142. How do you put database is ARCHIVELOG mode, explain procedure
Answer:
1. Modify init.ora parameter START_ARCHIVE=TRUE
2. SQL> SHUTDOWN IMMEDIATE;
3. STARTUP MOUNT;
4. ALTER DATAVASE ARCHIVELOG;
5. ALTER DATABASE OPEN;
Question 143. How do you create PASSWORD FILE?
Answer:
using orapwd utility
Question 144. How can you tell if an index on particular table is USED or NOT USED in 9i?
Answer:
By turning MONITORING ON that index and querying into INDEX_USAGE table
Question 145. How do you switch from an init.ora file to a spfile?
Answer:
SQL> CREATE SPFILE FROM PFILE;
Question 146. Explain FORCE LOGGING feature in 9i.
Answer:
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
Question 147. Explain the use of setting GLOBAL_NAMES equal to TRUE.
Answer:
Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or
FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database
to which they are linking.
Question 148. How do you set up 9i Data Guard?
Answer:

Take a full hot backup of Primary database


Create standby control file
Transfer full backup, init.ora, standby control file to standby node.
Modify init.ora file on standby node.
Restore database
Recover Standby database
(Alternatively, RMAN command DUPLICATE DATABASE FOR STANDBY DO RECOVERY can
be also used)
Setup FAL_CLIENT and FAL_SERVER parameters on both sides
Put Standby database in Managed Recover mode

Question 149. How do you create Physical Standby database?


Answer:
Take a full hot backup of Primary database
Create standby control file
Transfer full backup, init.ora, standby control file to standby node.
Modify init.ora file on standby node.
Restore database
Recover Standby database
(Alternatively, RMAN command DUPLICATE DATABASE FOR STANDBY DO RECOVERY can
be also used)
Setup FAL_CLIENT and FAL_SERVER parameters on both sides
Put Standby database in Managed Recover mode
Question 150. Explain LOG_ARCHIVE_DEST_2 parameter and Dataguard related parameters.
Answer:
log_archive_dest_2='SERVICE=ORACLE_SID_STBY optional lgwr async=20480 noaffirm reopen=15
max_failure=10 net_timeout=30 delay=0'
Question 151. Explain Database SWITCH OVER PROCEDURE
Answer:
On Primary:
alter database commit to switchover to physical standby with session shutdown;
shutdown;
startup nomount;
alter database mount standby database;
recover managed standby database disconnect from session;
On Standby:
alter database commit to switchover to primary;
shutdown;

startup;
Question 152. Exaplain How to Activate STANDBY Database
Answer:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE ACTIVATE STANDBY DATABASE;
SHUTDOWN IMMEDIATE;
STARTUP;
Question 153. What do you know about VCS?
Answer:
VCS stands for Veritas Cluster Software.
VCS is used as a High Availability solution in case of host failure. There will be typically two nodes in a
cluster and database will be running on one node. Incase of host failure, VCS will failover database
(service group) to second node.
Question 154. What are typical resources in VCS service group?

Answer:
In typical VCS configuration, there are three main resources required for Oracle database failover.
1. Oracle Database
2. Listener
3. Filesystems
Question 155. Which file contains VCS service group and resource information?
Answer:
Main.cf
Question 156. What database related information we need to set in VCS?
Answer:
ORACLE_SID
LISTENER name
LISTENER password (if used)
Oracle filesystems that will be failed over
Location to init.ora/spfile if not available at default location
Question 157. What is VCS in-depth monitoring?
Answer:
In VCS in-depth monitoring, a database user (VCSMON) will be created which will login to database at
certain interval (i.e. every 5 minute) to see if database connectivity is OK. For some reason, if this user
can t login VCS will fail over the database to second node.
Question 158. In ACTIVE VCS environment, you need to recycle the database but doesnt want
database to failover to other node. What you must do before shutting down the database, so it doesn t
failover to other node?
Answer:
You need to FREEZE the service group.
Alternatively, you can make Oracle resource NON-CRITICAL (not recommended)
Question 159. What if you accidentally shutdown the LISTENER in VCS environment?

Answer:
If Listener Resource is marked CRITICAL, and Restart Attempt is set to 0, then Service Group will failover
to second node.
It is recommended for Listener resource to set RESTART ATTEMPTS value to 3.
Question 160. Explain Automatic Segment Space Management
Answer:
Automatic Segment Space Management features was introduced in 9i which simplifies management of
free space usage within object for below parameter:
FREELIST
FREELIST GROUPS
PCTUSED

Question 161. How do you REBUILD index online and Compute Statistics at the same time?
Answer:
ALTER INDEX INDEX_NAME REBUILD COMPUTE STATISTICS ONLINE;
Question 162. Explain Bitmap Join Indexes
Answer:
Bitmap Join Indexes pre-stores results of a join and can avoid an expensive join operation at runtime.
Question 162. Which parameters can be modified dynamically as part of 9i Dynamic Memory
Management feature?
Answer:
Below parameters can be modified dynamically as part of 9i Dynamic Memory Management feature
DB_CACHE_SIZE
SHARED_POOL_SIZE
LARGE_POOL_SIZE
JAVA_POOL_SIZE
Question 163. What additional statistics are gathered by DBMS_STATS that were not available in
earlier version or by using ANALYE command?
Answer:
In 9i DBMS_STATS package now collects below statistics as well:
CPU Usage
System I/O
Question 163. Explain Different values supported by CURSOR_SHARING parameter and its
explanation
Answer:
Below values are supported by CURSOR_SHARING init.ora parameter:
FORCE - Literals will be replaced by system generated bind variables where possible
SIMILAR - Oracle determines which literals are "safe" for substitution with bind variables. This will result
in some SQL not being shared in an attempt to provide a more efficient execution plan.

EXACT - Only allows statements with identical text to share the same cursor
Question 163. Name three very important Hit Ratios in database
Answer:
Buffer Cache Hit Ratio
Data Dictionary Hit Ratio
Library Cache Hit Ratio
(Use V$SYSSTAT)
(Use V$ROWCACHE)
(Use V$LIBRARYCACHE, V$SGASTAT)
Question 164. Name Different Latches in database and Dynamic Performance Views to get more
information about Latches

Answer:
Database Latches:
Redo Allocation Latch
Redo Copy Latch
Row Cache Latch
Use V$LATCH, V$LATCHHOLDER, V$LATCHNAME to get more information about the latches
Question 165. In which scenarios you need to set Large Pool?
Answer:
You need to set Large Pool if you are using below:
MTS (Multithreaded Server)
RMAN backups
Question 166. Explain Tuning Process that involves Application, Database, OS, Network
Answer:
In such a scenario, tuning should perform in following order:
1. Business Rules
2. Data Design
3. Application Design
4. Logical Structure of the Database
5. Database Operations
6. Access Path
7. Memory Allocation
8. I/O and Physical Structure of the Database
9. Resource Allocation
10. OS
Question 167. Explain Different Tuning Areas in Database
Answer:
Following areas within database can be tuned:

Memory I/O CPU


Space Management
Redo & Checkpoint
Rollback Shared Pool, Buffer Cache, Redo Buffer, Sort Area Size, PGA, Large Pool
Multiple Database Writer Processes, Distributing I/O, RAID
Extent Allocation, Oracle Block Efficiency
Redo log file configuration, checkpoints
Retention, number of Rollback Segments, Optimal
Question 168. How do you setup Auditing in Database?
Answer:
If audit packages are not installed, run $ORACLE_HOME/rdbms/admin/cataudit.sql script
Modify initialization parameter AUDIT_TRAIL=DB and setup AUDIT_DUMP_DEST
Select what type of operations needs to be audited
View Audit results from SYS.AUD$ table
Question 169. Can you Audit System Operations? If Yes, how?
Answer:
SYS connections can be audited by setting init.ora parameter AUDIT_SYS_OPERATIONS=TRUE

Question 170. How can you setup Encryption in Database?


Answer:
Data within Database can be encrypted and decrypted using package:
DBMS_OBFUSCATION_TOOLKIT
Question 171. Name five parameters can be used for Password Management?
Answer:
Following parameters can be used to manage user password:
1.
2.
3.
4.
5.
FAILED_LOGIN_ATTEMPTS
PASSWORD_GRACE_TIME
PASSWORD_LIFE_TIME
PASSWORD_REUSE_MAX
PASSWORD_REUSE_TIME
Question 172: What is difference between Logical Standby Database and Physical Standby
database?
Answer:
The primary functional difference between logical and physical standby database setups is that logical
standby permits you to add additional objects (tables, indexes, etc) to the database, while physical
standby is always an exact structural duplicate of the master database. The downside, though, is that
logical standby is based on newer technologies (logical standby is new in Oracle 9.2) and tends to be
generally regarded as more temperamental than physical standby.

Technical UNIX
Every DBA should know something about the operating system that the database will be running on. The
questions here are related to UNIX but you should equally be able to answer questions related to
common Windows environments.
Question 1. How do you list the files in an UNIX directory while also showing hidden files?
Answer:
ls -ltra
Question 2. How do you execute a UNIX command in the background?
Answer:
Use the "&" at the end of command
Question 3. What UNIX command will control the default file permissions when files are created?
Answer:
Umask
Question 4. Explain the read, write, and execute permissions on a UNIX directory.
Answer:
Read allows you to see and list the directory contents.
Write allows you to create, edit and delete files and subdirectories in the directory.
Execute gives you the previous read/write permissions plus allows you to change into the directory and
execute programs or shells from the directory.
Question 5. The difference between a soft link and a hard link?
Answer:
A symbolic (soft) 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.
Question 6. Give the command to display space usage on the UNIX file system.
Answer:
df -lk
Question 7. Explain iostat, vmstat and netstat.

Answer:
Iostat reports on terminal, disk and tape I/O activity.
Vmstat reports on virtual memory statistics for processes, disk, tape and CPU activity.
Netstat reports on the contents of network data structures.
Question 8. How would you change all occurrences of a value using VI?
Answer:
Use:%s/<old>/<new>/g

Question 9. Give two UNIX kernel parameters that effect an Oracle install
Answer:
SHMMAX & SHMMNI
Question 10. Briefly, how do you install Oracle software on UNIX.
Answer:
Basically, set up disks, kernel parameters, create oracle user and dba group, and run runinstaller.
Question 11. How do you create a decision tree in a shell script?
Answer:
Depending on shell, usually a case-esac or an if-endif or fi structure
Question 12. What is a pipe and give an example?
Answer:
A pipe is two or more commands separated by pipe char '|'. That tells the shell to arrange for the output of
the preceding command to be passed as input to the following command.
Example : ls -l | pr
The output for a command ls is the standard input of pr.
When a sequence of commands are combined using pipe, then it is called pipeline.
Question 13. What is the difference between > and >> redirection operators?
Answer:
> is the output redirection operator when used it overwrites while >> operator appends into the file.
Question 14. What is the difference between process and thread.
Answer:
Creation of new process requires new resources and Address space whereas the thread can be created
in the same address space of the process which not only saves space and resources but are also easy to
create and delete, and many threads can exists in a process.
Question 15. What is the difference between a shell variable that is exported and the one that is
not exported?
Answer:

export LANG=C
will make the variable LANG the global variable, put it into the global environment. all other processes
can use it.
LANG=C
will change the value only in the current script.
Question 16. How will you list only the empty lines in a file (using grep)
Answer:
grep "^$" filename.txt

Question 17. What is Semaphore?


Answer:
A data object that represents the right to use a limited resource, used for synchronization and
communication between asynchronous processes.
Question 18. How do you execute a UNIX command in the background?
Answer:
You can use & at the end of command or use nohup command
Question 19. How do you check active shared memory segments?
Answer:
ipcs -a
Question 20. How do you check Paging/Swapping in Unix?
Answer:
You can check Paging/Swapping using below commands
vmstat s
prstat s
swap l
sar p
Question 21. How do you check number of CPU installed on Unix server?
Answer:
psrinfot v
Question 22. How do you check Paging/Swapping in Unix?
Answer:
Vmstat s
Prstat s
Swap l
Sar p

PRACTICAL ORACLE DBA QUESTIONS:


A DBA interview can be difficult both for the interviewer and the candidate. The role involves technical
skills, process skills, and personal communications skills. Although those three skill sets are all critical,
most "DBA interview questions" articles in the past have focused only on the questions you can use to
judge a person s technical qualifications. In this article, you will see questions an interviewer can pose to
the DBA candidate to judge the other attributes of the job.
In addition, this article includes a set of questions DBAs should ask at some point during their interviews.
If the interviewer stops and asks "Do you have any questions for me?" don t sit there quietly. The
emphasis of the DBA questions provided in this article is the organization s process focus and its
technical career path for DBAs. All of the questions provided here are intended as starting points; based
on the answers to the questions, you should ask follow-ups to understand how the answer will affect your
day-to-day activities and your long-term prospects. Of course, if you ask a question to the interviewer, you
should be prepared to answer the same question concerning your present work environment.
Questions to ask the interviewer:
Process control issues:
What processes do you follow while implementing changes in production?
Beside the DBAs and system administrators, who has access to the "Oracle" operating system account?
How often is the oracle operating system account password changed?
Are the DBAs co-located with the teams they support? How is capacity planning performed?
Is there adequate capacity already in place to support the expected growth over the next year? Future
opportunities/organization issues:
Is there a formal job definition for the DBA role? Is there a defined technical career path?
How is IT aligned with the business areas?
How many employees report to more than one manager? How do you determine if a DBA has been
successful?
How are the application DBAs and production control DBAs organized?
Questions that will be asked to you

Writing skills:
Please bring along a copy of the last status report you ve submitted, as well as any articles. If you haven t
brought one along, please mail me one after the interview.
Perseverance in technical expertise:
What errors did you hit during your most recent database recovery?
What was the most difficult technical obstacle you encountered during your last project?
Perseverance in relationships:
What negative "group relationship" issues exist in your current working environment? How are you
addressing them?
What is your most difficult set of users, and how do you manage that relationship? What do you want to
learn in the next 12 months?
What communications method do you usually use when dealing with users? Can you provide examples?
What communications method is most effective when customers need your help?
Technical Experience:
(Use hypothetical questions rather than straight technical questions)
What database and overall architecture would you suggest for testing new middleware without impacting
production?
How do you assess my database s health?
How would you approach a performance problem with a three-tier application? How do you test your
backup/recovery procedures?
How would you support the upgrade process for multiple applications, with different application rollout
cycles, in the same instance?

These are samples; use a question from each category to guide a discussion of the way the
communications skills, process knowledge, and technical aspects of the job are interrelated in the role. If
the interviewer and the candidate can agree on what a successful DBA looks like in the environment,
there is a strong foundation for a future working relationship.

Oracle RAC Interview questions and answers


What are Oracle Clusterware processes for 10g on Unix and Linux
Cluster Synchronization Services (ocssd) Manages cluster node membership and runs as the
oracle user; failure of this process results in cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources (which could be a
database, an instance, a service, a Listener, a virtual IP (VIP) address, an application process, and
so on) based on the resource's configuration information that is stored in the OCR. This includes
start, stop, monitor and failover operations. This process runs as the root user
Event manager daemon (evmd) A background process that publishes events that crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and provide I/O
fencing. OPROCD performs its check, stops running, and if the wake up is beyond the expected
time, then OPROCD resets the processor and reboots the node. An OPROCD failure results in
Oracle Clusterware restarting the node. OPROCD uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific requirements and
complex resources. Runs server callout scripts when FAN events occur.
What are Oracle database background processes specific to RAC
LMSGlobal Cache Service Process
LMDGlobal Enqueue Service Daemon
LMONGlobal Enqueue Service Monitor
LCK0Instance Enqueue Process
To ensure that each Oracle RAC database instance obtains the block that it needs to satisfy a
query or transaction, Oracle RAC instances use two processes, the Global Cache Service (GCS)
and the Global Enqueue Service (GES). The GCS and GES maintain records of the statuses of

each data file and each cached block using a Global Resource Directory (GRD). The GRD
contents are distributed across all of the active instances.
What are Oracle Clusterware Components
Voting Disk Oracle RAC uses the voting disk to manage cluster membership by way of a
health check and arbitrates cluster ownership among the instances in case of network failures.
The voting disk must reside on shared disk.
Oracle Cluster Registry (OCR) Maintains cluster configuration information as well as
configuration information about any cluster database within the cluster. The OCR must reside on
shared disk that is accessible by all of the nodes in your cluster
How do you troubleshoot node reboot
Please check metalink ...
Note 265769.1 Troubleshooting CRS Reboots
Note.559365.1 Using Diagwait as a diagnostic to get more information for diagnosing Oracle
Clusterware Node evictions.
How do you backup the OCR
There is an automatic backup mechanism for OCR. The default location is :
$ORA_CRS_HOME\cdata\"clustername"\
To display backups :
#ocrconfig -showbackup
To restore a backup :
#ocrconfig -restore
With Oracle RAC 10g Release 2 or later, you can also use the export command:
#ocrconfig -export -s online, and use -import option to restore the contents back.
With Oracle RAC 11g Release 1, you can do a manaual backup of the OCR with the command:
# ocrconfig -manualbackup
How do you backup voting disk
#dd if=voting_disk_name of=backup_file_name
How do I identify the voting disk location
#crsctl query css votedisk
How do I identify the OCR file location

check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)


or
#ocrcheck
Is ssh required for normal Oracle RAC operation ?
"ssh" are not required for normal Oracle RAC operation. However "ssh" should be enabled for
Oracle RAC and patchset installation.
What is SCAN?
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC) 11g
Release 2 feature that provides a single name for clients to access an Oracle Database running in
a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in
the cluster.
Click here for more details from Oracle
What is the purpose of Private Interconnect ?
Clusterware uses the private interconnect for cluster synchronization (network heartbeat) and
daemon communication between the the clustered nodes. This communication is based on the
TCP protocol.
RAC uses the interconnect for cache fusion (UDP) and inter-process communication (TCP).
Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches of
participating nodes in the cluster.
Why do we have a Virtual IP (VIP) in Oracle RAC?
Without using VIPs or FAN, clients connected to a node that died will often wait for a TCP
timeout period (which can be up to 10 min) before getting an error. As a result, you don't really
have a good HA solution without using VIPs.
When a node fails, the VIP associated with it is automatically failed over to some other node and
new node re-arps the world indicating a new MAC address for the IP. Subsequent packets sent to
the VIP go to the new node, which will send error RST packets back to the clients. This results in
the clients getting errors immediately.
What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in AWR Report?
This is most likely due to a fault in interconnect network.
Check netstat -s
if you see "fragments dropped" or "packet reassemblies failed" , Work with your system
administrator find the fault with network.
How many nodes are supported in a RAC Database?

10g Release 2, support 100 nodes in a cluster using Oracle Clusterware, and 100 instances in a
RAC database.
Srvctl cannot start instance, I get the following error PRKP-1001 CRS-0215, however
sqlplus can start it on both nodes? How do you identify the problem?
Set the environmental variable SRVM_TRACE to true.. And start the instance with srvctl. Now
you will get detailed error stack.
what is the purpose of the ONS daemon?
The Oracle Notification Service (ONS) daemon is an daemon started by the CRS clusterware as
part of the nodeapps. There is one ons daemon started per clustered node.
The Oracle Notification Service daemon receive a subset of published clusterware events via the
local evmd and racgimon clusterware daemons and forward those events to application
subscribers and to the local listeners.
This in order to facilitate:
a. the FAN or Fast Application Notification feature or allowing applications to respond to
database state changes.
b. the 10gR2 Load Balancing Advisory, the feature that permit load balancing accross different
rac nodes dependent of the load on the different nodes. The rdbms MMON is creating an
advisory for distribution of work every 30seconds and forward it via racgimon and ONS to
listeners and applications.

Interview Questions
Oracle interview questions - Part 2
<<Previous Next>> Part 1 | Part 2 | Part 3 | Part 4 | part 5 | part 6 | part 7 | part 8 |
part 9
What is implicit cursor in Oracle?

Latest answer: An implicit cursor is a cursor which is internally created by Oracle, It is created
by Oracle for each individual SQL...........
Read answer
Can you pass a parameter to a cursor? Explain with an explain

Latest answer: Yes, explicit cursors can take parameters...........


Read answer
What is a package cursor?

Latest answer: In a package cursor, the SQL statement for the cursor is attached dynamically at
runtime from calling procedures............
Read answer
Explain why cursor variables are easier to use than cursors.

Latest answer: They are easier to define as there is no need to specify a query statement, The
query can also be specified dynamically at the opening time...........
Read answer
What is locking, advantages of locking and types of locking in oracle?

Latest answer: Locking protect table when several users are accessing the same table. Locking
is a concurrency control technique in oracle. It helps in data integrity while allowing
maximum..........
Read answer
What are transaction isolation levels supported by Oracle?

Latest answer: READ COMMITTED: If row locks are obtained by a certain transaction, then
any other transaction that contains DML needs to wait until the row locks have been released by
that particular transaction.............
Read answer
Explain how to view existing locks on the database.

Latest answer: A number of data locks need to be monitored, in order to maintain a good

Oracle RAC Interview Questions & Answers


1. Where are the Clusterware files stored on a RAC environment?
The Clusterware is installed on each node (on an Oracle Home) and on the shared disks (the voting disks
and the CSR file)
2. Where are the database software files stored on a RAC environment?
The base software is installed on each node of the cluster and the
database storage on the shared disks.
3. What kind of storage we can use for the shared Clusterware files?
- OCFS (Release 1 or 2)
- raw devices
- third party cluster file system such as GPFS or Veritas
4. What kind of storage we can use for the RAC database storage?
- OCFS (Release 1 or 2)
- ASM
- raw devices
- third party cluster file system such as GPFS or Veritas
5. What is a CFS?
A cluster File System (CFS) is a file system that may be accessed (read and write) by all members in a
cluster at the same time. This implies that all members of a cluster have the same view.
6. What is an OCFS2?
The OCFS2 is the Oracle (version 2) Cluster File System which can be used for the Oracle Real
Application Cluster.
7. Which files can be placed on an Oracle Cluster File System?
- Oracle Software installation (Windows only)
- Oracle files (controlfiles, datafiles, redologs, files described by the bfile datatype)
- Shared configuration files (spfile)
- OCR and voting disk
- Files created by Oracle during runtime
Note: There are some platform specific limitations.
8. Do you know another Cluster Vendor?
HP Tru64 Unix, Veritas, Microsoft
9. How is possible to install a RAC if we dont have a CFS?
This is possible by using a raw device.

10. What is a raw device?


A raw device is a disk drive that does not yet have a file system set up. Raw devices are used for Real
Application Clusters since they enable the sharing of disks.
11. What is a raw partition?
A raw partition is a portion of a physical disk that is accessed at the lowest possible level. A raw partition
is created when an extended partition is created and logical partitions are assigned to it without any
formatting. Once formatting is complete, it is called cooked partition.
12. When to use CFS over raw?
A CFS offers:
- Simpler management
- Use of Oracle Managed Files with RAC
- Single Oracle Software installation
- Autoextend enabled on Oracle datafiles
- Uniform accessibility to archive logs in case of physical node failure
- With Oracle_Home on CFS, when you apply Oracle patches CFS guarantees that the updated
Oracle_Home is visible to all nodes in the cluster.
Note: This option is very dependent on the availability of a CFS on your platform.
13. When to use raw over CFS?
- Always when CFS is not available or not supported by Oracle.
- The performance is very, very important: Raw devices offer best performance without any intermediate
layer between Oracle and the disk.
Note: Autoextend fails on raw devices if the space is exhausted. However the space could be added
online if needed.
14. What CRS is?
Oracle RAC 10g Release 1 introduced Oracle Cluster Ready Services (CRS), a platform-independent set
of system services for cluster environments. In Release 2, Oracle has renamed this product to Oracle
Clusterware.
15. What is VIP IP used for?
It returns a dead connection IMMIDIATELY, when its primary node fails. Without using VIP IP, the clients
have to wait around 10 minutes to receive ORA-3113: end of file on communications channel. However,
using Transparent Application Failover (TAF) could avoid ORA-3113.
16. Why we need to have configured SSH or RSH on the RAC nodes?
SSH (Secure Shell,10g+) or RSH (Remote Shell, 9i+) allows oracle UNIX account connecting to another
RAC node and copy/ run commands as the local oracle UNIX account.
17. Is the SSH, RSH needed for normal RAC operations?
No. SSH or RSH are needed only for RAC, patch set installation and clustered database creation.
18. Do we have to have Oracle RDBMS on all nodes?
Each node of a cluster that is being used for a clustered database will typically have the RDBMS and
RAC software loaded on it, but not actual data files (these need to be available via shared disk).

19. What are the restrictions on the SID with a RAC database? Is it limited to 5
characters?
The SID prefix in 10g Release 1 and prior versions was restricted to five characters by install/ config tools
so that an ORACLE_SID of up to max of 5+3=8 characters can be supported in a RAC environment. The
SID prefix is relaxed up to 8 characters in 10g Release 2, see bug 4024251 for more information.
20. Does Real Application Clusters support heterogeneous platforms?
The Real Application Clusters do not support heterogeneous platforms in the same cluster.

21. Are there any issues for the interconnect when sharing the same switch as the
public network by using VLAN to separate the network?
RAC and Clusterware deployment best practices suggests that the interconnect (private connection) be
deployed on a stand-alone, physically separate, dedicated switch. On big network the connections could
be instable.
22. What is the Load Balancing Advisory?
To assist in the balancing of application workload across designated resources, Oracle Database 10g
Release 2 provides the Load Balancing Advisory. This Advisory monitors the current workload activity
across the cluster and for each instance where a service is active; it provides a percentage value of how
much of the total workload should be sent to this instance as well as service quality flag.
23. How many nodes are supported in a RAC Database?
With 10g Release 2, we support 100 nodes in a cluster using Oracle Clusterware, and 100 instances in a
RAC database. Currently DBCA has a bug where it will not go beyond 63 instances. There is also a
documentation bug for the max-instances parameter. With 10g Release 1 the Maximum is 63.

24. What is the Cluster Verification Utiltiy (cluvfy)?


The Cluster Verification Utility (CVU) is a validation tool that you can use to check all the important
components that need to be verified at different stages of deployment in a RAC environment.
25. What versions of the database can I use the cluster verification utility (cluvfy)
with?
The cluster verification utility is release with Oracle Database 10g Release 2 but can also be used with
Oracle Database 10g Release 1.
26. If I am using Vendor Clusterware such as Veritas, IBM, Sun or HP, do I still
need Oracle Clusterware to run Oracle RAC 10g?
Yes. When certified, you can use Vendor Clusterware however you must still install and use Oracle
Clusterware for RAC. Best Practice is to leave Oracle Clusterware to manage RAC. For details see
Metalink Note 332257.1 and for Veritas SFRAC see 397460.1.
27. Is RAC on VMWare supported?
Yes.

28. What is hangcheck timer used for ?


The hangcheck timer checks regularly the health of the system. If the system hangs or stop the node will
be restarted automatically.
There are 2 key parameters for this module:
-> hangcheck-tick: this parameter defines the period of time between checks of system health. The
default value is 60 seconds; Oracle recommends setting it to 30seconds.
-> hangcheck-margin: this defines the maximum hang delay that should be tolerated before hangchecktimer resets the RAC node.
29. Is the hangcheck timer still needed with Oracle RAC 10g?
Yes.
30. What files can I put on Linux OCFS2?
For optimal performance, you should only put the following files on Linux OCFS2:
- Datafiles
- Control Files
- Redo Logs
- Archive Logs
- Shared Configuration File (OCR)
- Voting File
- SPFILE
31. Is it possible to use ASM for the OCR and voting disk?
No, the OCR and voting disk must be on raw or CFS (cluster file system).
32. Can I change the name of my cluster after I have created it when I am using
Oracle Clusterware?
No, you must properly uninstall Oracle Clusterware and then re-install.
33. What the O2CB is?
The O2CB is the OCFS2 cluster stack. OCFS2 includes some services. These services must be started
before using OCFS2 (mount/ format the file systems).
34. What the OCR file is used for?
OCR is a file that manages the cluster and RAC configuration.
35. What the Voting Disk file is used for?
The voting disk is nothing but a file that contains and manages information of all the node memberships.
36. What is the recommended method to make backups of a RAC
environment?
RMAN to make backups of the database, dd to backup your voting disk
and hard copies of the OCR file.
37. What command would you use to check the availability of the RAC system?
crs_stat -t -v (-t -v are optional)
38. What is the minimum number of instances you need to have in order to create
a RAC?
You can create a RAC with just one server.

39. Name two specific RAC background processes


RAC processes are: LMON, LMDx, LMSn, LKCx and DIAG.
40. Can you have many database versions in the same RAC?
Yes, but Clusterware version must be greater than the greater database version.
41. What was RAC previous name before it was called RAC?OPS: Oracle Parallel Server
42. What RAC component is used for communication between instances?Private
Interconnect.
43. What is the difference between normal views and RAC views?A RAC view has the
prefix G. For example, GV$SESSION instead of V$SESSION
44. Which command will we use to manage (stop, start) RAC services in
command-line mode?
srvctl
45. How many alert logs exist in a RAC environment?
A- One for each instance.
46. What are Oracle Clusterware Components
Voting Disk Oracle RAC uses the voting disk to manage cluster membership by way of a health
check and arbitrates cluster ownership among the instances in case of network failures. The voting disk
must reside on shared disk.
Oracle Cluster Registry (OCR) Maintains cluster configuration information as well as configuration
information about any cluster database within the cluster. The OCR must reside on shared disk that is
accessible by all of the nodes in your cluster
47. How do you backup voting disk
#dd if=voting_disk_name of=backup_file_name
48. How do I identify the voting disk location
#crsctl query css votedisk
49. How do I identify the OCR file location
check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
or
#ocrcheck
50. What is SCAN?
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC) 11g Release 2
feature that provides a single name for clients to access an Oracle Database running in a cluster. The
benefit is clients using SCAN do not need to change if you add or remove nodes in the cluster.

Find the Practical Core DBA Questions here in this blog


1. What is the major difference between 10g and 11g RAC?
Well, there is not much difference between 10g and 11gR (1) RAC.
But there is a significant difference in 11gR2.
Prior to 11gR1(10g) RAC, the following were managed by Oracle CRS
o
o
o
o
o
o

Databases
Instances
Applications
Node Monitoring
Event Services
High Availability

From 11gR2(onwards) its completed HA stack managing and providing the following
resources as like the other cluster software like VCS etc.

Databases
Instances
Applications
Cluster Management
Node Management
Event Services
High Availability
Network Management (provides DNS/GNS/MDNSD services on behalf of other
traditional services) and SCAN Single Access Client Naming method, HAIP
Storage Management (with help of ASM and other new ACFS filesystem)
Time synchronization (rather depending upon traditional NTP)
Removed OS dependent hang checker etc, manages with own additional monitor process

2. What are Oracle Cluster Components?


Cluster Interconnect (HAIP)
Shared Storage (OCR/Voting Disk)
Clusterware software
3. What are Oracle RAC Components?

VIP, Node apps etc.


4. What are Oracle Kernel Components (nothing but how does Oracle RAC database
differs than Normal single instance database in terms of Binaries and process)
Basically Oracle kernel need to switched on with RAC On option when you convert to RAC, that
is the difference as it facilitates few RAC bg process like LMON,LCK,LMD,LMS etc.
To turn on RAC
# link the oracle libraries
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_on
# rebuild oracle
$ cd $ORACLE_HOME/bin
$ relink oracle
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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor
5. What is Clusterware?
Software that provides various interfaces and services for a cluster. Typically, this includes
capabilities that:

Allow the cluster to be managed as a whole


Protect the integrity of the cluster
Maintain a registry of resources across the cluster
Deal with changes to the cluster
Provide a common view of resources

6. What are the background process that exists in 11gr2 and functionality?
Process Name Functionality
crsd
The CRS daemon (crsd) manages cluster resources based on configuration
information that is stored in Oracle Cluster Registry (OCR) for each resource.

This includes start, stop, monitor, and failover operations. The crsd process
generates events when the status of a resource changes.
Cluster Synchronization Service (CSS): Manages the cluster configuration by
controlling which nodes are members of the cluster and by notifying members
when a node joins or leaves the cluster. If you are using certified third-party
clusterware, then CSS processes interfaces with your clusterware to manage node
membership information. CSS has three separate processes: the CSS daemon
cssd
(ocssd), the CSS Agent (cssdagent), and the CSS Monitor (cssdmonitor). The
cssdagent process monitors the cluster and provides input/output fencing. This
service formerly was provided by Oracle Process Monitor daemon (oprocd), also
known as OraFenceService on Windows. A cssdagent failure results in Oracle
Clusterware restarting the node.
Disk Monitor daemon (diskmon): Monitors and performs input/output fencing for
Oracle Exadata Storage Server. As Exadata storage can be added to any Oracle
diskmon
RAC node at any point in time, the diskmon daemon is always started when ocssd
is started.
Event Manager (EVM): Is a background process that publishes Oracle
evmd
Clusterware events
Multicast domain name service (mDNS): Allows DNS requests. The mDNS
mdnsd
process is a background process on Linux and UNIX, and a service on Windows.
Oracle Grid Naming Service (GNS): Is a gateway between the cluster mDNS and
gnsd
external DNS servers. The GNS process performs name resolution within the
cluster.
Oracle Notification Service (ONS): Is a publish-and-subscribe service for
ons
communicating Fast Application Notification (FAN) events
oraagent: Extends clusterware to support Oracle-specific requirements and
oraagent
complex resources. It runs server callout scripts when FAN events occur. This
process was known as RACG in Oracle Clusterware 11g Release 1 (11.1).
Oracle root agent (orarootagent): Is a specialized oraagent process that helps
orarootagent CRSD manage resources owned by root, such as the network, and the Grid virtual
IP address
Cluster kill daemon (oclskd): Handles instance/node evictions requests that have
oclskd
been escalated to CSS
Grid IPC daemon (gipcd): Is a helper daemon for the communications
gipcd
infrastructure
Cluster time synchronisation daemon(ctssd) to manage the time syncrhonization
ctssd
between nodes, rather depending on NTP
7. Under which user or owner the process will start?
Component
Oracle High Availability
Service
Cluster Ready Service (CRS)
Cluster Synchronization
Service (CSS)

Name of the Process

Owner

ohasd

init, root

Cluster Ready Services


ocssd,cssd monitor,
cssdagent

root
grid owner

Event Manager (EVM)


Cluster Time Synchronization
Service (CTSS)
Oracle Notification Service
(ONS)
Oracle Agent
Oracle Root Agent
Grid Naming Service (GNS)
Grid Plug and Play (GPnP)
Multicast domain name
service (mDNS)

evmd, evmlogger

grid owner

octssd

root

ons, eons

grid owner

oragent
orarootagent
gnsd
gpnpd

grid owner
root
root
grid owner

mdnsd

grid owner

8. What is startup sequence in Oracle 11g RAC? 11g RAC startup sequence?
Click here to know more details
9. As you said Voting & OCR Disk resides in ASM Diskgroups, but as per startup sequence
OCSSD starts first before than ASM, how is it possible?
How does OCSSD starts if voting disk & OCR resides in ASM Diskgroups?
You might wonder how CSSD, which is required to start the clustered ASM instance, can be
started if voting disks are stored in ASM? This sounds like a chicken-and-egg problem: without
access to the voting disks there is no CSS, hence the node cannot join the cluster. But without
being part of the cluster, CSSD cannot start the ASM instance. To solve this problem the ASM
disk headers have new metadata in 11.2: you can use kfed to read the header of an ASM disk
containing a voting disk. The kfdhdb.vfstart and kfdhdb.vfend fields tell CSS where to find the
voting file. This does not require the ASM instance to be up. Once the voting disks are located,
CSS can access them and joins the cluster.
Source: Pro Oracle Database 11g RAC on Linux- Martin Bach Amazon.com
10. How does SCAN works?

1. Client Connected through SCAN name of the cluster (remember all three IP addresses
round robin resolves to same Host name (SCAN Name), here in this case our scan name
is cluster01-scan.cluster01.example.com
2. The request reaches to DNS server in your corp and then resolves to one of the node out
of three. a. If GNS (Grid Naming service or domain is configured) that is a subdomain
configured in the DNS entry for to resolve cluster address the request will be handover to
GNS (gnsd)
3. Here in our case assume there is no GNS, now the with the help of SCAN listeners where
end points are configured to database listener.
4. Database Listeners listen the request and then process further.
5. In case of node addition, Listener 4, client need not to know or need not change any thing
from their tns entry (address of 4th node/instance) as they just using scan IP.
6. Same case even in the node deletion.
11. What is GNS?
Grid Naming service is alternative service to DNS , which will act as a sub domain in your DNS
but managed by Oracle, with GNS the connection is routed to the cluster IP and manages
internally.
12. What is GPNP?
Grid Plug and Play along with GNS provide dynamic

In previous releases, adding or removing servers in a cluster required extensive manual


preparation.
In Oracle Database 11g Release 2, GPnP allows each node to perform the following tasks
dynamically:
o
o
o

Negotiating appropriate network identities for itself


Acquiring additional information from a configuration profile
Configuring or reconfiguring itself using profile data, making host names and
addresses resolvable on the network

For example a domain should contain

Cluster name: cluster01


Network domain: example.com
GPnP domain: cluster01.example.com

To add a node, simply connect the server to the cluster and allow the cluster to configure the
node.
To make it happen, Oracle uses the profile located in $GI_HOME/gpnp/profiles/peer/profile.xml
which contains the cluster resources, for example disk locations of ASM. etc.
So this profile will be read local or from the remote machine when plugged into cluster and
dynamically added to cluster.
13. What are the file types that ASM support and keep in disk groups?
Control files
Data files
Temporary data files
Online redo logs
Archive logs

Flashback logs

Data Pump dump sets


Data Guard
DB SPFILE
configuration
Change tracking
RMAN backup sets
bitmaps
RMAN data file copies OCR files
Transport data files
ASM SPFILE

14. List Key benefits of ASM?

Stripes files rather than logical volumes


Provides redundancy on a file basis
Enables online disk reconfiguration and dynamic rebalancing
Reduces the time significantly to resynchronize a transient failure by tracking changes
while disk is offline
Provides adjustable rebalancing speed
Is cluster-aware
Supports reading from mirrored copy instead of primary copy for extended clusters

Is automatically installed as part of the Grid Infrastructure

15. List key benefits of Oracle Grid Infrastructure?


16. List some of the background process that used in ASM?
Process
RBAL
ARBn
GMON
MARK
Onnn
PZ9n

Description
Opens all device files as part of discovery and coordinates the
rebalance activity
One or more slave processes that do the rebalance activity
Responsible for managing the disk-level activities such as
drop or offline and advancing the ASM disk group
compatibility
Marks ASM allocation units as stale when needed
One or more ASM slave processes forming a pool of
connections to the ASM instance for exchanging messages
One or more parallel slave processes used in fetching data on
clustered ASM installation from GV$ views

13. What is node listener?


In 11gr2 the listeners will run from Grid Infrastructure software home

The node listener is a process that helps establish network connections from ASM clients
to the ASM instance.
Runs by default from the Grid $ORACLE_HOME/bin directory
Listens on port 1521 by default
Is the same as a database instance listener
Is capable of listening for all database instances on the same machine in addition to the
ASM instance
Can run concurrently with separate database listeners or be replaced by a separate
database listener
Is named tnslsnr on the Linux platform

15. What is SCAN listener?


A scan listener is something that additional to node listener which listens the incoming db
connection requests from the client which got through the scan IP, it got end points configured to
node listener where it routes the db connection requests to particular node listener.
16. What is the difference between CRSCTL and SRVCTL?
crsctl manages clusterware-related operations:

Starting and stopping Oracle Clusterware


Enabling and disabling Oracle Clusterware daemons

Registering cluster resources

srvctl manages Oracle resourcerelated operations:

Starting and stopping database instances and services


Also from 11gR2 manages the cluster resources like network,vip,disks etc

17. How to control Oracle Clusterware?


To start or stop Oracle Clusterware on a specific node:
# crsctl stop crs
# crsctl start crs
To enable or disable Oracle Clusterware on a specific node:
# crsctl enable crs
# crsctl disable crs
19. How to check the cluster (all nodes) status?
To check the viability of Cluster Synchronization Services (CSS) across nodes:
$ crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
20. How to check the cluster (one node) status?
$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
21. How to find Voting Disk location?

To determine the location of the voting disk:


# crsctl query css votedisk
## STATE File Universal Id File Name Disk group
- 1. ONLINE 8c2e45d734c64f8abf9f136990f3daf8 (ASMDISK01) [DATA]
2. ONLINE 99bc153df3b84fb4bf071d916089fd4a (ASMDISK02) [DATA]
3. ONLINE 0b090b6b19154fc1bf5913bc70340921 (ASMDISK03) [DATA]
Located 3 voting disk(s).
22. How to find Location of OCR?

cat /etc/oracle/ocr.loc

ocrconfig_loc=+DATA
local_only=FALSE

#OCRCHECK (also about OCR integrity)

23. List some background process that used in ASM Instances?


Process
RBAL
ARBn
GMON
MARK
Onnn
PZ9n

Description
Opens all device files as part of discovery and coordinates the
rebalance activity
One or more slave processes that do the rebalance activity
Responsible for managing the disk-level activities such as
drop or offline and advancing the ASM disk group
compatibility
Marks ASM allocation units as stale when needed
One or more ASM slave processes forming a pool of
connections to the ASM instance for exchanging messages
One or more parallel slave processes used in fetching data on
clustered ASM installation from GV$ views

24. What are types of ASM Mirroring?


Disk Group Type
External redundancy

Supported Mirroring Default Mirroring


Levels
Level
Unprotected (None)
Unprotected (None)

Normal redundancy
High redundancy

Two-wayThreeTwo-way
wayUnprotected (None)
Three-way
Three-way

25. What is ASM Striping?


ASM can use variable size data extents to support larger files, reduce memory requirements, and
improve performance.
Each data extent resides on an individual disk.
Data extents consist of one or more allocation units.
The data extent size is:

Equal to AU for the first 20,000 extents (019999)


Equal to 4 AU for the next 20,000 extents (2000039999)
Equal to 16 AU for extents above 40,000

ASM stripes files using extents with a coarse method for load balancing or a fine method to
reduce latency.

Coarse-grained striping is always equal to the effective AU size.


Fine-grained striping is always equal to 128 KB.

26. How many ASM Diskgroups can be created under one ASM Instance?
ASM imposes the following limits:

63 disk groups in a storage system


10,000 ASM disks in a storage system
Two-terabyte maximum storage for each ASM disk (non-Exadata)
Four-petabyte maximum storage for each ASM disk (Exadata)
40-exabyte maximum storage for each storage system
1 million files for each disk group
ASM file size limits (database limit is 128 TB):

1. External redundancy maximum file size is 140 PB.


2. Normal redundancy maximum file size is 42 PB.
3. High redundancy maximum file size is 15 PB.
27. How to find the cluster network settings?
To determine the list of interfaces available to the cluster:
$ oifcfg iflist p -n

To determine the public and private interfaces that have been configured:
$ oifcfg getif
eth0 192.0.2.0 global public
eth1 192.168.1.0 global cluster_interconnect
To determine the Virtual IP (VIP) host name, VIP address, VIP subnet mask, and VIP interface
name:
$ srvctl config nodeapps -a
VIP exists.:host01
VIP exists.: /192.0.2.247/192.0.2.247/255.255.255.0/eth0

28. How to change Public or VIP Address in RAC Cluster?


Click here for details
29. How to change Cluster interconnect in RAC?
On a single node in the cluster, add the new global interface specification:
$ oifcfg setif -global eth2/192.0.2.0:cluster_interconnect
Verify the changes with oifcfg getif and then stop Clusterware on all nodes by running the
following command as root on each node:
# oifcfg getif
# crsctl stop crs
Assign the network address to the new network adapters on all nodes using ifconfig:
#ifconfig eth2 192.0.2.15 netmask 255.255.255.0 broadcast 192.0.2.255
Remove the former adapter/subnet specification and restart Clusterware:
$ oifcfgdelif -global eth1/192.168.1.0
# crsctl start crs

30. Managing or Modifying SCAN in Oracle RAC?


To add a SCAN VIP resource:
$ srvctl add scan -n cluster01-scan
To remove Clusterware resources from SCAN VIPs:
$ srvctl remove scan [-f]
To add a SCAN listener resource:
$ srvctl add scan_listener
$ srvctl add scan_listener -p 1521
To remove Clusterware resources from all SCAN listeners:
$ srvctl remove scan_listener [-f]
31. How to check the node connectivity in Oracle Grid Infrastructure?
$ cluvfy comp nodecon -n all verbose
32. Can I stop all nodes in one command? Meaning that stopping whole cluster ?
In 10g its not possible, where in 11g it is possible
[root@pic1]# crsctl start cluster -all
[root@pic2]# crsctl stop cluster all
33. What is OLR? Which of the following statements regarding the Oracle Local Registry
(OLR) is true?
1.Each cluster node has a local registry for node-specific resources.
2.The OLR should be manually created after installing Grid Infrastructure on each node in the
cluster.
3.One of its functions is to facilitate Clusterware startup in situations where the ASM stores the
OCR and voting disks.
4.You can check the status of the OLR using ocrcheck.
34. What is runfixup.sh script in Oracle Clusterware 11g release 2 installation

With Oracle Clusterware 11g release 2, Oracle Universal Installer (OUI) detects when the
minimum requirements for an installation are not met, and creates shell scripts, called fixup
scripts, to finish incomplete system configuration steps. If OUI detects an incomplete task, then
it generates fixup scripts (runfixup.sh). You can run the fixup script after you click the Fix and
Check Again Button.
The Fixup script does the following:
If necessary sets kernel parameters to values required for successful installation, including:

Shared memory parameters.


Open file descriptor and UDP send/receive parameters.

Sets permissions on the Oracle Inventory (central inventory) directory. Reconfigures primary and
secondary group memberships for the installation owner, if necessary, for the Oracle Inventory
directory and the operating system privileges groups.

Sets shell limits if necessary to required values.

35. How to stop whole cluster with single command


crsctl stop cluster (possible only from 11gr2), please note crsctl commands becomes
global now, if you do not specify node specifically the command executed globally for
example
crsctl stop crs (stops in all crs resource in all nodes)
crsctl stop crs n <ndeoname) (stops only in specified node)
36. CRS is not starting automatically after a node reboot, what you do to make it happen?
crsctl enable crs (as root)
to disable
crsctl disable crs (as root)
37. What are server pools in 11gr2?
Read here
38. What is policy managed databases in RAC?
Read here
39. What is Load balancing & how does it work?
You must read here & here

40. Describe high level Steps to convert single instance to RAC?


Read here
41. What is the difference between TAF and FAN & FCF? at what conditions you use
them?
1) TAF with tnsnames
a feature of Oracle Net Services for OCI8 clients. TAF is transparent application failover which
will move a session to a backup connection if the session fails. With Oracle 10g Release 2, you
can define the TAF policy on the service using dbms_service package. It will only work with OCI
clients. It will only move the session and if the parameter is set, it will failover the select
statement. For insert, update or delete transactions, the application must be TAF aware and roll
back the transaction. YES, you should enable FCF on your OCI client when you use TAF, it will
make the failover faster.
Note: TAF will not work with JDBC thin.
2) FAN with tnsnames with aq notifications true
FAN is a feature of Oracle RAC which stands for Fast Application Notification. This allows the
database to notify the client of any change (Node up/down, instance up/down, database
up/down). For integrated clients, inflight transactions are interrupted and an error message is
returned. Inactive connections are terminated.
FCF is the client feature for Oracle Clients that have integrated with FAN to provide fast
failover for connections. Oracle JDBC Implicit Connection Cache, Oracle Data Provider for
.NET (ODP.NET) and Oracle Call Interface are all integrated clients which provide the Fast
Connection Failover feature.
3) FCF, along with FAN when using connection pools
FCF is a feature of Oracle clients that are integrated to receive FAN events and abort inflight
transactions, clean up connections when a down event is received as well as create new
connections when a up event is received. Tomcat or JBOSS can take advantage of FCF if the
Oracle connection pool is used underneath. This can be either UCP (Universal Connection Pool
for JAVA) or ICC (JDBC Implicit Connection Cache). UCP is recommended as ICC will be
deprecated in a future release.
4) ONS, with clusterware either FAN/FCF
ONS is part of the clusterware and is used to propagate messages both between nodes and to
application-tiers
ONS is the foundation for FAN upon which is built FCF.
RAC uses FAN to publish configuration changes and LBA events. Applications can react as those
published events in two way :
by using ONS api (you need to program it)
by using FCF (automatic by using JDBC implicit connection cache on the application server)
you can also respond to FAN event by using server-side callout but this on the server side (as
their name suggests it)

Relationship between FAN/FCF/ONS


ONS > FAN > FCF
ONS -> send/receive messages on local and remote nodes.
FAN -> uses ONS to notify other processes about changes in configuration of service level
FCF -> uses FAN information working with conection pools JAVA and others.
42. Can you add voting disk online? Do you need voting disk backup?
Yes, as per documentation, if you have multiple voting disk you can add online, but if you have
only one voting disk , by that cluster will be down as its lost you just need to start crs in
exclusive mode and add the votedisk using
crsctl add votedisk <path>
43. You have lost OCR disk, what is your next step?
The cluster stack will be down due to the fact that cssd is unable to maintain the integrity, this is
true in 10g, From 11gR2 onwards, the crsd stack will be down, the hasd still up and running. You
can add the ocr back by restoring the automatic backup or import the manual backup,
Read complete steps here
44. What happens when ocssd fails, what is node eviction? how does node eviction
happens? For all answer will be same.
Read here
45. What is virtual IP and how does it works?
Read here
46. Describe some rac wait events you experienced?
Oracle RAC Wait events
and this table,

47. Can you modify VIP address after your cluster installation?
Yes, read here
48. How do you interpret AWR report in RAC instances, what sections in awr report for rac
instances are most important?
Read here.
Update 12-May-2013, Some practical questions added here
1. Viewing Contents in OCR/Voting disks
There are three possible ways to view the OCR contents.
a.
OCRDUMP (or)
b.
crs_stat -p (or)
c.
By using strings.
Voting disk contents are not persistent and are not required to view
the contents, because the voting disk contents will be overwritten. if still
need to view, strings are used.

2. Server pools Read in my blog


3. Verifying Cluster Interconnect
i.
ii.
iii.
iv.

Cluster interconnects can be verified by:


oifcfg getif
From AWR Report.
show parameter cluster_interconnect
srvctl config network

4. Does scan IP required or we can disable it


SCAN IP can be disabled if not required. However SCAN IP is mandatory
during the RAC installation. Enabling/disabling SCAN IP is mostly used in
oracle apps environment by the concurrent manager (kind of job scheduler in
oracle apps).
To disable the SCAN IP,
i.
Do not use SCAN IP at the client end.
ii.
Stop scan listener
srvctl stop scan_listener
iii.
Stop scan
srvctl stop scan (this will stop the scan vip's)
iv.
Disable scan and disable scan listener
srvctl disable scan

5. Migrating to new Diskgroup scenarious


a.

Case 1: Migrating disk group from one storage to other with same name
1. Consider the disk group is DATA,
2. Create new disks in DATA pointing towards the new storage (EMC),
a) Partioning provisioning done by storage and they give you
the device name or mapper like /dev/mapper/asakljdlas
3. Add the new disk to diskgroup DATA
a) Alter diskgroup data add disk '/dev/mapper/asakljdlas'
3. drop the old disks from DATA with which rebalancing is done
automatically.
If you want you can the rebalance by alter system set asm_power_limit
=12 for full throttle.
alter diskgroup data drop disk 'path to hitachi storage'
Note: you can get the device name in v$asm_disk in path column.
4. Request SAN team to detach the old Storage (HITACHI).
b.
Case 2: Migrating disk group from one to another with different
diskgroup name.
1) Create the Disk group with new name in the new storage.
2) Create the spfile in new diskgroup and change the parameter scope =
spfile for control files etc.
3) Take a control file backup in format +newdiskgroup
4) Shutdown the db, startup nomount the database
5) restore the control file from backup (now the control will restore
to new diskgroup)
6) Take the RMAN backup as copy of all the databases with new format.
RMAN&gt; backup database as copy format '+newdiskgroup name' ;
3) RMAN&gt; Switch database to copy.

4) Verify dba_data_files,dba_temp_files, v$log that all files are


pointing to new diskgroup name.
c.
Case 3: Migrating disk group to new storage but no additional
diskgroup given
1) Take the RMAN backup as copy of all the databases with new format
and place it in the disk.
2) Prepare rename commands from v$log ,v$datafile etc (dynamic
queries)
3) Take a backup of pfile and modify the following referring to new
diskgroup name
.control_files
.db_create_file_dest
.db_create_online_log_dest_1
.db_create_online_log_dest_2
.db_recovery_file_des
4) stop the database
5) Unmount the diskgroup
asmcmd umount ORA_DATA
6) use asmcmd renamedg (11gr2 only) command to
rename to new diskgroup
renamedg phase=both dgname=ORA_DATA
newdgname=NEW_DATA verbose=true
7) mount the diskgroup
asmcmd mount NEW_DATA
8) start the database in mount with new pfile taken backup in
step 3
9) Run the rename file scripts generated at step2
9) Add the diskgroup to cluster the cluster (if using rac)
srvctl modify database -d orcl -p +NEW_FRA/orcl/spfileorcl.ora
srvctl modify database -d orcl -a "NEW_DATA"
srvctl config database -d orcl
srvctl start database -d orcl
10) Delete the old diskgroup from
cluster
crsctl delete resource ora.ORA_DATA.dg
11) Open the database.

7. Database rename in RAC, what could be the checklist for you?


a.
databases.
b.
c.
d.
e.
f.

Take the outputs of all the services that are running on the

set cluster_database=FALSE
Drop all the services associated with the database.
Stop the database
Startup mount
Use nid to change the DB Name.
Generic question, If using ASM the usual location for the
datafile would be +DATA/datafile/OLDDBNAME/system01.dbf'
Does NID changes this path too? to reflect the new db name?
Yes it will, by using proper directory structure it will
create a links to original directory structure.
+DATA/datafile/NEWDBNAME/system01.dbf'
this has to be tested, We dont have test bed, but thanks to
Anji who confirmed it will

g.
h.
i.
j.
k.
l.
m.
n.
o.

Change the parameters according to the new database name


Change the password file.
Stop the database.
Mount the database
Open database with Reset logs
Create spfile from pfile.
Add database to the cluster.
Create the services that are dropped in prior to rename.
Bounce the database.

8.How to find the database in which particular service is attached to when you have a large
number of databases running in the server, you cannot check one by one manually
Write a shell script to read the database name from oratab and iterate the loop taking inpt as DB
name in srvctl to get the result.
#!/bin/ksh
ORACLE_HOME=<crs_home>
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=${SAVE_LLP}:${ORACLE_HOME}/lib
export TNS_ADMIN ORACLE_HOME PATH LD_LIBRARY_PATH
for INSTANCE in `cat /etc/oratab|grep -v ^#|cut -f1 -d: -s`
do
export ORACLE_SID=$INSTANCE
echo `srvctl status service -d $INSTANCE -s $1| grep -i is running`
done
9. Difference between OHAS and CRS
OHAS is complete cluster stack which includes some kernel level tasks like managing
network,time synchronization, disks etc, where the CRS has the ability to manage the resources
like database,listeners,applications, etc With both of this Oracle provides the high availability
clustering services rather only affinity to databases.
Suresh.

What are Oracle Clusterware processes for 10g on Unix and Linux
Cluster Synchronization Services (ocssd) Manages cluster node membership and
runs as the oracle user; failure of this process results in cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources (which
could be a database, an instance, a service, a Listener, a virtual IP (VIP) address, an
application process, and so on) based on the resource's configuration information

that is stored in the OCR. This includes start, stop, monitor and failover operations.
This process runs as the root user
Event manager daemon (evmd) A background process that publishes events that
crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and provide
I/O fencing. OPROCD performs its check, stops running, and if the wake up is
beyond the expected time, then OPROCD resets the processor and reboots the
node. An OPROCD failure results in Oracle Clusterware restarting the node. OPROCD
uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific
requirements and complex resources. Runs server callout scripts when FAN events
occur.
What are Oracle database background processes specific to RAC
LMSGlobal Cache Service Process
LMDGlobal Enqueue Service Daemon
LMONGlobal Enqueue Service Monitor
LCK0Instance Enqueue Process
To ensure that each Oracle RAC database instance obtains the block that it needs to
satisfy a query or transaction, Oracle RAC instances use two processes, the Global
Cache Service (GCS) and the Global Enqueue Service (GES). The GCS and GES
maintain records of the statuses of each data file and each cached block using a
Global Resource Directory (GRD). The GRD contents are distributed across all of the
active instances.
What are Oracle Clusterware Components
Voting Disk Oracle RAC uses the voting disk to manage cluster membership by
way of a health check and arbitrates cluster ownership among the instances in case
of network failures. The voting disk must reside on shared disk.
Oracle Cluster Registry (OCR) Maintains cluster configuration information as well
as configuration information about any cluster database within the cluster. The OCR
must reside on shared disk that is accessible by all of the nodes in your cluster
How do you troubleshoot node reboot

Please check metalink ...


Note 265769.1 Troubleshooting CRS Reboots
Note.559365.1 Using Diagwait as a diagnostic to get more information for
diagnosing Oracle Clusterware Node evictions.
How do you backup the OCR
There is an automatic backup mechanism for OCR. The default location is :
$ORA_CRS_HOME\cdata\"clustername"\
To display backups :
#ocrconfig -showbackup
To restore a backup :
#ocrconfig -restore
With Oracle RAC 10g Release 2 or later, you can also use the export command:
#ocrconfig -export -s online, and use -import option to restore the contents back.
With Oracle RAC 11g Release 1, you can do a manaual backup of the OCR with the
command:
# ocrconfig -manualbackup
How do you backup voting disk
#dd if=voting_disk_name of=backup_file_name
How do I identify the voting disk location
#crsctl query css votedisk
How do I identify the OCR file location
check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
or
#ocrcheck
Is ssh required for normal Oracle RAC operation ?
"ssh" are not required for normal Oracle RAC operation. However "ssh" should be
enabled for Oracle RAC and patchset installation.
What is SCAN?

Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC)
11g Release 2 feature that provides a single name for clients to access an Oracle
Database running in a cluster. The benefit is clients using SCAN do not need to
change if you add or remove nodes in the cluster.
Click here for more details from Oracle
What is the purpose of Private Interconnect ?
Clusterware uses the private interconnect for cluster synchronization (network
heartbeat) and daemon communication between the the clustered nodes. This
communication is based on the TCP protocol.
RAC uses the interconnect for cache fusion (UDP) and inter-process communication
(TCP). Cache Fusion is the remote memory mapping of Oracle buffers, shared
between the caches of participating nodes in the cluster.
Why do we have a Virtual IP (VIP) in Oracle RAC?
Without using VIPs or FAN, clients connected to a node that died will often wait for a
TCP timeout period (which can be up to 10 min) before getting an error. As a result,
you don't really have a good HA solution without using VIPs.
When a node fails, the VIP associated with it is automatically failed over to some
other node and new node re-arps the world indicating a new MAC address for the IP.
Subsequent packets sent to the VIP go to the new node, which will send error RST
packets back to the clients. This results in the clients getting errors immediately.
What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in
AWR Report?
This is most likely due to a fault in interconnect network.
Check netstat -s
if you see "fragments dropped" or "packet reassemblies failed" , Work with your
system administrator find the fault with network.
How many nodes are supported in a RAC Database?
10g Release 2, support 100 nodes in a cluster using Oracle Clusterware, and 100
instances in a RAC database.
Srvctl cannot start instance, I get the following error PRKP-1001 CRS0215, however sqlplus can start it on both nodes? How do you identify the
problem?
Set the environmental variable SRVM_TRACE to true.. And start the instance with

srvctl. Now you will get detailed error stack.


what is the purpose of the ONS daemon?
The Oracle Notification Service (ONS) daemon is an daemon started by the CRS
clusterware as part of the nodeapps. There is one ons daemon started per clustered
node.
The Oracle Notification Service daemon receive a subset of published clusterware
events via the local evmd and racgimon clusterware daemons and forward those
events to application subscribers and to the local listeners.
This in order to facilitate:
a. the FAN or Fast Application Notification feature or allowing applications to respond
to database state changes.
b. the 10gR2 Load Balancing Advisory, the feature that permit load balancing
accross different rac nodes dependent of the load on the different nodes. The rdbms
MMON is creating an advisory for distribution of work every 30seconds and forward
it via racgimon and ONS to listeners and applications.

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.
What is RAC and how is it different from non RAC databases?
RAC stands for Real Application Cluster, you have n number of instances running in
their own separate nodes and based on the shared storage. Cluster is the key
component and is a collection of servers operations as one unit. RAC is the best
solution for high performance and high availably. Non RAC databases has single
point of failure in case of hardware failure or server crash.
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 immediate
srvctl start database -d name [-o start_options]
srvctl stop database -d name [-o stop_options]
srvctl start database -d orcl -o mount
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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote 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.
What are the different network components are in 10g RAC?
public, private, and vip components
Private interfaces is for intra node communication. VIP is all about availability of
application. When a node fails then the VIP component fail over to some other node,
this is the reason that all applications should based on vip components means tns
entries should have vip entry in the host list
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.
What is Cache Fusion?
Cache fusion is the mechanism to transfer the data block from memory to memory
of one node to the other.If two nodes require the same block for query or update,
the block must be transfered from the cache of one node to the other. RAC system
must equipped with low-latency and high speed inter-connect to make it happen.
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.
Cache Fusion is essentially a memory-to-memory transfer of data between the
nodes in the RAC environment. Before Cache Fusion, a node was required to write
some of the data to disk before it could be transferred to the next node in the
cluster. Cache Fusion does a straight memory-to-memory transfer. In addition, each
node's SGA has a map of what data is contained in the other node's data caches.
The performance improvement is phenomenal. Oracle leverages the vendor's high

speed interconnects between the nodes to achieve the cache-to-cache data


transfers. Before Cache Fusion, when you added a node to the cluster to increase
performance of the application, it didn't always provide you with the performance
improvement that you hoped for. With Cache Fusion, you can easily cost justify the
addition of another node into a RAC cluster to increase the performance of the
application running on it. Oracle sales pitches describe it as 'near linear horizontal
scalability'.
What are the major RAC wait events?
In a RAC environment the buffer cache is global across all instances in the cluster
and hence the processing differs.The most common wait events related to this are
gc cr request and gc buffer busy
GC CR request :the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned
queries will increase the amount of data blocks requested by an Oracle session. The
more blocks requested typically means the more often a block will need to be read
from a remote instance via the interconnect.)
GC BUFFER BUSY: It is the time the remote instance locally spends accessing the
requested data block.
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 unix 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 environment?
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 characteristics controlled by Oracle services feature?
The charateristics include a unique name, workload balancing and failover
options,and high availability characteristics.
What enables 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,NETC
A
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
What is ORA-00603: ORACLE server session terminated by fatal error or ORA-29702:
error occurred in Cluster Group Service operation?
RAC node name was listed in the loopback address...
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 difference 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.
What are the three greatest benefits that RAC provides??
The three main benefits are availability, scalability, and the ability to use low cost
commodity hardware. RAC allows an application to scale vertically, by adding CPU,
disk and memory resources to an individual server. But RAC also provides horizontal
scalability, which is achieved by adding new nodes into the cluster. RAC also allows
an organization to bring these resources online as they are needed. This can save a
small or midsize organization a lot of money in the early stages of a project.
In a RAC environment, if a node in the cluster fails, the application continues to run
on the surviving nodes contained in the cluster. If your application is configured
correctly, most users won't even know that the node they were running on became
unavailable.
What are the major RAC wait events?
In a RAC environment the buffer cache is global across all instances in the cluster
and hence the processing
differs.The most common wait events related to this are gc cr request and gc buffer
busy
GC CR request: the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned
queries will increase the amount of data blocks
requested by an Oracle session. The more blocks requested typically means the
more often a block will need to be read from a remote instance via the
interconnect.)
GC BUFFER BUSY: It is the time the remote instance locally spends accessing the
requested data block.
What are the different network components in Oracle 10g RAC?
We have public, private, and VIP components. Private interfaces is for intra node
communication. VIP is all about availability of application. When a node fails then
the VIP component will fail over to some other node, this is the reason that all
applications should be based on VIP components. This means that tns entries
should have VIP entry in the host list.

Oracle DBA Interview Questions and Answers - RAC


Oracle RAC Interview Questions and Answers
How does OCSSD starts first if voting disk & OCR resides in ASM Diskgroups?
You might wonder how CSSD, which is required to start the clustered ASM instance, can
be started if voting disks are stored in ASM?
This sounds like a chicken-and-egg problem:
without access to the voting disks there is no CSS, hence the node cannot join the cluster.
But without being part of the cluster, CSSD cannot start the ASM instance.
To solve this problem the ASM disk headers have new metadata in 11.2:
you can use kfed to read the header of an ASM disk containing a voting disk.
The kfdhdb.vfstart and kfdhdb.vfend fields tell CSS where to find the voting file. This does not
require the ASM instance to be up.
Once the voting disks are located, CSS can access them and joins the cluster.
What is gsdctl in RAC? list gsdctl commands in Oracle RAC?
GSDCTL stands for Global Service Daemon Control, we can use gsdctl commands to start, stop,
and obtain the status of the GSD service on any platform.
The options for gsdctl are:$ gsdctl start -- To start the GSD service
$ gsdctl stop -- To stop the GSD service
$ gsdctl stat -- To obtain the status of the GSD service
Log file location for gsdctl:
$ ORACLE_HOME/srvm/log/gsdaemon_node_name.log
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.
Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations
of traditional shared-nothing and shared-disk approaches to provide a highly scalable and
available database solution for all the business applications.
Oracle RAC provides the foundation for enterprise grid computing.
What is Oracle RAC One Node?
Oracle RAC one Node is a single instance running on one node of the cluster while the 2nd node
is in cold standby mode. If the instance fails for some reason then RAC one node detect it and
restart the instance on the same node or the instance is relocate to the 2nd node incase there is
failure or fault in 1st node. The benefit of this feature is that it provides a cold failover solution
and it automates the instance relocation without any downtime and does not need a manual
intervention. Oracle introduced this feature with the release of 11gR2 (available with Enterprise

Edition).
What is RAC and how is it different from non RAC databases?
Oracle Real Application clusters allows multiple instances to access a single database, the
instances will be running on multiple nodes.
In Real Application Clusters environments, all nodes concurrently execute transactions against
the same database.
Real Application Clusters coordinates each node's access to the shared data to provide
consistency and integrity.
What are the advantages of RAC (Real Application Clusters)?
Reliability - if one node fails, the database won't fail
Availability - nodes can be added or replaced without having to shutdown the database
Scalability - more nodes can be added to the cluster as the workload increases
What is Oracle RAC One Node?
Oracle RAC one Node is a single instance running on one node of the cluster while the 2nd node
is in cold standby mode. If the instance fails for some reason then RAC one node detect it and
restart the instance on the same node or the instance is relocate to the 2nd node incase there is
failure or fault in 1st node. The benefit of this feature is that it provides a cold failover solution
and it automates the instance relocation without any downtime and does not need a manual
intervention. Oracle introduced this feature with the release of 11gR2 (available with Enterprise
Edition).
What is 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 instance 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 cache
fusion.
What command would you use to check the availability of the RAC system?
crs_stat -t -v (-t -v are optional)
How do we verify that RAC instances are running?
SQL>select * from V$ACTIVE_INSTANCES;
The query gives the instance number under INST_NUMBER column,host_:instancename under
INST_NAME column.
How can you connect to a specific node in a RAC environment?
tnsnames.ora ensure that you have INSTANCE_NAME specified in it.
Which is the "MASTER NODE" in RAC?
The node with the lowest node number will become master node and dynamic remastering of the
resources will take place.

To find out the master node for particular resource, you can query v$ges_resource for
MASTER_NODE column.
To find out which is the master node, you can see ocssd.log file and search for "master node
number".
when the first master node fails in the cluster the lowest node number will become master node.
What components in RAC must reside in shared storage?
All datafiles, controlfiles, SPFIles, redo log files must reside on cluster-aware shred storage.
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 are Oracle Cluster Components?
1.Cluster Interconnect (HAIP)
2.Shared Storage (OCR/Voting Disk)
3.Clusterware software
4.Oracle Kernel Components
What are Oracle RAC Components?
VIP, Node apps etc.
What are Oracle Kernel Components?
Basically Oracle kernel need to switched on with RAC On option when you convert to RAC, that
is the difference as it facilitates few RAC bg process like LMON,LCK,LMD,LMS etc.
How to turn on RAC?
# link the oracle libraries
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_on
# rebuild oracle
$ cd $ORACLE_HOME/bin
$ relink oracle
Disk architechture in RAC?
SAN (Storage Area Networks) - generally using fibre to connect to the SAN
NAS (Network Attached Storage) - generally using a network to connect to the NAS using either
NFS, ISCSI
What is Oracle Clusterware?
The Clusterware software allows nodes to communicate with each other and forms the cluster
that makes the nodes work as a single logical server.
The software is run by the Cluster Ready Services (CRS) using the Oracle Cluster Registry

(OCR) that records and maintains the cluster and node membership information and the voting
disk which acts as a tiebreaker during communication failures. Consistent heartbeat information
travels across the interconnect to the voting disk when the cluster is running.

Real Application Clusters


Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations
of traditional shared-nothing and shared-disk approaches to provide a highly scalable and
available database solution for all your business applications. Oracle RAC provides the
foundation for enterprise grid computing.
Oracles Real Application Clusters (RAC) option supports the transparent deployment of a single
database across a cluster of servers, providing fault tolerance from hardware failures or planned
outages. Oracle RAC running on clusters provides Oracles highest level of capability in terms of
availability, scalability, and low-cost computing.
One DB opened by multipe instances so the the db ll be Highly Available if an instance crashes.
Cluster Software. Oracles Clusterware or products like Veritas Volume Manager are required to
provide the cluster support and allow each node to know which nodes belong to the cluster and
are available and with Oracle Cluterware to know which nodes have failed and to eject then
from the cluster, so that errors on that node can be cleared.
Oracle Clusterware has two key components Cluster Registry OCR and Voting Disk.
The cluster registry holds all information about nodes, instances, services and ASM storage if
used, it also contains state information ie they are available and up or similar.
The voting disk is used to determine if a node has failed, i.e. become separated from the
majority. If a node is deemed to no longer belong to the majority then it is forcibly rebooted and
will after the reboot add itself again the the surviving cluster nodes.
What are the Oracle Clusterware key components?
Oracle Clusterware has two key components Cluster Registry OCR and Voting Disk.
What is Voting Disk and OCR?
Voting Disk
Oracle RAC uses the voting disk to manage cluster membership by way of a health check and
arbitrates cluster ownership among the instances in case of network failures. The voting disk
must reside on shared disk.
A node must be able to access more than half of the voting disks at any time.
For example, if you have 3 voting disks configured, then a node must be able to access at least
two of the voting disks at any time. If a node cannot access the minimum required number of
voting disks it is evicted, or removed, from the cluster.
Oracle Cluster Registry (OCR)

The cluster registry holds all information about nodes, instances, services and ASM storage if
used, it also contains state information ie they are available and up or similar.
The OCR must reside on shared disk that is accessible by all of the nodes in your cluster.
What are the administrative tasks involved with voting disk?
Following administrative tasks are performed with the voting disk :
1) Backing up voting disks
2) Recovering Voting disks
3) Adding voting disks
4) Deleting voting disks
5) Moving voting disks
Can you add voting disk online? Do you need voting disk backup?
Yes, as per documentation, if you have multiple voting disk you can add online, but if you have
only one voting disk , by that cluster will be down as its lost you just need to start crs in
exclusive mode and add the votedisk using
crsctl add votedisk <path>
What is the Oracle Recommendation for backing up voting disk?
Oracle recommends us to use the dd command to backup the voting disk with a minimum block
size of 4KB.
How do we backup voting disks?
1) Oracle recommends that you back up your voting disk after the initial cluster creation and
after we complete any node addition or deletion procedures.
2) First, as root user, stop Oracle Clusterware (with the crsctl stop crs command) on all nodes.
Then, determine the current voting disk by issuing the following command:
crsctl query votedisk css
3) Then, issue the dd or ocopy command to back up a voting disk, as appropriate.
Give the syntax of backing up voting disks:On Linux or UNIX systems:
dd if=voting_disk_name of=backup_file_name
where,
voting_disk_name is the name of the active voting disk
backup_file_name is the name of the file to which we want to back up the voting disk contents
On Windows systems, use the ocopy command:
copy voting_disk_name backup_file_name
How do we verify an existing current backup of OCR?
We can verify the current backup of OCR using the following command : ocrconfig
-showbackup
You have lost OCR disk, what is your next step?
The cluster stack will be down due to the fact that cssd is unable to maintain the integrity, this is
true in 10g, From 11gR2 onwards, the crsd stack will be down, the hasd still up and running. You
can add the ocr back by restoring the automatic backup or import the manual backup,

What are the major RAC wait events?


In a RAC environment the buffer cache is global across all instances in the cluster and hence the
processing differs.The most common wait events related to this are gc cr request and gc buffer
busy
GC CR request :the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned queries will
increase the amount of data blocks requested by an Oracle session. The more blocks requested
typically means the more often a block will need to be read from a remote instance via the
interconnect.)
GC BUFFER BUSY: It is the time the remote instance locally spends accessing the requested
data block.
What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in AWR Report?
This is most likely due to a fault in interconnect network.
Check netstat -s
if you see "fragments dropped" or "packet reassemblies failed" , Work with your system
administrator find the fault with network.
How do you troubleshoot node reboot?
Please check metalink ...
Note 265769.1 Troubleshooting CRS Reboots
Note.559365.1 Using Diagwait as a diagnostic to get more information for diagnosing Oracle
Clusterware Node evictions.
Srvctl cannot start instance, I get the following error PRKP-1001 CRS-0215, however
sqlplus can start it on both nodes? How do you identify the problem?
Set the environmental variable SRVM_TRACE to true.. And start the instance with srvctl. Now
you will get detailed error stack.
What are Oracle Clusterware processes for 10g on Unix and Linux?
Cluster Synchronization Services (ocssd) Manages cluster node membership and runs as the
oracle user; failure of this process results in cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources (which could be a
database, an instance, a service, a Listener, a virtual IP (VIP) address, an application process, and
so on) based on the resource's configuration information that is stored in the OCR. This includes
start, stop, monitor and failover operations. This process runs as the root user
Event manager daemon (evmd) A background process that publishes events that crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and provide I/O
fencing. OPROCD performs its check, stops running, and if the wake up is beyond the expected
time, then OPROCD resets the processor and reboots the node. An OPROCD failure results in

Oracle Clusterware restarting the node. OPROCD uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific requirements
and complex resources. Runs server callout scripts when FAN events occur.
What are Oracle database background processes specific to RAC?
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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor
To ensure that each Oracle RAC database instance obtains the block that it needs to satisfy a
query or transaction, Oracle RAC instances use two processes, the Global Cache Service (GCS)
and the Global Enqueue Service (GES). The GCS and GES maintain records of the statuses of
each data file and each cached block using a Global Resource Directory (GRD). The GRD
contents are distributed across all of the active instances.
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.
What is 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.
What is SCAN listener?
A scan listener is something that additional to node listener which listens the incoming db
connection requests from the client which got through the scan IP, it got end points configured to
node listener where it routes the db connection requests to particular node listener.
SCAN IP can be disabled if not required. However SCAN IP is mandatory during the RAC
installation. Enabling/disabling SCAN IP is mostly used in oracle apps environment by the
concurrent manager (kind of job scheduler in oracle apps).
Steps to disable the SCAN IP,
i. Do not use SCAN IP at the client end.
ii. Stop scan listener
srvctl stop scan_listener

iii.Stop scan
srvctl stop scan (this will stop the scan vip's)
iv. Disable scan and disable scan listener
srvctl disable scan
What are the different network components are in 10g RAC?
public, private, and vip components
Private interfaces is for intra node communication.
VIP is all about availability of application. When a node fails then the VIP component fail over
to some other node, this is the reason that all applications should based on vip components
means tns entries should have vip entry in the host list
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.
What is the use of cluster interconnect?
Cluster interconnect is used by the Cache fusion for inter instance communication.
How can we configure the cluster interconnect?
Configure User Datagram Protocol (UDP) on Gigabit Ethernet for cluster interconnects.
On UNIX and Linux systems we use UDP and RDS (Reliable data socket) protocols to be used
by Oracle Clusterware.
Windows clusters use the TCP protocol.
What is the purpose of Private Interconnect?
Clusterware uses the private interconnect for cluster synchronization (network heartbeat) and
daemon communication between the the clustered nodes. This communication is based on the
TCP protocol.
RAC uses the interconnect for cache fusion (UDP) and inter-process communication (TCP).
Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches of
participating nodes in the cluster.
What is a virtual IP address or VIP?
A virtual IP address or VIP is an alternate IP address that the client connections use instead of the
standard public IP address. To configure VIP 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.
Why do we have a Virtual IP (VIP) in Oracle RAC?
Without using VIPs or FAN, clients connected to a node that died will often wait for a TCP
timeout period (which can be up to 10 min) before getting an error. As a result, you don't really

have a good HA solution without using VIPs.


When a node fails, the VIP associated with it is automatically failed over to some other node and
new node re-arps the world indicating a new MAC address for the IP. Subsequent packets sent to
the VIP go to the new node, which will send error RST packets back to the clients. This results in
the clients getting errors immediately.
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 is the use of a service in Oracle RAC environment?
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 characteristics controlled by Oracle services feature?
The characteristics include a unique name, workload balancing, failover options, and high
availability.
What enables 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 are the types of connection load-balancing?
Connection Workload management is one of the key aspects when you have RAC instances as
you want to distribute the connections to specific nodes/instance or those have less load.
There are two types of connection load-balancing:
1.Client Side load balancing (also called as connect time load balancing)
2.Server side load balancing (also called as Listener connection load balancing)
What is the difference 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.
Client Side load balancing:- Oracle client side load balancing feature enables clients to
randomize the connection requests among all the available listeners based on their load.
An tns entry that contains all nodes entries and use load_balance=on (default its on) will use the
connect time load balancing or client side load balancing.
Sample Client Side TNS Entry:-

finance =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myrac2-vip)(PORT = 2042))
(ADDRESS = (PROTOCOL = TCP)(HOST = myrac1-vip)(PORT = 2042))
(ADDRESS = (PROTOCOL = TCP)(HOST = myrac3-vip)(PORT = 2042))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = FINANCE) (FAILOVER=ON)
(FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 180)
(DELAY = 5))
)
)
Server side load balancing:- This improves the connection performance by balancing the
number of active connections among multiple instances and dispatchers. In a single instance
environment (shared servers), the listener selects the least dispatcher to handle the incoming
client requests. In a rac environments, PMON is aware of all instances load and dispatchers , and
depending on the load information PMON redirects the connection to the least loaded node.
In a RAC environment, *.remote_listener parameter which is a tns entry containing all nodes
addresses need to set to enable the load balance advisory updates to PMON.
Sample Tns entry should be in an instances of RAC cluster,
local_listener=LISTENER_MYRAC1
remote_listener = LISTENERS_MYRACDB
What are the administrative tools used for Oracle RAC environments?
Oracle RAC cluster can be administered as a single image using the below

OEM (Enterprise Manager),

SQL*PLUS,

Server control (SRVCTL),

Cluster Verification Utility (CLUVFY),

DBCA,

NETCA
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 is the difference between CRSCTL and SRVCTL?
crsctl manages clusterware-related operations:

Starting and stopping Oracle Clusterware


Enabling and disabling Oracle Clusterware daemons
Registering cluster resources
srvctl manages Oracle resourcerelated operations:
Starting and stopping database instances and services
Also from 11gR2 manages the cluster resources like network,vip,disks etc
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
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).
What are the background process that exists in 11gr2 and functionality?
Process Name Functionality
crsd The CRS daemon (crsd) manages cluster resources based on configuration information
that is stored in Oracle Cluster Registry (OCR) for each resource. This includes start, stop,
monitor, and failover operations. The crsd process generates events when the status of a resource
changes.
cssd Cluster Synchronization Service (CSS): Manages the cluster configuration by
controlling which nodes are members of the cluster and by notifying members when a node joins
or leaves the cluster. If you are using certified third-party clusterware, then CSS processes
interfaces with your clusterware to manage node membership information. CSS has three
separate processes: the CSS daemon (ocssd), the CSS Agent (cssdagent), and the CSS Monitor
(cssdmonitor). The cssdagent process monitors the cluster and provides input/output fencing.
This service formerly was provided by Oracle Process Monitor daemon (oprocd), also known as
OraFenceService on Windows. A cssdagent failure results in Oracle Clusterware restarting the
node.
diskmon Disk Monitor daemon (diskmon): Monitors and performs input/output fencing for
Oracle Exadata Storage Server. As Exadata storage can be added to any Oracle RAC node at any
point in time, the diskmon daemon is always started when ocssd is started.
evmd Event Manager (EVM): Is a background process that publishes Oracle Clusterware
events

mdnsd Multicast domain name service (mDNS): Allows DNS requests. The mDNS process is
a background process on Linux and UNIX, and a service on Windows.
gnsd Oracle Grid Naming Service (GNS): Is a gateway between the cluster mDNS and
external DNS servers. The GNS process performs name resolution within the cluster.
ons Oracle Notification Service (ONS): Is a publish-and-subscribe service for communicating
Fast Application Notification (FAN) events
oraagent oraagent: Extends clusterware to support Oracle-specific requirements and complex
resources. It runs server callout scripts when FAN events occur. This process was known as
RACG in Oracle Clusterware 11g Release 1 (11.1).
orarootagent Oracle root agent (orarootagent): Is a specialized oraagent process that helps
CRSD manage resources owned by root, such as the network, and the Grid virtual IP address
oclskd Cluster kill daemon (oclskd): Handles instance/node evictions requests that have been
escalated to CSS
gipcd Grid IPC daemon (gipcd): Is a helper daemon for the communications infrastructure
ctssd Cluster time synchronisation daemon(ctssd) to manage the time syncrhonization
between nodes, rather depending on NTP
Under which user or owner the process will start?
Component
Name of the Process
Owner
Oracle High Availability Service
ohasd
init, root
Cluster Ready Service (CRS)
Cluster Ready Services
root
Cluster Synchronization Service (CSS)
ocssd,cssd monitor, cssdagent
Event Manager (EVM)
evmd, evmlogger
grid owner
Cluster Time Synchronization Service (CTSS) octssd
root
Oracle Notification Service (ONS)
ons, eons
grid owner
Oracle Agent
oragent
grid owner
Oracle Root Agent
orarootagent
root
Grid Naming Service (GNS)
gnsd
root
Grid Plug and Play (GPnP)
gpnpd
grid owner
Multicast domain name service (mDNS)
mdnsd
grid owner

grid owner

What is the major difference between 10g and 11g RAC?


There is not much difference between 10g and 11gR (1) RAC. But there is a significant
difference in 11gR2.
Prior to 11gR1(10g) RAC, the following were managed by Oracle CRS
Databases
Instances
Applications
Node Monitoring
Event Services
High Availability
From 11gR2(onwards) its completed HA stack managing and providing the following resources
as like the other cluster software like VCS etc.
Databases

Instances
Applications
Cluster Management
Node Management
Event Services
High Availability
Network Management (provides DNS/GNS/MDNSD services on behalf of other traditional
services) and SCAN Single Access Client Naming method, HAIP
Storage Management (with help of ASM and other new ACFS filesystem)
Time synchronization (rather depending upon traditional NTP)
Removed OS dependent hang checker etc, manages with own additional monitor process
What is hangcheck timer?
The hangcheck timer checks regularly the health of the system. If the system hangs or stop the
node will be restarted automatically.
There are 2 key parameters for this module:
-> hangcheck-tick: this parameter defines the period of time between checks of system health.
The default value is 60 seconds; Oracle recommends setting it to 30seconds.
-> hangcheck-margin: this defines the maximum hang delay that should be tolerated before
hangcheck-timer resets the RAC node.
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
---------------------------------------------------------------------------------------------------------------

What is RAC? What is the benefit of RAC over single instance database?
In Real Application Clusters environments, all nodes concurrently execute transactions against
the same database. Real Application Clusters coordinates each node's access to the shared data to
provide consistency and integrity.
Benefits:
Improve response time
Improve throughput
High availability
Transparency
Advantages of RAC (Real Application Clusters)
Reliability - if one node fails, the database won't fail
Availability - nodes can be added or replaced without having to shutdown the database
Scalability - more nodes can be added to the cluster as the workload increases
What is a virtual IP address or VIP?
A virtual IP address or VIP is an alternate IP address that the client connections use instead of the
standard public IP address. To configure VIP 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.
Using virtual IP we can save our TCP/IP timeout problem because Oracle notification service
maintains communication between each nodes and listeners.
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 is voting disk?
Voting Disk is a file that sits in the shared storage area and must be accessible by all nodes in the
cluster. All nodes in the cluster registers their heart-beat information in the voting disk, so as to
confirm that they are all operational. If heart-beat information of any node in the voting disk is
not available that node will be evicted from the cluster. The CSS (Cluster Synchronization
Service) daemon in the clusterware maintains the heart beat of all nodes to the voting disk. When
any node is not able to send heartbeat to voting disk, then it will reboot itself, thus help avoiding
the split-brain syndrome.

For high availability, Oracle recommends that you have a minimum of three or odd number (3 or
greater) of votingdisks.
Voting Disk - is file that resides on shared storage and Manages cluster members. Voting disk
reassigns cluster ownership between the nodes in case of failure.
The Voting Disk Files are used by Oracle Clusterware to determine which nodes are currently
members of the cluster. The voting disk files are also used in concert with other Cluster
components such as CRS to maintain the clusters integrity.
Oracle Database 11g Release 2 provides the ability to store the voting disks in ASM along with
the OCR. Oracle Clusterware can access the OCR and the voting disks present in ASM even if
the ASM instance is down. As a result CSS can continue to maintain the Oracle cluster even if
the ASM instance has failed.
How many voting disks are you maintaining ?
http://www.toadworld.com/KNOWLEDGE/KnowledgeXpertforOracle/tabid/648/
TopicID/RACR2ARC6/Default.aspx
By default Oracle will create 3 voting disk files in ASM.
Oracle expects that you will configure at least 3 voting disks for redundancy purposes. You
should always configure an odd number of voting disks >= 3. This is because loss of more than
half your voting disks will cause the entire cluster to fail.
You should plan on allocating 280MB for each voting disk file. For example, if you are using
ASM and external redundancy then you will need to allocate 280MB of disk for the voting disk.
If you are using ASM and normal redundancy you will need 560MB.
Why we need to keep odd number of voting disks ?
Oracle expects that you will configure at least 3 voting disks for redundancy purposes. You
should always configure an odd number of voting disks >= 3. This is because loss of more than
half your voting disks will cause the entire cluster to fail.
What are 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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process

LCK0Instance Enqueue Process


RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor
What are Oracle Clusterware processes for 10g ?
Cluster Synchronization Services (ocssd) Manages cluster node membership and runs as the
oracle user; failure of this process results in cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources (which could be a
database, an instance, a service, a Listener, a virtual IP (VIP) address, an application process, and
so on) based on the resource's configuration information that is stored in the OCR. This includes
start, stop, monitor and failover operations. This process runs as the root user
Event manager daemon (evmd) A background process that publishes events that crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and provide I/O
fencing. OPROCD performs its check, stops running, and if the wake up is beyond the expected
time, then OPROCD resets the processor and reboots the node. An OPROCD failure results in
Oracle Clusterware restarting the node. OPROCD uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific requirements and
complex resources. Runs server callout scripts when FAN events occur.
What are Oracle database background processes specific to RAC?
LMSGlobal Cache Service Process
LMDGlobal Enqueue Service Daemon
LMONGlobal Enqueue Service Monitor
LCK0Instance Enqueue Process
Oracle RAC instances use two processes, the Global Cache Service (GCS) and the Global
Enqueue Service (GES). The GCS and GES maintain records of the statuses of each data file and
each cached block using a Global Resource Directory (GRD). The GRD contents are distributed
across all of the active instances.
What is Cache Fusion?
Transfor of data across instances through private interconnect is called cachefusion.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
What is SCAN? (11gR2 feature)
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC) 11g
Release 2 feature that provides a single name for clients to access an Oracle Database running in
a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in
the cluster.
SCAN provides a single domain name via (DNS), allowing and-users to address a RAC cluster
as-if it were a single IP address. SCAN works by replacing a hostname or IP list with virtual IP
addresses (VIP).

Single client access name (SCAN) is meant to facilitate single name for all Oracle clients to
connect to the cluster database, irrespective of number of nodes and node location. Until now, we
have to keep adding multiple address records in all clients tnsnames.ora, when a new node gets
added to or deleted from the cluster.
Single Client Access Name (SCAN) eliminates the need to change TNSNAMES entry when
nodes are added to or removed from the Cluster. RAC instances register to SCAN listeners as
remote listeners. Oracle recommends assigning 3 addresses to SCAN, which will create 3 SCAN
listeners, though the cluster has got dozens of nodes.. SCAN is a domain name registered to at
least one and up to three IP addresses, either in DNS (Domain Name Service) or GNS (Grid
Naming Service). The SCAN must resolve to at least one address on the public network. For
high availability and scalability, Oracle recommends configuring the SCAN to resolve to three
addresses.
http://www.freeoraclehelp.com/2011/12/scan-setup-for-oracle-11grelease211gr2.html
What are SCAN components in a cluster?
1.SCAN Name
2.SCAN IPs (3)
3.SCAN Listeners (3)
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.
What is TAF?
TAF (Transparent Application Failover) is a configuration that allows session fail-over between
different nodes of a RAC database cluster.
Transparent Application Failover (TAF). If a communication link failure occurs after a
connection is established, the connection fails over to another active node. Any disrupted
transactions are rolled back, and session properties and server-side program variables are lost. In
some cases, if the statement executing at the time of the failover is a Select statement, that
statement may be automatically re-executed on the new connection with the cursor positioned on
the row on which it was positioned prior to the failover.
After an Oracle RAC node crashesusually from a hardware failureall new application
transactions are automatically rerouted to a specified backup node. The challenge in rerouting is
to not lose transactions that were "in flight" at the exact moment of the crash. One of the
requirements of continuous availability is the ability to restart in-flight application transactions,
allowing a failed node to resume processing on another server without interruption. Oracle's
answer to application failover is a new Oracle Net mechanism dubbed Transparent Application
Failover. TAF allows the DBA to configure the type and method of failover for each Oracle Net
client.

TAF architecture offers the ability to restart transactions at either the transaction (SELECT) or
session level.
What are the requirements for Oracle Clusterware?
1. External Shared Disk to store Oracle Cluster ware file (Voting Disk and Oracle Cluster
Registry - OCR)
2. Two netwrok cards on each cluster ware node (and three set of IP address) Network Card 1 (with IP address set 1) for public network
Network Card 2 (with IP address set 2) for private network (for inter node communication
between rac nodes used by clusterware and rac database)
IP address set 3 for Virtual IP (VIP) (used as Virtual IP address for client connection and for
connection failover)
3. Storage Option for OCR and Voting Disk - RAW, OCFS2 (Oracle Cluster File System), NFS,
..
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.
How to find location of OCR file when CRS is down?
If you need to find the location of OCR (Oracle Cluster Registry) but your CRS is down.
When the CRS is down:
Look into ocr.loc file, location of this file changes depending on the OS:
On Linux: /etc/oracle/ocr.loc
On Solaris: /var/opt/oracle/ocr.loc
When CRS is UP:
Set ASM environment or CRS environment then run the below command:
ocrcheck
In 2 node RAC, how many NICs are r using ?
2 network cards on each clusterware node
Network Card 1 (with IP address set 1) for public network
Network Card 2 (with IP address set 2) for private network (for inter node communication
between rac nodes used by clusterware and rac database)
In 2 node RAC, how many IPs are r using ?
6 - 3 set of IP address
## eth1-Public: 2
## eth0-Private: 2
## VIP: 2
How to find IPs information in RAC ?
Edit the /etc/hosts file as shown below:
# Do not remove the following line, or various programs
# that requires network functionality will fail.
127.0.0.1
localhost.localdomain localhost
## Public Node names
192.168.10.11
node1-pub.hingu.net node1-pub

192.168.10.22
node2-pub.hingu.net node2-pub
## Private Network (Interconnect)
192.168.0.11
node1-prv
node1-prv
192.168.0.22
node2-prv
node2-prv
## Private Network (Network Area storage)
192.168.1.11
node1-nas
node1-nas
192.168.1.22
node2-nas
node2-nas
192.168.1.33
nas-server
nas-server
## Virtual IPs
192.168.10.111
node1-vip.hingu.net node1-vip
192.168.10.222
node2-vip.hingu.net node2-vip
What is difference between RAC ip addresses ?
Public IP adress is the normal IP address typically used by DBA and SA to manage storage,
system and database. Public IP addresses are reserved for the Internet.
Private IP address is used only for internal clustering processing (Cache Fusion) (aka as
interconnect). Private IP addresses are reserved for private networks.
VIP is used by database applications to enable fail over when one cluster node fails. The purpose
for having VIP is so client connection can be failover to surviving nodes in case there is failure
Can application developer access the private ip ?
No. private IP address is used only for internal clustering processing (Cache Fusion) (aka as
interconnect)
http://rajeevjhaoracle.wordpress.com/2012/01/02/oracle-rac-interviewquestion-answer/
-------------------------------------------------------------------------------------------------------------What is RAC?
RAC Architechture?
What is a SCAN Listener?
What is VIP?
What is TAF?
What is FAN?
What is LMON?
What is CACHE FUSION?
What is SPLIT BRAIN in RAC?

How Load balancing works in ORACLE RAC?


What is Voting Disk?
How many backups are there for Voting Disk?
WHY ODD NUMBER OF VOTING DISK IS USED?
How to take Voting Disk backup? Do you take Voting Disk backup?
If you lost Voting Disk, how do you Restore?
What is OCR?
How many backups are there for OCR?
How to take OCR backup? Do you take OCR backup?
If you lost OCR, how do you Restore?
What is a Master Node?
How do you know which is the Master Node without connecting to Database?
Can we have Node 1 in SOLARIS OS and Node 2 in LINUX OS?
Commomnly used commands in RAC?
How to convert standalone database to RAC?

RAC/ASM/VOTING DISK Interview Questions & Answer

Q What is SCAN?
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC) 11g
Release 2 feature that provides a single name for clients to access an Oracle Database
running in a cluster. The benefit is clients using SCAN do not need to change if you add or
remove nodes in the cluster.

Q what is dynamic remastering ? When will the dynamic remastering happens?


dynamic remastering is ability to move the ownership of resource from one instance to
another instance in RAC. dynamic resource remastering is used to implement for resource
affinity for increased performance. resource affinity optimized the system in situation where
update transactions are being executed in one instance. when activity shift to another
instance the resource affinity correspondingly move to another instance. If activity is not
localized then resource ownership is hashed to the instance.

In 10g dynamic remastering happens in file+object level.the process of remastering is very


stringent. For one instance should touch more than 50 times than the other instance in
particular period(say 10 mints). this touch ratio and time can be tuned by gc_affinity_limit
and _gc_affinity_time parameter.

Q why we required to maintain odd number of voting disks?


Odd number of disk are to avoid split brain, When Nodes in cluster can't talk to each other
they run to lock the Voting disk and whoever lock the more disk will survive, if disk number
are even there are chances that node might lock 50% of disk (2 out of 4) then how to decide
which node to evict.
whereas when number is odd, one will be higher than other and each for cluster to evict the
node with less number

Q How you check the health of Your RAC Database?


'crsctl' command from root or oracle user can be used to check the clusterware health But
for starting or stopping we have to use root user or any privilege user.
[oracle@TEST_NODE1 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

Q How you check the services in RAC Node?


We can check the service or start the services with 'srvctl' command.load balanced/TAF
service named RAC online.
[oracle@TEST_NODE1 ~]$ srvctl start service -d orcl -s RAC
[oracle@TEST_NODE1 ~]$ crsstat

Q If there is some issue with virtual IP how will you troubleshoot it?How will you
change virtual ip?
To change the VIP (virtual IP) on a RAC node, use the command
[oracle@testnode oracle]$ srvctl modify nodeapps -A new_address

Q How you will backup your RAC Database?


Backup strategy of RAC Database:
An RAC Database consists of
1)OCR
2)Voting disk &
3)Database files, controlfiles, redolog files & Archive log files

Q Do you have any idea of load balancing in application?How load balancing is

done?
http://practicalappsdba.wordpress.com/category/for-master-apps-dbas/

Q 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.

Q What is RAC and how is it different from non RAC databases?


RAC stands for Real Application Cluster, you have n number of instances running in their own
separate nodes and based on the shared storage. Cluster is the key component and is a
collection of servers operations as one unit. RAC is the best solution for high performance
and high availably. Non RAC databases has single point of failure in case of hardware failure
or server crash.

Q 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 immediate
srvctl start database -d name [-o start_options]
srvctl stop database -d name [-o stop_options]
srvctl start database -d orcl -o mount

Q 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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor

Q 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.

Q What are the different network components are in 10g RAC?


public, private, and vip components
Private interfaces is for intra node communication. VIP is all about availability of application.
When a node fails then the VIP component fail over to some other node, this is the reason
that all applications should based on vip components means tns entries should have vip
entry in the host list

Q 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.

Q What are the major RAC wait events?


In a RAC environment the buffer cache is global across all instances in the cluster and hence
the processing differs.The most common wait events related to this are gc cr request and gc
buffer busy
GC CR request :the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned queries will
increase the amount of data blocks requested by an Oracle session. The more blocks
requested typically means the more often a block will need to be read from a remote
instance via the interconnect.)
GC BUFFER BUSY: It is the time the remote instance locally spends accessing the requested
data block.

Q 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.

Q 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.

Q Give details on LMD


This process is called as global enqueue service daemon. This process manages incoming
remote resource requests within each instance.

Q 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.

Q 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.

Q 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.

Q How to export and import crs resources while migrating Oracle RAC to new
server.
Below script generate svrctl add script for database, instance, service and 11G listeners
from OCR from current RAC.
Save the result of the script and run it at new RAC.
for DBNAME in $(srvctl config database)
do
# Generate DB resource
srvctl config database -d $DBNAME -a | awk -v dbname="$DBNAME" \
'BEGIN { FS=":" }
$1~/Oracle home/ || $1~/ORACLE_HOME/ {dbhome = "-o" $2}
$1~/Spfile/ || $1~/SPFILE/ {spfile = "-p" $2}
$1~/Disk Groups/ {dg = "-a" $2}

END { if (avail == "-a ") {avail = ""}; printf "%s %s %s %s %s\n", "srvctl add database -d ",
dbname, dbhome, spfile, dg }'
# Generate Instance resource
srvctl status database -d $DBNAME | awk -v dbname="$DBNAME" \
'$4~/running/ { printf "%s %s %s %s %s %s\n", "srvctl add instance -d ",dbname, " -i ", $2 ,"
-n ", $7 }
$5~/running/ { printf "%s %s %s %s %s %s \n", "srvctl add instance -d ",dbname, " -i ", $2 ,"
-n ", $8 }'
# Modify instance for 10G - ASM dependency
if [ $(echo $ORACLE_HOME | grep "1020" | wc -l ) -eq 1 ]
then
srvctl status database -d $DBNAME | awk -v dbname="$DBNAME" \
'$2~/1$/ { printf "%s %s %s %s %s \n", "srvctl modify instance -d ",dbname, " -i ", $2 ," -s
+ASM1" }
$2~/2$/ { printf "%s %s %s %s %s \n", "srvctl modify instance -d ",dbname, " -i ", $2 ," -s
+ASM2" }
$2~/3$/ { printf "%s %s %s %s %s \n", "srvctl modify instance -d ",dbname, " -i ", $2 ," -s
+ASM3" }
$2~/4$/ { printf "%s %s %s %s %s \n", "srvctl modify instance -d ",dbname, " -i ", $2 ," -s
+ASM4" }'
fi
echo "srvctl start database -d $DBNAME"
# Generate Service resource
snamelist=$(srvctl status service -d $DBNAME | awk '{print $2}')
for sname in $snamelist
do
srvctl config service -d $DBNAME -s $sname| awk -v dbname="$DBNAME" -v
sname=$sname \
'BEGIN { FS=":"}
$1~/Preferred instances/ {pref = "-r" $2}
$1~/PREF/ {pref = "-r" $2; sub(/AVAIL/, "", pref) }
$1~/Available instances/ {avail = "-a" $2}
$2~/AVAIL/ {avail = "-a" $3}

$1~/Failover type/ {ft = "-e" $2}


$1~/Failover method/ {fm = "-m" $2}
$1~/Runtime Load Balancing Goal/ {g = "-B" $2}
END { if (avail == "-a ") {avail = ""}; printf "%s %s %s %s %s %s %s %s %s %s\n", "srvctl
add service -d ",dbname, "-s ", sname, pref, avail ,ft, fm,g, "-P BASIC"}'
echo "srvctl start service -d $DBNAME -s $sname"
done
done
# Listener at 11G Home. 10G listener can't ba added with srvctl.

srvctl config listener | awk \


'BEGIN { FS=":"; state = 0; }
$1~/Name/ {lname = "-l" $2; state=1};
$1~/Home/ && state == 1 {ohome = "-o" $2; state=2;}
$1~/End points/ && state == 2 {lport = "-p " $3; state=3;}
state == 3 {if (ohome != "-o ") {printf "%s %s %s %s\n", "srvctl add listener ", lname,
ohome, lport;} state=0;}'

Q 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.

Q What components in RAC must reside in shared storage?


All datafiles, controlfiles, SPFIles, redo log files must reside on cluster-aware shred storage.

Q 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.

Q 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).

Q 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.

Q How can we configure the cluster interconnect?


Configure User Datagram Protocol(UDP) on Gigabit ethernet for cluster interconnect.On unix
and linux systems we use UDP and RDS(Reliable data socket) protocols to be used by Oracle
Clusterware.Windows clusters use the TCP protocol.

Q Can we use crossover cables with Oracle Clusterware interconnects?


No, crossover cables are not supported with Oracle Clusterware intercnects.

Q What is the use of cluster interconnect?


Cluster interconnect is used by the Cache fusion for inter instance communication.

Q 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.

Q What is the use of a service in Oracle RAC environment?


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.

Q What are the characteristics controlled by Oracle services feature?


The charateristics include a unique name, workload balancing and failover options,and high
availability characteristics.

Q What enables 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.

Q 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.

Q 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.

Q 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.

Q 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.

Q 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

Q 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.

Q 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.

Q 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.

Q 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.

Q 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.

Q 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.

Q 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).

Q 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

Q What is ORA-00603: ORACLE server session terminated by fatal error or ORA29702: error occurred in Cluster Group Service operation?
RAC node name was listed in the loopback address...

Q 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.

Q Mention the components of Oracle clusterware


Oracle clusterware is made up of components like voting disk and Oracle Cluster
Registry(OCR).

Q 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.

Q 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).

Q 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).

Q 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

Q 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).

Q 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

Q 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

Q 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.

Q What is the difference 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.

Q What are the three greatest benefits that RAC provides??


The three main benefits are availability, scalability, and the ability to use low cost
commodity hardware. RAC allows an application to scale vertically, by adding CPU, disk and
memory resources to an individual server. But RAC also provides horizontal scalability, which
is achieved by adding new nodes into the cluster. RAC also allows an organization to bring
these resources online as they are needed. This can save a small or midsize organization a
lot of money in the early stages of a project.

In a RAC environment, if a node in the cluster fails, the application continues to run on the
surviving nodes contained in the cluster. If your application is configured correctly, most
users won't even know that the node they were running on became unavailable.

Q What are the major RAC wait events?


In a RAC environment the buffer cache is global across all instances in the cluster and hence
the processing differs.The most common wait events related to this are gc cr request and
gc buffer busy
GC CR request: the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned queries will
increase the amount of data blocks
requested by an Oracle session. The more blocks requested typically means the more often
a block will need to be read from a remote instance via the interconnect.)
GC BUFFER BUSY: It is the time the remote instance locally spends accessing the
requested data block.

Q What are the different network components in Oracle 10g RAC?


We have public, private, and VIP components. Private interfaces is for intra node
communication. VIP is all about availability of application. When a node fails then the VIP
component will fail over to some other node, this is the reason that all applications should be
based on VIP components. This means that tns entries should have VIP entry in the host list.

Q Tune the following RAC DATABASE (DBNAME=PROD) which is 3 node RAC.


PROD1
CPU 8
32 GB RAM

PROD2
CPU 15
12 GB RAM

PROD3
CPU 8
16 GB RAM

What are you looking for here? What tuning information do you expect?
It is a 3 node cluster with different hardware configuration running RAC.
I would put 20% of the memory for Oracle in each node. So that would mean that the SGA is
different in each of the nodes.
Also since the CPU's are different PROD2 can have more number of max number of
processes as compared to the rest of them.
But as I said this is just configuration, this is not tuning. Question is not clear.

Q Write a sample script for RMAN for the recovery if all the instance are down.
(First explain the procedure how you will restore)

Bring all nodes down.


Start one Node
Restore all datafiles and archive logs.
Recover 1 Node.
Open the database.
bring other nodes up.
Confirm that all nodes are operational.

Q. Clients are performing some operation and suddenly one of the datafile is
experiencing problem what do you do? The cluster is a two node one.
A. Bring the datafile offline recover the datafile.

Q. How can you connect to a specific node in a RAC environment?


A. tnsnames.ora ensure that you have INSTANCE_NAME specified in it.

Q How to move OCR and Voting disk to new storage device?


Moving OCR
==========
You must be logged in as the root user, because root owns the OCR files. Also an ocrmirror
must be in place before trying to replace the OCR device.
Make sure there is a recent backup of the OCR file before making any changes:
ocrconfig showbackup
If there is not a recent backup copy of the OCR file, an export can be taken for the current
OCR file. Use the following command to generate an export of the online OCR file:
In 10.2
# ocrconfig export -s online
In 11g
# ocrconfig -manualbackup
The new OCR disk must be owned by root, must be in the oinstall group, and must have
permissions set to 640. Provide at least 100 MB disk space for the OCR.
On one node as root run:

# ocrconfig -replace ocr


# ocrconfig -replace ocrmirror
Now run ocrcheck to verify if the OCR is pointing to the new file
Moving Voting Disk
==================
Note: crsctl votedisk commands must be run as root
Shutdown the Oracle Clusterware (crsctl stop crs as root) on all nodes before making any
modification to the voting disk. Determine the current voting disk location using:
crsctl query css votedisk
Take a backup of all voting disk:
dd if=voting_disk_name of=backup_file_name
To move a Voting Disk, provide the full path including file name:
crsctl delete css votedisk force
crsctl add css votedisk force
After modifying the voting disk, start the Oracle Clusterware stack on all nodes
# crsctl start crs
Verify the voting disk location using
crsctl query css votedisk

Q What is runfixup.sh script in Oracle Clusterware 11g release 2 installation


With Oracle Clusterware 11g release 2, Oracle Universal Installer (OUI) detects when the
minimum requirements for an installation are not met, and creates shell scripts, called fixup
scripts, to finish incomplete system configuration steps. If OUI detects an incomplete task,
then it generates fixup scripts (runfixup.sh). You can run the fixup script after you click the
Fix and Check Again Button.
The Fixup script does the following:
If necessary sets kernel parameters to values required for successful installation,
including:
Shared memory parameters.

Open file descriptor and UDP send/receive parameters.


Sets permissions on the Oracle Inventory (central inventory) directory.
Reconfigures primary and secondary group memberships for the installation
owner, if necessary, for the Oracle Inventory directory and the operating system
privileges groups.
Sets shell limits if necessary to required values.

Q When exactly during the installation process are clusterware components


created?
After fulfilling the pre-installation requirements, the basic installation steps to follow are:
1. Invoke the Oracle Universal Installer (OUI)
2. Enter the different information for some components like:
- name of the cluster
- public and private node names
- location for OCR and Voting Disks
- network interfaces used for RAC instances
-etc.
3. After the Summary screen, OUI will start copying under the $CRS_HOME (this is the
$ORACLE_HOME for Oracle Clusterware) in the local node the libraries and executables.
- here we will have the daemons and scripts init.* created and configured properly.
Oracle Clusterware is formed of several daemons, each one of which have a special function
inside the stack. Daemons are executed via the init.* scripts (init.cssd, init.crsd and
init.evmd).
- note that for CRS only some client libraries are recreated, but not all the executables (as
for the RDBMS).
4. Later the software is propagated to the rest of the nodes in the cluster and the
oraInventory is updated.
5. The installer will ask to execute root.sh on each node. Until this step the software for
Oracle Clusterware is inside the $CRS_HOME.
Running root.sh will create several components outside the $CRS_HOME:
- OCR and VD will be formated.
- control files (or SCLS_SRC files ) will be created with the correct contents to start Oracle
Clusterware.
These files are used to control some aspects of Oracle Clusterware like:
- enable/disable processes from the CSSD family (Eg. oprocd, oslsvmon)
- stop the daemons (ocssd.bin, crsd.bin, etc).
- prevent Oracle Clusterware from being started when the machine boots.
- etc.
- /etc/inittab will be updated and the init process is notified.
In order to start the Oracle Clusterware daemons, the init.* scripts first need to be run.

These scripts are executed by the daemon init. To accomplish this some entries must be
created in the file /etc/inittab.
- the different processes init.* (init.cssd, init.crsd, etc) will start the daemons (ocssd.bin,
crsd.bin, etc). When all the daemons are running then we can say that the installation was
successful
- On 10.2 and later, running root.sh on the last node in the cluster also will create the
nodeapps (VIP, GSD and ONS). On 10.1, VIPCA is executed as part of the RAC installation.
6. After running root.sh on each node, we need to continue with the OUI session. After
pressing the 'OK' button OUI will include the information for the public and
cluster_interconnect interfaces. Also CVU (Cluster Verification Utility) will be executed.

Q What are Oracle Clusterware processes for 10g on Unix and Linux
Cluster Synchronization Services (ocssd) Manages cluster node membership and runs as
the oracle user; failure of this process results in cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources (which could be
a database, an instance, a service, a Listener, a virtual IP (VIP) address, an application
process, and so on) based on the resource's configuration information that is stored in the
OCR. This includes start, stop, monitor and failover operations. This process runs as the root
user
Event manager daemon (evmd) A background process that publishes events that crs
creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and provide I/O
fencing. OPROCD performs its check, stops running, and if the wake up is beyond the
expected time, then OPROCD resets the processor and reboots the node. An OPROCD failure
results in Oracle Clusterware restarting the node. OPROCD uses the hangcheck timer on
Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific requirements
and complex resources. Runs server callout scripts when FAN events occur.

Q What are Oracle database background processes specific to RAC


LMSGlobal Cache Service Process
LMDGlobal Enqueue Service Daemon
LMONGlobal Enqueue Service Monitor
LCK0Instance Enqueue Process
To ensure that each Oracle RAC database instance obtains the block that it needs to satisfy a
query or transaction, Oracle RAC instances use two processes, the Global Cache Service
(GCS) and the Global Enqueue Service (GES). The GCS and GES maintain records of the

statuses of each data file and each cached block using a Global Resource Directory (GRD).
The GRD contents are distributed across all of the active instances.

Q What are Oracle Clusterware Components


Voting Disk Oracle RAC uses the voting disk to manage cluster membership by way of a
health check and arbitrates cluster ownership among the instances in case of network
failures. The voting disk must reside on shared disk.
Oracle Cluster Registry (OCR) Maintains cluster configuration information as well as
configuration information about any cluster database within the cluster. The OCR must
reside on shared disk that is accessible by all of the nodes in your cluster

Q How do you troubleshoot node reboot


Please check metalink ...
Note 265769.1 Troubleshooting CRS Reboots
Note.559365.1 Using Diagwait as a diagnostic to get more information for diagnosing Oracle
Clusterware Node evictions.

Q How do you backup the OCR


There is an automatic backup mechanism for OCR. The default location is :
$ORA_CRS_HOME\cdata\"clustername"\
To display backups :
#ocrconfig -showbackup
To restore a backup :
#ocrconfig -restore
With Oracle RAC 10g Release 2 or later, you can also use the export command:
#ocrconfig -export -s online, and use -import option to restore the contents back.
With Oracle RAC 11g Release 1, you can do a manaual backup of the OCR with the
command:
# ocrconfig -manualbackup

Q How do you backup voting disk


#dd if=voting_disk_name of=backup_file_name

Q How do I identify the voting disk location

#crsctl query css votedisk

Q How do I identify the OCR file location


check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
or
#ocrcheck

Q Is ssh required for normal Oracle RAC operation ?


"ssh" are not required for normal Oracle RAC operation. However "ssh" should be enabled for
Oracle RAC and patchset installation.

Q What is SCAN?
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC) 11g
Release 2 feature that provides a single name for clients to access an Oracle Database
running in a cluster. The benefit is clients using SCAN do not need to change if you add or
remove nodes in the cluster.

Q What is the purpose of Private Interconnect ?


Clusterware uses the private interconnect for cluster synchronization (network heartbeat)
and daemon communication between the the clustered nodes. This communication is based
on the TCP protocol.
RAC uses the interconnect for cache fusion (UDP) and inter-process communication (TCP).
Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches
of participating nodes in the cluster.

Q Why do we have a Virtual IP (VIP) in Oracle RAC?


Without using VIPs or FAN, clients connected to a node that died will often wait for a TCP
timeout period (which can be up to 10 min) before getting an error. As a result, you don't
really have a good HA solution without using VIPs.
When a node fails, the VIP associated with it is automatically failed over to some other node
and new node re-arps the world indicating a new MAC address for the IP. Subsequent packets
sent to the VIP go to the new node, which will send error RST packets back to the clients.
This results in the clients getting errors immediately

Q What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in AWR
Report?

This is most likely due to a fault in interconnect network.


Check netstat -s
if you see "fragments dropped" or "packet reassemblies failed" , Work with your system
administrator find the fault with network.

Q How many nodes are supported in a RAC Database?


10g Release 2, support 100 nodes in a cluster using Oracle Clusterware, and 100 instances
in a RAC database.

Q Srvctl cannot start instance, I get the following error PRKP-1001 CRS-0215,
however sqlplus can start it on both nodes? How do you identify the problem?
Set the environmental variable SRVM_TRACE to true.. And start the instance with srvctl. Now
you will get detailed error stack.

Q what is the purpose of the ONS daemon?


The Oracle Notification Service (ONS) daemon is an daemon started by the CRS clusterware
as part of the nodeapps. There is one ons daemon started per clustered node.
The Oracle Notification Service daemon receive a subset of published clusterware events via
the local evmd and racgimon clusterware daemons and forward those events to application
subscribers and to the local listeners.
This in order to facilitate:
a. the FAN or Fast Application Notification feature or allowing applications to respond to
database state changes.
b. the 10gR2 Load Balancing Advisory, the feature that permit load balancing accross
different rac nodes dependent of the load on the different nodes. The rdbms MMON is
creating an advisory for distribution of work every 30seconds and forward it via racgimon
and ONS to listeners and applications.

Q 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.

Q What is the use of a service in Oracle RAC environment?


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.

Q What are the characteristics controlled by Oracle services feature?


The characteristics include a unique name, workload balancing and failover options, and
high availability characteristics.

Q What is a voting disk?


A voting disk is a file that manages information about node membership.

Q What are the administrative tasks involved with voting disk?


Following administrative tasks are performed with the voting disk :
1) Backing up voting disks
2) Recovering Voting disks
3) Adding voting disks
4) Deleting voting disks
5) Moving voting disks

Q How do we backup voting disks?


1) Oracle recommends that you back up your voting disk after the initial cluster creation and
after we complete any node addition or deletion procedures.
2) First, as root user, stop Oracle Clusterware (with the crsctl stop crs command) on all
nodes. Then, determine the current voting disk by issuing the following command:
crsctl query votedisk css
3) Then, issue the dd or ocopy command to back up a voting disk, as appropriate.
Give the syntax of backing up voting disks:On Linux or UNIX systems:
dd if=voting_disk_name of=backup_file_name
where,
voting_disk_name is the name of the active voting disk
backup_file_name is the name of the file to which we want to back up the voting disk
contents
On Windows systems, use the ocopy command:
ocopy voting_disk_name backup_file_name

Q What is the Oracle Recommendation for backing up voting disk?


Oracle recommends us to use the dd command to backup the voting disk with a minimum
block size of 4KB.

Q How do you restore a voting disk?


To restore the backup of your voting disk, issue the dd or ocopy command for Linux and
UNIX systems or ocopy for Windows systems respectively.
On Linux or UNIX systems:
dd if=backup_file_name of=voting_disk_name
On Windows systems, use the ocopy command:
ocopy backup_file_name voting_disk_name
where,

backup_file_name is the name of the voting disk backup file


voting_disk_name is the name of the active voting disk

Q How can we add and remove multiple voting disks?


If we have multiple voting disks, then we can remove the voting disks and add them back
into our environment using the following commands, where path is the complete path of the
location where the voting disk resides:
crsctl delete css votedisk path
crsctl add css votedisk path

Q How do we stop Oracle Clusterware?When do we stop it?


Before making any modification to the voting disk, as root user, stop Oracle Clusterware
using the crsctl stop crs command on all nodes.

Q How do we add voting disk?


To add a voting disk, issue the following command as the root user, replacing the path
variable with the fully qualified path name for the voting disk we want to add:
crsctl add css votedisk path -force

Q How do we move voting disks?


To move a voting disk, issue the following commands as the root user, replacing the path
variable with the fully qualified path name for the voting disk we want to move:
crsctl delete css votedisk path -force
crsctl add css votedisk path -force

Q How do we remove voting disks?


To remove a voting disk, issue the following command as the root user, replacing the path
variable with the fully qualified path name for the voting disk we want to remove:
crsctl delete css votedisk path -force

Q What should we do after modifying voting disks?


After modifying the voting disk, restart Oracle Clusterware using the crsctl start crs
command on all nodes, and verify the voting disk location using the following command:
crsctl query css votedisk

Q When can we use -force option?


If our cluster is down, then we can include the -force option to modify the voting disk
configuration, without interacting with active Oracle Clusterware daemons. However, using
the -force option while any cluster node is active may corrupt our configuration.

1. Where are the Clusterware files stored on a RAC environment?


2. Where are the database software files stored on a RAC environment?
3. What kind of storage we can use for the shared Clusterware files?
4. What kind of storage we can use for the RAC database storage?

5. What is a CFS?
6. What is an OCFS2?
7. Which files can be placed on an Oracle Cluster File System?

8. Do you know another Cluster Vendor?


9. How is possible to install a RAC if we dont have a CFS?
10. What is a raw device?
11. What is a raw partition?
12. When to use CFS over raw?
13. When to use raw over CFS?
14. What CRS is?
15. What is VIP IP used for?
16. Why we need to have configured SSH or RSH on the RAC nodes?
17. Is the SSH, RSH needed for normal RAC operations?
18. Do we have to have Oracle RDBMS on all nodes?
19. What are the restrictions on the SID with a RAC database? Is it limited to 5 characters?
20. Does Real Application Clusters support heterogeneous platforms?
21. Are there any issues for the interconnect when sharing the same switch as the public network by using
VLAN to separate the network?
22. What is the Load Balancing Advisory?
23. How many nodes are supported in a RAC Database?

24. What is the Cluster Verification Utility (cluvfy)?


25. What versions of the database can I use the cluster verification utility (cluvfy) with?
26. If I am using Vendor Clusterware such as Veritas, IBM, Sun or HP, do I still need Oracle Clusterware to
run Oracle RAC 10g?
27. Is RAC on VMWare supported?
28. What is hangcheck timer used for ?
29. Is the hangcheck timer still needed with Oracle RAC 10g?
30. What files can I put on Linux OCFS2?
31. Is it possible to use ASM for the OCR and voting disk?
32. Can I change the name of my cluster after I have created it when I am using Oracle Clusterware?
33. What the O2CB is?
34. What the OCR file is used for?
35. What the Voting Disk file is used for?
36. What is the recommended method to make backups of a RAC environment?

37. What command would you use to check the availability of the RAC system?
39. Name two specific RAC background processes
40. Can you have many database versions in the same RAC?
41. What was RAC previous name before it was called RAC?

42. What RAC component is used for communication between instances?


43. What is the difference between normal views and RAC views?
44. Which command will we use to manage (stop, start) RAC services in command-line
mode?
45. How many alert logs exist in a RAC environment?
46. What are Oracle Clusterware Components
47. How do you backup voting disk
48. How do I identify the voting disk location

49. How do I identify the OCR file location


50. What is SCAN?

51. What are Oracle Clusterware processes for 10g on Unix and Linux
52. What are Oracle database background processes specific to RAC
53. What are Oracle Clusterware Components
54. How do you troubleshoot node reboot
55. How do you backup the OCR
56. How do you backup voting disk
57. How do I identify the voting disk location
58. How do I identify the OCR file location
59. Is ssh required for normal Oracle RAC operation ?
60. What is the purpose of Private Interconnect ?

61. Why do we have a Virtual IP (VIP) in Oracle RAC?


62. What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in AWR
Report?
63. How many nodes are supported in a RAC Database?
64. Srvctl cannot start instance, I get the following error PRKP-1001 CRS-0215, however
sqlplus can start it on both nodes? How do you identify the problem?
65. What is the purpose of the ONS daemon?

Oracle RAC Interview Questions and Answers


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.
How many nodes are supported in a RAC Database?
10g Release 2, support 100 nodes in a cluster using Oracle Clusterware, and
100 instances in a RAC database.
What is SCAN?
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters
(RAC) 11g Release 2 feature that provides a single name for clients to access
an Oracle Database running in a cluster. The benefit is clients using SCAN do
not need to change if you add or remove nodes in the cluster.
Click here for more details from Oracle
Mention the Oracle RAC software components:

An Environment that supports of two or more database instances is an RAC.


They are composed of Memory structures and background processes.
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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor
What is GRD?
GRD stands for Global Resource Directory. The GES and GCS maintain
records of the status of each datafile and each cached block using global
resource directory. This process is referred to as cache fusion and helps in
data integrity.
Cache Fusion in Detail: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 instance

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 cache fusion.
What are Oracle database background processes specific to RAC
LMSGlobal Cache Service Process
LMDGlobal Enqueue Service Daemon
LMONGlobal Enqueue Service Monitor
LCK0Instance Enqueue Process
To ensure that each Oracle RAC database instance obtains the block that it
needs to satisfy a query or transaction, Oracle RAC instances use two
processes, the Global Cache Service (GCS) and the Global Enqueue Service
(GES). The GCS and GES maintain records of the statuses of each data file
and each cached block using a Global Resource Directory (GRD). The GRD
contents are distributed across all of the active instances.
RAC Background Processes in Detail.
ACMS in Detail: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.
GTX0-j in Detail:The process provides transparent support for XA global transactions in a RAC
environment. The database auto tunes the number of these processes based
on the workload of XA global transactions.
LMON in Detail:This process monitors global enques and resources across the cluster and
performs Global Enqueue recovery operations. This is called as Global
Enqueue Service Monitor.

LMD in Detail:This process is called as global enqueue service daemon. This


process manages incoming remote resource requests within each instance.
LMS in Detail:This process is called as Global Cache service process. This process
maintains status of datafiles and each cached block by recording information
in a Global Resource Directory (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.
LCK0 in Detail:This process is called as Instance enqueue process. This process manages
non-cache fusion resource requests such as library and row cache requests.
RMSn in Detail:This process is called as Oracle RAC management process. These processes
perform manageability tasks for Oracle RAC. Tasks include creation of
resources related Oracle RAC when new instances are added to the cluster.
RSMN in Detail:This process is called as Remote Slave Monitor. This process manages
background slave process creation and communication on remote instances.
This is a background slave process. This process performs tasks on behalf of
a coordinating process running in another instance.
What are Oracle Clusterware processes for 10g on Unix and Linux
Cluster Synchronization Services (ocssd) Manages cluster node
membership and runs as the oracle user; failure of this process results in
cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources
(which could be a database, an instance, a service, a Listener, a virtual IP
(VIP) address, an application process, and so on) based on the resource's

configuration information that is stored in the OCR. This includes start, stop,
monitor and failover operations. This process runs as the root user
Event manager daemon (evmd) A background process that publishes
events that crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and
provide I/O fencing. OPROCD performs its check, stops running, and if the
wake up is beyond the expected time, then OPROCD resets the processor
and reboots the node. An OPROCD failure results in Oracle Clusterware
restarting the node. OPROCD uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific
requirements and complex resources. Runs server callout scripts when FAN
events occur.
What are Oracle Clusterware Components
Voting Disk Oracle RAC uses the voting disk to manage cluster
membership by way of a health check and arbitrates cluster ownership
among the instances in case of network failures. The voting disk must reside
on shared disk.
Oracle Cluster Registry (OCR) Maintains cluster configuration information
as well as configuration information about any cluster database within the
cluster. The OCR must reside on shared disk that is accessible by all of the
nodes in your cluster
What components in RAC must reside in shared storage?
All datafiles, controlfiles, SPFIles, redo log files must reside on cluster-aware
shared 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, controlfiles,
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


interconnects.
On UNIX 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 interconnect?
No, crossover cables are not supported with Oracle Clusterware
interconnects.
What is the use of cluster interconnect?
Cluster interconnect is used by the Cache fusion for inter instance
communication.
what is the purpose of Private Interconnect?
Clusterware uses the private interconnect for cluster synchronization
(network heartbeat) and daemon communication between the the clustered
nodes. This communication is based on the TCP protocol.
RAC uses the interconnect for cache fusion (UDP) and inter-process
communication (TCP). Cache Fusion is the remote memory mapping of
Oracle buffers, shared between the caches of participating nodes in the
cluster.
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 environment?


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 characteristics controlled by Oracle services feature?
The characteristics include a unique name, workload balancing, failover
options, and high availability.
Which enables 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 virtual IP address or VIP is an alternate IP address that the client
connections use instead of the standard public IP address. To configure VIP
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.
Why do we have a Virtual IP (VIP) in Oracle RAC?
Without using VIPs or FAN, clients connected to a node that died will often
wait for a TCP timeout period (which can be up to 10 min) before getting an
error. As a result, you don't really have a good HA solution without using
VIPs.
When a node fails, the VIP associated with it is automatically failed over to
some other node and new node re-arps the world indicating a new MAC
address for the IP. Subsequent packets sent to the VIP go to the new node,
which will send error RST packets back to the clients. This results in the
clients getting errors immediately.

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 the below
OEM (Enterprise Manager),
SQL*PLUS,
Server control (SRVCTL),
Cluster Verification Utility (CLUVFY),
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
instance name 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 separate homes for ASM instance?
It is a good practice to have ASM home separate from the database home
(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 an 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 an 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 difference 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 loadbalancing 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 immediate
srvctl start database -d name [-o start_options]
srvctl stop database -d name [-o stop_options]
srvctl start database -d orcl -o mount
How do you troubleshoot node reboot
Please check metalink ...
Note 265769.1 Troubleshooting CRS Reboots

Note.559365.1 Using Diagwait as a diagnostic to get more information for


diagnosing Oracle Clusterware Node evictions.
How do you backup the OCR
There is an automatic backup mechanism for OCR. The default location is :
$ORA_CRS_HOME\cdata\"clustername"\
To display backups :
#ocrconfig -showbackup
To restore a backup :
#ocrconfig -restore
With Oracle RAC 10g Release 2 or later, you can also use the export
command:
#ocrconfig -export -s online, and use -import option to restore the contents
back.
With Oracle RAC 11g Release 1, you can do a manual backup of the OCR with
the command:
# ocrconfig -manual backup
How do you backup voting disk
#dd if=voting_disk_name of=backup_file_name
How do I identify the voting disk location
#crsctl query css votedisk
How do I identify the OCR file location
check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
or
#ocrcheck
Is ssh required for normal Oracle RAC operation ?
"ssh" are not required for normal Oracle RAC operation. However "ssh"
should be enabled for Oracle RAC and patchset installation.
What do you do if you see GC CR BLOCK LOST in top 5 Timed Events
in AWR Report?
This is most likely due to a fault in interconnect network.
Check netstat -s
if you see "fragments dropped" or "packet reassemblies failed" , Work with

your system administrator find the fault with network.


What is the purpose of the ONS daemon?
The Oracle Notification Service (ONS) daemon is an daemon started by the
CRS clusterware as part of the nodeapps. There is one ons daemon started
per clustered node.
The Oracle Notification Service daemon receives a subset of published
clusterware events via the local evmd and racgimon Clusterware daemons
and forward those events to application subscribers and to the local
listeners.
This in order to facilitate:
a. the FAN or Fast Application Notification feature or allowing applications to
respond to database state changes.
b. the 10gR2 Load Balancing Advisory, the feature that permit load balancing
across different RAC nodes dependent of the load on the different nodes. The
rdbms MMON is creating an advisory for distribution of work every 30seconds
and forward it via racgimon and ONS to listeners and applications.
Srvctl cannot start instance, I get the following error PRKP-1001
CRS-0215, however sqlplus can start it on both nodes? How do you
identify the problem?
Set the environmental variable SRVM_TRACE to true.. And start the instance
with srvctl. Now you will get detailed error stack.
What is (use of) Virtual IP (VIP) in Oracle Real Application Clusters
(RAC)?
When installing Oracle 10g/11g R1 RAC, three network interfaces (IPs) are
required for each node in the RAC cluster, they are:

Public Interface: Used for normal network communications to the node


Private Interface: Used as the cluster interconnect
Virtual (Public) Interface: Used for failover and RAC management

When installing Oracle 11g R2 RAC, we need one more network interface (IP)
is required for each node in the RAC cluster.

SCAN Interface (IP): Single Client Access Name (SCAN) is a new Oracle
Real Application Clusters (RAC) 11g Release 2 feature, which provides a
single name for clients to access an Oracle Database running in a

cluster. The benefit is clients using SCAN do not need to change if you
add or remove nodes in the cluster.
When a client connects to a tns-alias, it uses a TCP connection to an IP
address, defined in the tnsnames.ora file. When using RAC, we define
multiple addresses in our tns-alias, to be able to failover when an IP address,
listener or instance is unavailable. TCP timeouts can differ from platform to
platform or implementation to implementation. This makes it difficult to
predict the failover time.
Oracle 10g Cluster Ready Services enables databases to use a Virtual IP
address to configure the listener ON. This feature is to assure that oracle
clients quickly failover when a node fails. In Oracle Database 10g RAC, the
use of a virtual IP address to mask the individual IPO addresses of the
clustered nodes is required. The virtual IP addresses are used to simplify
failover and are automatically managed by CRS.
To create a Virtual IP (VIP) address, the Virtual IP Configuration Assistant
(VIPCA) is called from the root.sh script of a RAC install, which then
configures the virtual IP addresses for each node specified during the
installation process. In order to be able to run VIPCA, there must be unused
public IP addresses available for each node that has been configured in
the /etc/hosts file.
One public IP address for each node to use for its Virtual IP address for client
connections and for connection failover. This IP address is in addition to the
operating system managed public host IP address that is already assigned to
the node by the operating system. This public Virtual IP must be associated
with the same interface name on every node that is a part of the cluster. The
IP addresses that are used for all of the nodes that are part of a cluster must
be from the same subnet. The host names for the VIP addresses must be
registered with the domain name server (DNS). The Virtual IP address should
not be in use at the time of the installation because this is a Virtual IP
address that Oracle manages internally to the RAC processes. This virtual IP
address does not require a separate NIC. The VIPs should be registered in the
DNS. The VIP addresses must be on the same subnet as the public host
network addresses. Each Virtual IP (VIP) configured requires an unused and
resolvable IP address.
Using virtual IP we can save our TCP/IP timeout problem because Oracle
notification service (ONS) maintains communication between each nodes
and listeners. Once ONS found any listener down or node down, it will notify
another nodes and listeners. While new connection is trying to establish
connection to failure node or listener, virtual IP of failure node automatically
divert to surviving node and session will be establishing in another surviving
node. This process doesn't wait for TCP/IP timeout event. Due to this new

connection gets faster session establishment to another surviving


nodes/listener.
Virtual IP (VIP) is for fast connection establishment in failover dictation. Still
we can use physical IP address in Oracle 10g in listener if we have no worry
for failover timing. We can change default TCP/IP timeout using operating
system utilities/commands and kept smaller. But taking advantage of VIP
(Virtual IP address) in Oracle 10g RAC database is advisable.

RAC QUESTIONS AND ANSWERS


Q 1)How do we find the location of OCR and voting disks?
Ans: The location of OCR and Voting disks can be found as follows:
OCR location:
[oracle@dbcl1n1 AUCS1 ~]$ cat /etc/oracle/ocr.locO/P:
ocrconfig_loc=/export/ocw/oracle/ocr1
ocrmirrorconfig_loc=/export/ocw/oracle/ocr2
local_only=FALSE
Voting disk location:
[oracle@dbcl1n1 AUCS1 ~]$ cd $ORA_CRS_HOME/bin
[oracle@dbcl1n1 AUCS1 bin]$ ./crsctl query css votedisk
0. 0 /export/ocw/oracle/vote1
1. 0 /export/ocw/oracle/vote2
2. 0 /export/ocw/oracle/vote3
Q 3) What is cache fusion?
Ans :Cache fusion is the block shipping from one instance to another instance in a RAC
environment.Due to Cache Fusion and the elimination of disk writes that occur when other
instances request blocks for modifications, the performance overhead to manage shared data
between instances is greatly diminished. Not only do Cache Fusion's concurrency controls
greatly improve performance, but they also reduce the administrative effort for Real Application
Clusters environments.
Cache Fusion addresses several types of concurrency as described under the following headings:
Concurrent Reads on Multiple Nodes
Concurrent Reads and Writes on Different Nodes

Concurrent Writes on Different Nodes


Q 4)Which process is responsible for cache fusion mechanism?
Ans:Global cache service(GCS)
A read request from an instance for a block that was modified by another instance and not yet
written to disk can be a request for either the current version of the block or for a read-consistent
version. In either case, the Global Cache Service Processes (LMSn) transfer the block from the
holding instance's cache to the requesting instance's cache over the interconnect.
Q 5)If we perform a DML acivity in a 2 node RAC environment,if that node disconnect due to
some reason,What will be the result?
Ans: The DML statement will execute successfully since Database is there on the shared device.
Note: Thanks Junad for noticing the above answer and helping me in clarifying that in actual:
We neeed to write the callout functions using FAST APPLICATION NOTIFICATION (FAN)
Notifications FOR RAC.The callout can be written in OCI, for example JAVA for dml failover
to work.
http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/hafeats.htm
If you are using TAF (Transparent Application failover) with RAC Than only: session(alter
session is not) failover,select failover,pre-connect and Basic Failover are supported.
http://download.oracle.com/docs/cd/B28359_01/network.111/b28316/advcfg.htm#NETAG338
http://www.scribd.com/doc/19211546/Failover-for-Rac
In Oracle 11g rel2:
http://www.oracle.com/technetwork/database/app-failover-oracle-database-11g-173323.pdf
Q 6)How do we backup OCR and Voting disk?
Ans:VOTING DISK BACKUP:
To make a backup copy of the voting disk, use the Linux dd command. Perform this operation on
every voting disk as needed where voting_disk_name is the name of the active voting disk and
backup_file_name is the name of the file to which you want to back up the voting disk contents:
$dd if=voting_disk_name of=backup_file_name
If your voting disk is stored on a raw device, use the device name in place of voting_disk_name.
For example:
dd if=/dev/sdd1 of=/tmp/voting.dmp
When you use the dd command for making backups of the voting disk, the backup can be
performed while the Cluster Ready Services (CRS) process is active; you do not need to stop the
crsd.bin process before taking a backup of the voting disk

OCR BACKUP:
Viewing Available OCR Backups
To find the most recent backup of the OCR, on any node in the cluster, use the following
command:
$ocrconfig -showbackup
Backing Up the OCR
Because of the importance of OCR information, Oracle recommends that you use the ocrconfig
tool to make copies of the automatically created backup files at least once a day.
In addition to using the automatically created OCR backup files, you should also export the OCR
contents to a file before and after making significant configuration changes, such as adding or
deleting nodes from your environment, modifying Oracle Clusterware resources, or creating a
database. Exporting the OCR contents to a file lets you restore the OCR if your configuration
changes cause errors. For example, if you have unresolvable configuration problems, or if you
are unable to restart your cluster database after such changes, then you can restore your
configuration by importing the saved OCR content from the valid configuration.
To export the contents of the OCR to a file, use the following command, where
backup_file_name is the name of the OCR backup file you want to create:
$ocrconfig -exportbackup_file_name
Q 7)What is global cache service,global enque service and global resource directory?
Ans: Global Cache Service
GCS is the main controlling process that implements Cache Fusion. GCS tracks the location and
the status (mode and role) of the data blocks, as well as the access privileges of various
instances. GCS is the mechanism, which guarantees the data integrity by employing global
access levels. GCS maintains the block modes for data blocks in the global role. It is also
responsible for block transfers between the instances. Upon a request from an Instance GCS
organizes the block shipping and appropriate lock mode conversions. The Global Cache Service
is implemented by various background processes, such as the Global Cache Service Processes
(LMSn) and Global Enqueue Service Daemon (LMD).
Global Enqueue Service
The Global Enqueue Service (GES) manages or tracks the status of all the Oracle enqueuing
mechanisms. This involves all non Cache-fusion intra-instance operations. GES performs
concurrency control on dictionary cache locks, library cache locks and the transactions. GES
does this operation for resources that are accessed by more than one instance.
GES/GCS Areas

GES and GCS have the memory structures associated with global resources. It is distributed
across all instances in a cluster. This area is located in the variable or shared pool section of the
SGA. The list below shows the additions.
Global Resource Directory Global Resource Directory (GRD) is the internal database that
records and stores the current status of the data blocks. Whenever a block is transferred out of a
local cache to another instances cache, the GRD is updated. The following resources
information is available in GRD.
* Data Block Identifiers (DBA)
* Location of most current version
* Modes of the data blocks ( (N)Null, (S)Shared, (X)Exclusive )
*The Roles of the data blocks (local or global) held by each instance
*Buffer caches on multiple nodes in the cluster
In response for a reader of this blog who asked me for some interview questions for a 3+Year
experienced DBA, I have written this series of questions that you can use in your interviews.
Either if you are the interviewer, or the interviewer. Enjoy!
1. Basic (Every DBA should answer correctly ALL these questions. This knowledge is just basic
for a 3+ year experienced DBA)
1.1 Q- Which are the default passwords of SYSTEM/SYS?
A- MANAGER / CHANGE_ON_INSTALL
1.2 Q- How can you execute a script file in SQLPLUS?
A- To execute a script file in SQLPlus, type @ and then the file name.
1.3 Q- Where can you find official Oracle documentation?
A- tahiti.oracle.com
1.4 Q- What is the address of the Official Oracle Support?
A- metalink.oracle.com or support.oracle.com
1.5 Q- What file will you use to establish Oracle connections from a remote client?
A- tnsnames.ora
1.6 Q- How can you check if the database is accepting connections?
A- lsnrctl status or lsnrctl services
1.7 Q- Which log would you check if a database has a problem?
A- Alert log
1.8 Q- Name three clients to connect with Oracle, for example, SQL Developer:
A- SQL Developer, SQL-Plus, TOAD, dbvisualizer, PL/SQL Developer There are several, but
an experienced dba should know at least three clients.
1.9 Q- How can you check the structure of a table from sqlplus?
A- DESCRIBE or DESC
1.10 Q- What command will you start to run the installation of Oracle software on Linux?
A- runInstaller
2. Moderate (Standard knoledge for a daily-work of every DBA. He could fail one or two
questions, but not more)
2.1 Q- What should you do if you encounter an ORA-600?

A- Contact Oracle Support


2.2 Q- Explain the differences between PFILE and SPFILE
A- A PFILE is a Static, text file that initialices the database parameter in the moment that its
started. If you want to modify parameters in PFILE, you have to restart the database.
A SPFILE is a dynamic, binary file that allows you to overwrite parameters while the database is
already started (with some exceptions)
2.3 Q- In which Oracle version was Data Pump introduced?
A- Oracle 10g
2.4 Q- Say two examples of DML, two of DCL and two of DDL
A- DML: SELECT, INSERT, UPDATE, DELETE, MERGE, CALL, EXPLAIN PLAN, LOCK
TABLE
DDL: CREATE, ALTER, DROP, TRUNCATE, COMMENT, RENAME
DCL: GRANT, REVOKE
2.5 Q- You want to save the output of an Oracle script from sqlplus. How would you do it?
A- spool script_name.txt
select * from your_oracle_operations;
spool off;
2.6 Q- What is the most important requirement in order to use RMAN to make consistent hot
backups?
A- Your database has to be in ARCHIVELOG mode.
2.7 Q- Can you connect to a local database without a listener?
A- Yes, you can.
2.8 Q- In which view can you find information about every view and table of oracle dictionary?
A- DICT or DICTIONARY
2.9 Q- How can you view all the users account in the database?
A- SELECT USERNAME FROM DBA_USERS;
2.10 Q- In linux, how can we change which databases are started during a reboot?
A- Edit /etc/oratab
3. Advanced (A 3+ year experienced DBA should have enough knowledge to answer these
questions. However, depending on the work he has done, he could still fail up to 4 questions)
3.1 Q- When a user process fails, what Oracle background process will clean after it?
A- PMON
3.2 Q- How can you reduce the space of TEMP datafile?
A- Prior to Oracle 11g, you had to recreate the datafile. In Oracle 11g a new feature was
introduced, and you can shrink the TEMP tablespace.
3.3 Q- How can you view all the current users connected in your database in this moment?
A- SELECT COUNT(*),USERNAME FROM V$SESSION GROUP BY USERNAME;
3.4 Q- Explain the differences between SHUTDOWN, SHUTDOWN NORMAL, SHUTDOWN
IMMEDIATE AND SHUTDOWN ABORT
A- SHUTOWN NORMAL = SHUTDOWN : It waits for all sessions to end, without allowing
new connections.
SHUTDOWN IMMEDIATE : Rollback current transactions and terminates every session.
SHUTDOWN ABORT : Aborts all the sessions, leaving the database in an inconsistent state. Its
the fastest method, but can lead to database corruption.
3.5 Q- Is it possible to backup your database without the use of an RMAN database to store the

catalog?
A- Yes, but the catalog would be stored in the controlfile.
3.6 Q- Which are the main components of Oracle Grid Control?
A- OMR (Oracle Management Repository), OMS (Oracle Management Server) and OMA
(Oracle Management Agent).
3.7 Q- What command will you use to navigate through ASM files?
A- asmcmd
3.8 Q- What is the difference between a view and a materialized view?
A- A view is a select that is executed each time an user accesses to it. A materialized view stores
the result of this query in memory for faster access purposes.
3.9 Q- Which one is faster: DELETE or TRUNCATE?
A- TRUNCATE
3.10 Q- Are passwords in oracle case sensitive?
A- Only since Oracle 11g.
4. RAC (Only intended for RAC-specific DBAs, with varied difficultied questions)
4.1 Q- What is the recommended method to make backups of a RAC environment?
A- RMAN to make backups of the database, dd to backup your voting disk and hard copies of
the OCR file.
4.2 Q- What command would you use to check the availability of the RAC system?
A- crs_stat -t -v (-t -v are optional)
4.3 Q- What is the minimum number of instances you need to have in order to create a RAC?
A- 1. You can create a RAC with just one server.
4.4 Q- Name two specific RAC background processes
A- RAC processes are: LMON, LMDx, LMSn, LKCx and DIAG.
4.5 Q- Can you have many database versions in the same RAC?
A- Yes, but Clusterware version must be greater than the greater database version.
4.6 Q- What was RAC previous name before it was called RAC?
A- OPS: Oracle Parallel Server
4.7 Q- What RAC component is used for communication between instances?
A- Private Interconnect.
4.8 Q- What is the difference between normal views and RAC views?
A- RAC views has the prefix G. For example, GV$SESSION instead of V$SESSION
4.9 Q- Which command will we use to manage (stop, start) RAC services in command-line
mode?
A- srvctl
4.10 Q- How many alert logs exist in a RAC environment?
A- One for each instance.
5. Master (A 3+ year experienced DBA would probably fail these questions, they are very
specifid and specially difficult. Be glad if hes able to answer some of them)
5.1 Q- How can you difference a usual parameter and an undocumented parameter?
A- Undocumented parameters have the prefix _. For example, _allow_resetlogs_corruption
5.2 Q- What is BBED?
A- An undocumented Oracle tool used for foresnic purposes. Stans for Block Browser and
EDitor.

5.3 Q- The result of the logical comparison (NULL = NULL) will be And in the case of
(NULL != NULL)
A- False in both cases.
5.4 Q- Explain Oracle memory structure
The Oracle RDBMS creates and uses storage on the computer hard disk and in random access
memory (RAM). The portion in the computer s RAM is called memory structure. Oracle has two
memory structures in the computer s RAM. The two structures are the Program Global Area
(PGA) and the System Global Area (SGA).
The PGA contains data and control information for a single user process. The SGA is the
memory segment that stores data that the user has retrieved from the database or data that the
user wants to place into the database.
5.5 Q- Will RMAN take backups of read-only tablespaces?
A- No
5.6 Q- Will a user be able to modify a table with SELECT only privilege?
A- He wont be able to UPDATE/INSERT into that table, but for some reason, he will still be
able to lock a certain table.
5.7 Q- What Oracle tool will you use to transform datafiles into text files?
A- Trick question: you cant do that, at least with any Oracle tool. A very experienced DBA
should perfectly know this.
5.8 Q- SQL> SELECT * FROM MY_SCHEMA.MY_TABLE;
SP2-0678: Column or attribute type can not be displayed by SQL*Plus
Why Im getting this error?
A- The table has a BLOB column.
5.9 Q- What parameter will you use to force the starting of your database with a corrupted
resetlog?
A- _ALLOW_RESETLOGS_CORRUPTION
5.10 Q- Name the seven types of Oracle tables
A- Heap Organized Tables, Index Organized Tables, Index Clustered Tables, Hash Clustered
Tables, Nested Tables, Global Temporary Tables, Object Tables.

Oracle RAC Interview Questions and Answers


How does OCSSD starts first if voting disk & OCR resides in ASM Diskgroups?
You might wonder how CSSD, which is required to start the clustered ASM
instance, can be started
If voting disks are stored in ASM? This sounds like a chicken-and-egg
problem:
without access to the voting disks there is no CSS, hence the node cannot
join the cluster.
But without being part of the cluster, CSSD cannot start the ASM instance.

To solve this problem the ASM disk headers have new metadata in 11.2:
you can use kfed to read the header of an ASM disk containing a voting disk.
The kfdhdb.vfstart and kfdhdb.vfend fields tell CSS where to find the voting
file. This does not
require the ASM instance to be up.
Once the voting disks are located, CSS can access them and joins the
cluster.
What is gsdctl in RAC? list gsdctl commands in Oracle RAC?GSDCTL stands
for Global Service Daemon Control, we can use gsdctl commands to start,
stop, and obtain the status of the GSD service on any platform.
The options for gsdctl are:$ gsdctl start -- To start the GSD service
$ gsdctl stop -- To stop the GSD service
$ gsdctl stat -- To obtain the status of the GSD service
Log file location for gsdctl:
$ ORACLE_HOME/srvm/log/gsdaemon_node_name.log
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.
Oracle RAC is a cluster database with a shared cache architecture that
overcomes the limitations of
traditional shared-nothing and shared-disk approaches to provide a highly
scalable and available
database solution for all the business applications.
Oracle RAC provides the foundation for enterprise grid computing.
What is Oracle RAC One Node?
Oracle RAC one Node is a single instance
running on one node of the cluster while the 2nd node is in cold standby
mode. If the instance fails for some reason then RAC one node detect it and
restart the instance on the same node or the instance is relocate to the 2nd
node incase there is failure or fault in 1st node. The benefit of this feature is
that it provides a cold failover solution and it automates the instance
relocation without any downtime and does not need a manual intervention.
Oracle introduced this feature with the release of 11gR2 (available with
Enterprise Edition).
What is RAC and how is it different from non RAC databases?
Oracle Real
Application clusters allows multiple instances to access a single database,
the instances will be running on multiple nodes.
In Real Application Clusters environments, all nodes concurrently execute
transactions against the same database.

Real Application Clusters coordinates each node's access to the shared data
to provide consistency and integrity.
What are the advantages of RAC (Real Application Clusters)? Reliability - if
one node fails, the database won't fail
Availability - nodes can be added or replaced without having to shutdown
the database
Scalability - more nodes can be added to the cluster as the workload
increases
What is 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 instance 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 cache fusion.
How do we verify that RAC instances are running? SQL>select * from
V$ACTIVE_INSTANCES;
The query gives the instance number under INST_NUMBER
column,host_:instancename under INST_NAME column.
How can you connect to a specific node in a RAC environment? tnsnames.ora
ensure that you have INSTANCE_NAME specified in it.
Which is the "MASTER NODE" in RAC? The node with the lowest node number
will become master node and dynamic remastering of the resources will take
place.
to find out the master node for particular resource, you can query
v$ges_resource for MASTER_NODE column.
To find out which is the master node, you can see ocssd.log file and search
for "master node number".
when the first master node fails in the cluster the lowest node number will
become master node.
What components in RAC must reside in shared storage? All datafiles,
controlfiles, SPFIles, redo log files and archive logs must reside on clusteraware shred storage.
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 are Oracle Cluster Components? 1.Cluster Interconnect (HAIP)


2.Shared Storage (OCR/Voting Disk)
3.Clusterware software
4.Oracle Kernel Components
What are Oracle RAC Components? VIP, Node apps etc.
What are Oracle Kernel Components? Basically Oracle kernel need to
switched on with RAC On option when you convert to RAC, that is the
difference as it facilitates few RAC bg process like LMON,LCK,LMD,LMS etc.
How to turn on RAC? # link the oracle libraries
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_on
# rebuild oracle
$ cd $ORACLE_HOME/bin
$ relink oracle
Disk architechture in RAC?SAN (Storage Area Networks) - generally using
fibre to connect to the SAN
NAS (Network Attached Storage) - generally using a network to connect to
the NAS using either NFS, ISCSI
What is Oracle Clusterware? The Clusterware software allows nodes to
communicate with each other and forms the cluster that makes the nodes
work as a single logical server.
The software is run by the Cluster Ready Services (CRS) using the Oracle
Cluster Registry (OCR) that records and maintains the cluster and node
membership information and the voting disk which acts as a tiebreaker
during communication failures. Consistent heartbeat information travels
across the interconnect to the voting disk when the cluster is running.
Real Application Clusters
Oracle RAC is a cluster database with a shared cache architecture that
overcomes the limitations of traditional shared-nothing and shared-disk
approaches to provide a highly scalable and available database solution for
all your business applications. Oracle RAC provides the foundation for
enterprise grid computing.
Oracles Real Application Clusters (RAC) option supports the transparent
deployment of a single database across a cluster of servers, providing fault
tolerance from hardware failures or planned outages. Oracle RAC running on
clusters provides Oracles highest level of capability in terms of availability,
scalability, and low-cost computing.
One DB opened by multipe instances so the the db ll be Highly Available if
an instance crashes.
Cluster Software. Oracles Clusterware or products like Veritas Volume

Manager are required to provide the cluster support and allow each node to
know which nodes belong to the cluster and are available and with Oracle
Cluterware to know which nodes have failed and to eject then from the
cluster, so that errors on that node can be cleared.
Oracle Clusterware has two key components Cluster Registry OCR and Voting
Disk.
The cluster registry holds all information about nodes, instances, services
and ASM storage if used, it also contains state information ie they are
available and up or similar.
The voting disk is used to determine if a node has failed, i.e. become
separated from the majority. If a node is deemed to no longer belong to the
majority then it is forcibly rebooted and will after the reboot add itself again
the the surviving cluster nodes.
What are the Oracle Clusterware key components? Oracle Clusterware has
two key components Cluster Registry OCR and Voting Disk.
What is Voting Disk and OCR?Voting Disk
Oracle RAC uses the voting disk to manage cluster membership by way of a
health check and arbitrates cluster ownership among the instances in case of
network failures. The voting disk must reside on shared disk.
A node must be able to access more than half of the voting disks at any
time.
For example, if you have 3 voting disks configured, then a node must be
able to access at least two of the voting disks at any time. If a node cannot
access the minimum required number of voting disks it is evicted, or
removed, from the cluster.
Oracle Cluster Registry (OCR)
The cluster registry holds all information about nodes, instances, services
and ASM storage if used,
it also contains state information ie they are available and up or similar.
The OCR must reside on shared disk that is accessible by all of the nodes in
your cluster.
What are the administrative tasks involved with voting disk? Following
administrative tasks are performed with the voting disk :
1) Backing up voting disks
2) Recovering Voting disks
3) Adding voting disks
4) Deleting voting disks
5) Moving voting disks
Can you add voting disk online? Do you need voting disk backup? Yes, as per
documentation, if you have multiple voting disk you can add online, but if
you have only one voting disk , by that cluster will be down as its lost you
just need to start crs in exclusive mode and add the votedisk using

crsctl add votedisk


What is the Oracle Recommendation for backing up voting disk? Oracle
recommends us to use the dd command to backup the voting disk with a
minimum block size of 4KB.
How do we backup voting disks? 1) Oracle recommends that you back up
your voting disk after the initial cluster creation and after we complete any
node addition or deletion procedures.
2) First, as root user, stop Oracle Clusterware (with the crsctl stop crs
command) on all nodes. Then, determine the current voting disk by issuing
the following command:
crsctl query votedisk css
3) Then, issue the dd or ocopy command to back up a voting disk, as
appropriate.
Give the syntax of backing up voting disks:On Linux or UNIX systems:
dd if=voting_disk_name of=backup_file_name
where,
voting_disk_name is the name of the active voting disk
backup_file_name is the name of the file to which we want to back up the
voting disk contents
On Windows systems, use the ocopy command:
copy voting_disk_name backup_file_name
How do we verify an existing current backup of OCR? We can verify the
current backup of OCR using the following command : ocrconfig -showbackup
You have lost OCR disk, what is your next step? The cluster stack will be
down due to the fact that cssd is unable to maintain the integrity, this is true
in 10g, From 11gR2 onwards, the crsd stack will be down, the hasd still up
and running. You can add the ocr back by restoring the automatic backup or
import the manual backup,
What are the major RAC wait events? In a RAC environment the buffer cache
is global across all instances in the cluster and hence the processing
differs.The most common wait events related to this are gc cr request and gc
buffer busy
GC CR request :the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly
tuned queries will increase the amount of data blocks requested by an Oracle
session. The more blocks requested typically means the more often a block
will need to be read from a remote instance via the interconnect.)
GC BUFFER BUSY: It is the time the remote instance locally spends accessing
the requested data block.

What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in AWR
Report? This is most likely due to a fault in interconnect network.
Check netstat -s
if you see "fragments dropped" or "packet reassemblies failed" , Work with
your system administrator find the fault with network.
How do you troubleshoot node reboot? Please check metalink ...
Note 265769.1 Troubleshooting CRS Reboots
Note.559365.1 Using Diagwait as a diagnostic to get more information for
diagnosing Oracle Clusterware Node evictions.
Srvctl cannot start instance, I get the following error PRKP-1001 CRS-0215,
however sqlplus can
start it on both nodes? How do you identify the problem? Set the
environmental variable SRVM_TRACE to true.. And start the instance with
srvctl. Now you will get detailed error stack.
What are Oracle Clusterware processes for 10g on Unix and Linux?Cluster
Synchronization Services (ocssd) Manages cluster node membership and
runs as the oracle user; failure of this process results in cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources
(which could be a database, an instance, a service, a Listener, a virtual IP
(VIP) address, an application process, and so on) based on the resource's
configuration information that is stored in the OCR. This includes start, stop,
monitor and failover operations. This process runs as the root user
Event manager daemon (evmd) A background process that publishes
events that crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and
provide I/O fencing. OPROCD performs its check, stops running, and if the
wake up is beyond the expected time, then OPROCD resets the processor
and reboots the node. An OPROCD failure results in Oracle Clusterware
restarting the node. OPROCD uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific
requirements and complex resources. Runs server callout scripts when FAN
events occur.
What are Oracle database background processes specific to RAC? 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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon

LMSGlobal Cache Service Process


LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor
To ensure that each Oracle RAC database instance obtains the block that it
needs to satisfy a query or transaction, Oracle RAC instances use two
processes, the Global Cache Service (GCS) and the Global Enqueue Service
(GES). The GCS and GES maintain records of the statuses of each data file
and each cached block using a Global Resource Directory (GRD). The GRD
contents are distributed across all of the active instances.
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.
What is 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.
What is SCAN listener? A scan listener is something that additional to node
listener which listens the incoming db connection requests from the client
which got through the scan IP, it got end points configured to node listener
where it routes the db connection requests to particular node listener.
SCAN IP can be disabled if not required. However SCAN IP is mandatory
during the RAC installation. Enabling/disabling SCAN IP is mostly used in
oracle apps environment by the concurrent manager (kind of job scheduler in
oracle apps).
Steps to disable the SCAN IP,
i. Do not use SCAN IP at the client end.
ii. Stop scan listener
srvctl stop scan_listener
iii.Stop scan
srvctl stop scan (this will stop the scan vip's)
iv. Disable scan and disable scan listener
srvctl disable scan
What are the different network components are in 10g RAC? public, private,
and vip components
Private interfaces is for intra node communication.
VIP is all about availability of application. When a node fails then the VIP
component fail over to some other node, this is the reason that all
applications should based on vip components means tns entries should have
vip entry in the host list

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.
What is the use of cluster interconnect? Cluster interconnect is used by the
Cache fusion for inter instance communication.
How can we configure the cluster interconnect? Configure User Datagram
Protocol (UDP) on Gigabit Ethernet for cluster interconnects.
On UNIX and Linux systems we use UDP and RDS (Reliable data socket)
protocols to be used by Oracle Clusterware.
Windows clusters use the TCP protocol.
What is the purpose of Private Interconnect? Clusterware uses the private
interconnect for cluster synchronization (network heartbeat) and daemon
communication between the the clustered nodes. This communication is
based on the TCP protocol.
RAC uses the interconnect for cache fusion (UDP) and inter-process
communication (TCP). Cache Fusion is the remote memory mapping of
Oracle buffers, shared between the caches of participating nodes in the
cluster.
What is a virtual IP address or VIP? A virtual IP address or VIP is an alternate
IP address that the client connections use instead of the standard public IP
address. To configure VIP 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.
Why do we have a Virtual IP (VIP) in Oracle RAC? Without using VIPs or FAN,
clients connected to a node that died will often wait for a TCP timeout period
(which can be up to 10 min) before getting an error. As a result, you don't
really have a good HA solution without using VIPs.
When a node fails, the VIP associated with it is automatically failed over to
some other node and new node re-arps the world indicating a new MAC
address for the IP. Subsequent packets sent to the VIP go to the new node,
which will send error RST packets back to the clients. This results in the
clients getting errors immediately.
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 is the use of a service in Oracle RAC environment? 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 characteristics controlled by Oracle services feature? The
characteristics include a unique name, workload balancing, failover options,
and high availability.
What enables 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 are the types of connection load-balancing? Connection Workload
management is one of the key aspects when you have RAC instances as you
want to distribute the connections to specific nodes/instance or those have
less load.
There are two types of connection load-balancing:
1.Client Side load balancing (also called as connect time load balancing)
2.Server side load balancing (also called as Listener connection load
balancing)
What is the difference 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.
Client Side load balancing:- Oracle client side load balancing feature enables
clients to randomize the connection requests among all the available
listeners based on their load.
An tns entry that contains all nodes entries and use load_balance=on
(default its on) will use the connect time load balancing or client side load
balancing.
Sample Client Side TNS Entry:finance =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myrac2-vip)(PORT = 2042))
(ADDRESS = (PROTOCOL = TCP)(HOST = myrac1-vip)(PORT = 2042))
(ADDRESS = (PROTOCOL = TCP)(HOST = myrac3-vip)(PORT = 2042))

(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = FINANCE) (FAILOVER=ON)
(FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES =
180) (DELAY = 5))
)
)
Server side load balancing:- This improves the connection performance by
balancing the number of active connections among multiple instances and
dispatchers. In a single instance environment (shared servers), the listener
selects the least dispatcher to handle the incoming client requests. In a rac
environments, PMON is aware of all instances load and dispatchers , and
depending on the load information PMON redirects the connection to the
least loaded node.
In a RAC environment, *.remote_listener parameter which is a tns entry
containing all nodes addresses need to set to enable the load balance
advisory updates to PMON.
Sample Tns entry should be in an instances of RAC cluster,
local_listener=LISTENER_MYRAC1
remote_listener = LISTENERS_MYRACDB
What are the administrative tools used for Oracle RAC environments? Oracle
RAC cluster can be administered as a single image using the below

OEM (Enterprise Manager),

SQL*PLUS,

Server control (SRVCTL),

Cluster Verification Utility (CLUVFY),

DBCA,

NETCA
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 is the difference between CRSCTL and SRVCTL? crsctl manages
clusterware-related operations:
Starting and stopping Oracle Clusterware
Enabling and disabling Oracle Clusterware daemons
Registering cluster resources
srvctl manages Oracle resourcerelated operations:
Starting and stopping database instances and services
Also from 11gR2 manages the cluster resources like network,vip,disks etc

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 or crsctl stat res -t
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).
What are the background process that exists in 11gr2 and
functionality? Process Name
Functionality
crsd
The CRS daemon (crsd) manages cluster resources based on
configuration information that is stored in Oracle Cluster Registry (OCR) for
each resource. This includes start, stop, monitor, and failover operations. The
crsd process generates events when the status of a resource changes.
cssd
Cluster Synchronization Service (CSS): Manages the cluster
configuration by controlling which nodes are members of the cluster and by
notifying members when a node joins or leaves the cluster. If you are using
certified third-party clusterware, then CSS processes interfaces with your
clusterware to manage node membership information. CSS has three
separate processes: the CSS daemon (ocssd), the CSS Agent (cssdagent),
and the CSS Monitor (cssdmonitor). The cssdagent process monitors the
cluster and provides input/output fencing. This service formerly was provided
by Oracle Process Monitor daemon (oprocd), also known as OraFenceService
on Windows. A cssdagent failure results in Oracle Clusterware restarting the
node.
diskmon
Disk Monitor daemon (diskmon): Monitors and performs
input/output fencing for Oracle Exadata Storage Server. As Exadata storage
can be added to any Oracle RAC node at any point in time, the diskmon
daemon is always started when ocssd is started.
evmd
Event Manager (EVM): Is a background process that publishes
Oracle Clusterware events
mdnsd
Multicast domain name service (mDNS): Allows DNS requests.
The mDNS process is a background process on Linux and UNIX, and a service
on Windows.
gnsd
Oracle Grid Naming Service (GNS): Is a gateway between the
cluster mDNS and external DNS servers. The GNS process performs name

resolution within the cluster.


ons
Oracle Notification Service (ONS): Is a publish-and-subscribe service
for communicating Fast Application Notification (FAN) events
oraagent
oraagent: Extends clusterware to support Oracle-specific
requirements and complex resources. It runs server callout scripts when FAN
events occur. This process was known as RACG in Oracle Clusterware 11g
Release 1 (11.1).
orarootagent
Oracle root agent (orarootagent): Is a specialized oraagent
process that helps CRSD manage resources owned by root, such as the
network, and the Grid virtual IP address oclskd
Cluster kill daemon
(oclskd): Handles instance/node evictions requests that have been escalated
to CSS
gipcd
Grid IPC daemon (gipcd): Is a helper daemon for the
communications infrastructure ctssd
Cluster time synchronisation
daemon(ctssd) to manage the time syncrhonization between nodes, rather
depending on NTP
Under which user or owner the process will
start? Component
Process
Owner
Oracle High Availability Service
ohasd
init, root
Cluster Ready Service (CRS)
Services
root
Cluster Synchronization Service (CSS)
cssdagent
grid owner
Event Manager (EVM)
evmlogger
grid owner
Cluster Time Synchronization Service (CTSS)
octssd
root
Oracle Notification Service (ONS)
eons
grid owner
Oracle Agent
oragent
grid owner
Oracle Root Agent
orarootagent
root
Grid Naming Service
(GNS)
gnsd
Grid Plug and Play (GPnP)
gpnpd
grid owner
Multicast domain name service (mDNS)
mdnsd
grid owner

Name of the

Cluster Ready
ocssd,cssd monitor,
evmd,

ons,

root

What is the major difference between 10g and 11g RAC? There is not much
difference between 10g and 11gR (1) RAC. But there is a significant
difference in 11gR2.

Prior to 11gR1(10g) RAC, the following were managed by Oracle CRS


Databases
Instances
Applications
Node Monitoring
Event Services
High Availability
From 11gR2(onwards) its completed HA stack managing and providing the
following resources as like the other cluster software like VCS etc.
Databases
Instances
Applications
Cluster Management
Node Management
Event Services
High Availability
Network Management (provides DNS/GNS/MDNSD services on behalf of
other traditional services) and SCAN Single Access Client Naming method,
HAIP
Storage Management (with help of ASM and other new ACFS filesystem)
Time synchronization (rather depending upon traditional NTP)
Removed OS dependent hang checker etc, manages with own additional
monitor process
What is hangcheck timer? The hangcheck timer checks regularly the health
of the system. If the system hangs or stop the node will be restarted
automatically.
There are 2 key parameters for this module:
-> hangcheck-tick: this parameter defines the period of time between
checks of system health. The default value is 60 seconds; Oracle
recommends setting it to 30seconds.
-> hangcheck-margin: this defines the maximum hang delay that should be
tolerated before hangcheck-timer resets the RAC node.
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
What is RAC? What is the benefit of RAC over single instance database? In
Real Application Clusters environments, all nodes concurrently execute
transactions against the same database. Real Application Clusters
coordinates each node's access to the shared data to provide consistency
and integrity.
Benefits:
Improve response time
Improve throughput
High availability
Transparency
Advantages of RAC (Real Application Clusters)
Reliability - if one node fails, the database won't fail
Availability - nodes can be added or replaced without having to shutdown
the database
Scalability - more nodes can be added to the cluster as the workload
increases
What is a virtual IP address or VIP?
A virtual IP address or VIP is an alternate IP address that the client
connections use instead of the standard public IP address. To configure VIP
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.
Using virtual IP we can save our TCP/IP timeout problem because Oracle
notification service maintains communication between each nodes and
listeners.

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 is voting disk? Voting Disk is a file that sits in the shared storage area
and must be accessible by all nodes in the cluster. All nodes in the cluster
registers their heart-beat information in the voting disk, so as to confirm that
they are all operational. If heart-beat information of any node in the voting
disk is not available that node will be evicted from the cluster. The CSS
(Cluster Synchronization Service) daemon in the clusterware maintains the
heart beat of all nodes to the voting disk. When any node is not able to send
heartbeat to voting disk, then it will reboot itself, thus help avoiding the splitbrain syndrome.
For high availability, Oracle recommends that you have a minimum of three
or odd number (3 or greater) of votingdisks.
Voting Disk - is file that resides on shared storage and Manages cluster
members. Voting disk reassigns cluster ownership between the nodes in
case of failure.
The Voting Disk Files are used by Oracle Clusterware to determine which
nodes are currently members of the cluster. The voting disk files are also
used in concert with other Cluster components such as CRS to maintain the
clusters integrity.
Oracle Database 11g Release 2 provides the ability to store the voting disks
in ASM along with the OCR. Oracle Clusterware can access the OCR and the
voting disks present in ASM even if the ASM instance is down. As a result CSS
can continue to maintain the Oracle cluster even if the ASM instance has
failed.
How many voting disks are you maintaining ?
By default Oracle will create 3 voting disk files in ASM.
Oracle expects that you will configure at least 3 voting disks for redundancy
purposes. You should always configure an odd number of voting disks >= 3.
This is because loss of more than half your voting disks will cause the entire
cluster to fail.
You should plan on allocating 280MB for each voting disk file. For example, if
you are using ASM and external redundancy then you will need to allocate
280MB of disk for the voting disk. If you are using ASM and normal
redundancy you will need 560MB.
Why we need to keep odd number of voting disks ? Oracle expects that you
will configure at least 3 voting disks for redundancy purposes. You should
always configure an odd number of voting disks >= 3. This is because loss of
more than half your voting disks will cause the entire cluster to fail.
What are 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:
ACMSAtomic Controlfile to Memory Service (ACMS)
GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor
What are Oracle Clusterware processes for 10g ? Cluster Synchronization
Services (ocssd) Manages cluster node membership and runs as the oracle
user; failure of this process results in cluster restart.
Cluster Ready Services (crsd) The crs process manages cluster resources
(which could be a database, an instance, a service, a Listener, a virtual IP
(VIP) address, an application process, and so on) based on the resource's
configuration information that is stored in the OCR. This includes start, stop,
monitor and failover operations. This process runs as the root user
Event manager daemon (evmd) A background process that publishes
events that crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and
provide I/O fencing. OPROCD performs its check, stops running, and if the
wake up is beyond the expected time, then OPROCD resets the processor
and reboots the node. An OPROCD failure results in Oracle Clusterware
restarting the node. OPROCD uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific
requirements and complex resources. Runs server callout scripts when FAN
events occur.
What are Oracle database background processes specific to RAC? LMS
Global Cache Service Process
LMDGlobal Enqueue Service Daemon
LMONGlobal Enqueue Service Monitor
LCK0Instance Enqueue Process
Oracle RAC instances use two processes, the Global Cache Service (GCS)
and the Global Enqueue Service (GES). The GCS and GES maintain records of
the statuses of each data file and each cached block using a Global Resource
Directory (GRD). The GRD contents are distributed across all of the active
instances.
What is Cache Fusion? Transfor of data across instances through private
interconnect is called cachefusion.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
What is SCAN? (11gR2 feature) Single Client Access Name (SCAN) is s a new
Oracle Real Application Clusters (RAC) 11g Release 2 feature that provides a
single name for clients to access an Oracle Database running in a cluster.
The benefit is clients using SCAN do not need to change if you add or remove
nodes in the cluster.
SCAN provides a single domain name via (DNS), allowing and-users to
address a RAC cluster as-if it were a single IP address. SCAN works by
replacing a hostname or IP list with virtual IP addresses (VIP).
Single client access name (SCAN) is meant to facilitate single name for all
Oracle clients to connect to the cluster database, irrespective of number of
nodes and node location. Until now, we have to keep adding multiple address
records in all clients tnsnames.ora, when a new node gets added to or
deleted from the cluster.
Single Client Access Name (SCAN) eliminates the need to change TNSNAMES
entry when nodes are added to or removed from the Cluster. RAC instances
register to SCAN listeners as remote listeners. Oracle recommends assigning
3 addresses to SCAN, which will create 3 SCAN listeners, though the cluster
has got dozens of nodes.. SCAN is a domain name registered to at least one
and up to three IP addresses, either in DNS (Domain Name Service) or GNS
(Grid Naming Service). The SCAN must resolve to at least one address on the
public network. For high availability and scalability, Oracle recommends
configuring the SCAN to resolve to three addresses.
What are SCAN components in a cluster? 1.SCAN Name
2.SCAN IPs (3)
3.SCAN Listeners (3)
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.
What is TAF? TAF (Transparent Application Failover) is a configuration that
allows session fail-over between different nodes of a RAC database cluster.
Transparent Application Failover (TAF). If a communication link failure occurs
after a connection is established, the connection fails over to another active
node. Any disrupted transactions are rolled back, and session properties and

server-side program variables are lost. In some cases, if the statement


executing at the time of the failover is a Select statement, that statement
may be automatically re-executed on the new connection with the cursor
positioned on the row on which it was positioned prior to the failover.
After an Oracle RAC node crashesusually from a hardware failureall new
application transactions are automatically rerouted to a specified backup
node. The challenge in rerouting is to not lose transactions that were "in
flight" at the exact moment of the crash. One of the requirements of
continuous availability is the ability to restart in-flight application
transactions, allowing a failed node to resume processing on another server
without interruption. Oracle's answer to application failover is a new Oracle
Net mechanism dubbed Transparent Application Failover. TAF allows the DBA
to configure the type and method of failover for each Oracle Net client.
TAF architecture offers the ability to restart transactions at either the
transaction (SELECT) or session level.
What are the requirements for Oracle Clusterware?
1. External Shared Disk to store Oracle Cluster ware file (Voting Disk and
Oracle Cluster Registry - OCR)
2. Two netwrok cards on each cluster ware node (and three set of IP address)
Network Card 1 (with IP address set 1) for public network
Network Card 2 (with IP address set 2) for private network (for inter node
communication between rac nodes used by clusterware and rac database)
IP address set 3 for Virtual IP (VIP) (used as Virtual IP address for client
connection and for connection failover)
3. Storage Option for OCR and Voting Disk - RAW, OCFS2 (Oracle Cluster File
System), NFS, ..
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.
How to find location of OCR file when CRS is down? If you need to find the
location of OCR (Oracle Cluster Registry) but your CRS is down.
When the CRS is down:
Look into ocr.loc file, location of this file changes depending on the OS:
On Linux: /etc/oracle/ocr.loc
On Solaris: /var/opt/oracle/ocr.loc
When CRS is UP:
Set ASM environment or CRS environment then run the below command:
ocrcheck
In 2 node RAC, how many NICs are r using ?
2 network cards on each clusterware node
Network Card 1 (with IP address set 1) for public network

Network Card 2 (with IP address set 2) for private network (for inter node
communication between rac nodes used by clusterware and rac database)
In 2 node RAC, how many IPs are r using ?6 - 3 set of IP address
## eth1-Public: 2
## eth0-Private: 2
## VIP: 2
How to find IPs information in RAC ?Edit the /etc/hosts file as shown below:
# Do not remove the following line, or various programs
# that requires network functionality will fail.
127.0.0.1
localhost.localdomain localhost
## Public Node names
192.168.10.11
node1-pub.example.com
node1-pub
192.168.10.22
node2-pub.example.com
node2-pub
## Private Network (Interconnect)
192.168.0.11
node1-prv
192.168.0.22
node2-prv
## Virtual IPs
192.168.10.111
192.168.10.222

node1-prv
node2-prv

node1-vip.example.com
node2-vip.example.com

node1-vip
node2-vip

What is difference between RAC ip addresses ?Public IP adress is the normal


IP address typically used by DBA and SA to manage storage, system and
database. Public IP addresses are reserved for the Internet.
Private IP address is used only for internal clustering processing (Cache
Fusion) (aka as interconnect). Private IP addresses are reserved for private
networks.
VIP is used by database applications to enable fail over when one cluster
node fails. The purpose for having VIP is so client connection can be failover
to surviving nodes in case there is failure
Can application developer access the private ip ?No. private IP address is
used only for internal clustering processing (Cache Fusion) (aka as
interconnect)
Where are the Clusterware files stored on a RAC environment? The
Clusterware is installed on each node (on an Oracle Home) and on the shared
disks (the voting disks and the CSR file)
Where are the database software files stored on a RAC environment?
The base software is installed on each node of the cluster and the database
storage on the shared disks.

What kind of storage we can use for the shared Clusterware files? - OCFS
(Release 1 or 2)
- raw devices
- third party cluster file system such as GPFS or Veritas
What kind of storage we can use for the RAC database storage? - OCFS
(Release 1 or 2)
- ASM
- raw devices
- third party cluster file system such as GPFS or Veritas
What is a CFS? A cluster File System (CFS) is a file system that may be
accessed (read and write) by all members in a cluster at the same time. This
implies that all members of a cluster have the same view.
What is an OCFS2? The OCFS2 is the Oracle (version 2) Cluster File System
which can be used for the Oracle Real Application Cluster.
Which files can be placed on an Oracle Cluster File System? - Oracle Software
installation (Windows only)
- Oracle files (controlfiles, datafiles, redologs, files described by the bfile
datatype)
- Shared configuration files (spfile)
- OCR and voting disk
- Files created by Oracle during runtime
Note: There are some platform specific limitations.
Do you know another Cluster Vendor? HP Tru64 Unix, Veritas, Microsoft
How is possible to install a RAC if we dont have a CFS? This is possible by
using a raw device.
What is a raw device? A raw device is a disk drive that does not yet have a
file system set up. Raw devices are used for Real Application Clusters since
they enable the sharing of disks.
What is a raw partition? A raw partition is a portion of a physical disk that is
accessed at the lowest possible level. A raw partition is created when an
extended partition is created and logical partitions are assigned to it without
any formatting. Once formatting is complete, it is called cooked partition.
When to use CFS over raw? A CFS offers:
- Simpler management
- Use of Oracle Managed Files with RAC
- Single Oracle Software installation
- Autoextend enabled on Oracle datafiles

- Uniform accessibility to archive logs in case of physical node failure


- With Oracle_Home on CFS, when you apply Oracle patches CFS guarantees
that the updated Oracle_Home is visible to all nodes in the cluster.
Note: This option is very dependent on the availability of a CFS on your
platform.
When to use raw over CFS? - Always when CFS is not available or not
supported by Oracle.
- The performance is very, very important: Raw devices offer best
performance without any intermediate layer between Oracle and the disk.
Note: Autoextend fails on raw devices if the space is exhausted. However
the space could be added online if needed.
What CRS is? Oracle RAC 10g Release 1 introduced Oracle Cluster Ready
Services (CRS), a platform-independent set of system services for cluster
environments. In Release 2, Oracle has renamed this product to Oracle
Clusterware.
What is VIP IP used for? It returns a dead connection IMMIDIATELY, when its
primary node fails. Without using VIP IP, the clients have to wait around 10
minutes to receive ORA-3113: end of file on communications channel.
However, using Transparent Application Failover (TAF) could avoid ORA-3113.
Why we need to have configured SSH or RSH on the RAC nodes? SSH (Secure
Shell,10g+) or RSH (Remote Shell, 9i+) allows oracle UNIX account
connecting to another RAC node and copy/ run commands as the local
oracle UNIX account.
Is the SSH, RSH needed for normal RAC operations? No. SSH or RSH are
needed only for RAC, patch set installation and clustered database creation.
Do we have to have Oracle RDBMS on all nodes? Each node of a cluster that
is being used for a clustered database will typically have the RDBMS and RAC
software loaded on it, but not actual data files (these need to be available via
shared disk).
What are the restrictions on the SID with a RAC database? Is it limited to 5
characters? The SID prefix in 10g Release 1 and prior versions was restricted
to five characters by install/ config tools so that an ORACLE_SID of up to max
of 5+3=8 characters can be supported in a RAC environment. The SID prefix
is relaxed up to 8 characters in 10g Release 2, see bug 4024251 for more
information.
Does Real Application Clusters support heterogeneous platforms? The Real
Application Clusters do not support heterogeneous platforms in the same
cluster.

Are there any issues for the interconnect when sharing the same switch as
the public network by using VLAN to separate the network? RAC and
Clusterware deployment best practices suggests that the interconnect
(private connection) be deployed on a stand-alone, physically separate,
dedicated switch. On big network the connections could be instable.
What is the Load Balancing Advisory? To assist in the balancing of application
workload across designated resources, Oracle Database 10g Release 2
provides the Load Balancing Advisory. This Advisory monitors the current
workload activity across the cluster and for each instance where a service is
active; it provides a percentage value of how much of the total workload
should be sent to this instance as well as service quality flag.
How many nodes are supported in a RAC Database? With 10g Release 2, we
support 100 nodes in a cluster using Oracle Clusterware, and 100 instances
in a RAC database. Currently DBCA has a bug where it will not go beyond 63
instances. There is also a documentation bug for the max-instances
parameter. With 10g Release 1 the Maximum is 63.
What is the Cluster Verification Utiltiy (cluvfy)? The Cluster Verification Utility
(CVU) is a validation tool that you can use to check all the important
components that need to be verified at different stages of deployment in a
RAC environment.
What versions of the database can I use the cluster verification utility (cluvfy)
with? The cluster verification utility is release with Oracle Database 10g
Release 2 but can also be used with Oracle Database 10g Release 1.
If I am using Vendor Clusterware such as Veritas, IBM, Sun or HP, do I still
need Oracle Clusterware to run Oracle RAC 10g? Yes. When certified, you can
use Vendor Clusterware however you must still install and use Oracle
Clusterware for RAC. Best Practice is to leave Oracle Clusterware to manage
RAC. For details see Metalink Note 332257.1 and for Veritas SFRAC see
397460.1.
Is RAC on VMWare supported? Yes.
What is hangcheck timer used for ? The hangcheck timer checks regularly
the health of the system. If the system hangs or stop the node will be
restarted automatically.
There are 2 key parameters for this module:
-> hangcheck-tick: this parameter defines the period of time between
checks of system health. The default value is 60 seconds; Oracle
recommends setting it to 30seconds.
-> hangcheck-margin: this defines the maximum hang delay that should be

tolerated before hangcheck-timer resets the RAC node.


Is the hangcheck timer still needed with Oracle RAC 10g? Yes.
What files can I put on Linux OCFS2? For optimal performance, you should
only put the following files on Linux OCFS2:
- Datafiles
- Control Files
- Redo Logs
- Archive Logs
- Shared Configuration File (OCR)
- Voting File
- SPFILE
Is it possible to use ASM for the OCR and voting disk? No, the OCR and voting
disk must be on raw or CFS (cluster file system).
Can I change the name of my cluster after I have created it when I am using
Oracle Clusterware? No, you must properly uninstall Oracle Clusterware and
then re-install.
What the O2CB is? The O2CB is the OCFS2 cluster stack. OCFS2 includes
some services. These services must be started before using OCFS2 (mount/
format the file systems).
What the OCR file is used for? OCR is a file that manages the cluster and
RAC configuration.
What the Voting Disk file is used for? The voting disk is nothing but a file
that contains and manages information of all the node memberships.
What is the recommended method to make backups of a RAC
environment?
RMAN to make backups of the database, dd to
backup your voting disk and hard copies of the OCR file.
What command would you use to check the availability of the RAC
system? crs_stat -t -v (-t -v are optional)
What is the minimum number of instances you need to have in order to
create a RAC? You can create a RAC with just one server.
Name two specific RAC background processes RAC processes are: LMON,
LMDx, LMSn, LKCx and DIAG.
Can you have many database versions in the same RAC? Yes, but
Clusterware version must be greater than the greater database version.

What was RAC previous name before it was called RAC?OPS: Oracle Parallel
Server
What RAC component is used for communication between instances?Private
Interconnect.
What is the difference between normal views and RAC views?A RAC view has
the prefix G. For example, GV$SESSION instead of V$SESSION
Which command will we use to manage (stop, start) RAC services in
command-line mode? srvctl
How many alert logs exist in a RAC environment? A- One for each instance.
What are Oracle Clusterware Components
Voting Disk Oracle RAC uses the voting disk to manage cluster
membership by way of a health check and arbitrates cluster ownership
among the instances in case of network failures. The voting disk must reside
on shared disk.
Oracle Cluster Registry (OCR) Maintains cluster configuration information
as well as configuration information about any cluster database within the
cluster. The OCR must reside on shared disk that is accessible by all of the
nodes in your cluster
How do you backup voting disk
#dd if=voting_disk_name of=backup_file_name
How do I identify the voting disk location
#crsctl query css votedisk
How do I identify the OCR file location
check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
or
#ocrcheck

I. List of Rac interview questions


You can ref Rac interview questions examples with answers as follows by links:
1. Tell me about yourself?
2. Why did you leave your last job?
3. What is your greatest weakness?

4. What kind of salary are you looking for Rac.position?


5. What experience do you have for Rac role?
6. What are new Rac techniques that you recommend for our company in 2013?
7. What do you know about our company and products?
8. What are job trainings that you attended in 2012?
9. What is your career plan for 2013 that related to Rac role?
10. What are top 3 knowledge/top 3 skills for Rac position?
11. What tertiary qualifications have you attained that related to Rac position?
12. What is the most recent skill you have learned that related to Rac position?
You can save as this post as pdf/doc file format.
Useful sources for Rac interview
1. 103 interview questions and answers (pdf Ebook free download).

II. Tips to answer Rac interview questions


1. Identify key goals, tasks, job specs and attributes for Rac then ask question: How to do, how to
become
2. List of basic things that you should prepare for a job interview.
3. During, Rac interview, you should try to listen questions carefully then ask by your self: what
are things related to Rac position before answering.
4. What are the different types of interviews and how to face them?.
5. Ref articles: 13 types of interview questions and how to face them, you can face Rac phone
interview, Rac final interview, behavioral interview (competency based interview) and second
interview
6. Always ask by yourself: What are proofs that are required for this position?
7. More useful materials for Rac interview, you can use ebook: 103 interview questions and
answers, pdf format (free download).

Data Guard : Basic Part 1

What is MRP?
Without logging to DB how will make sure logged in server is stand by server?
Can we have primary on 11g and standby on 10g?
Can we have primary on 11.1 and stand by on 11.2?
What is Data Guard ?Which BG process responsible for DG?
What is difference between Physical standby and Logical standby?
Which type of standby will you advice and why?
What is LOG gap ?
What is log shipping?
Which view you will look to check log gap ?
What is FAL_SERVER and FAL_CLIENT?
FAL_SERVER specifies the fetch archive log (FAL) server for the standby database. The
FAL_CLIENT specifies the FAL client name.
FAL_SERVER =primary and FAL_CLIENT =standby
How will you replicate (addition and deletion) OS level file system in to physical stand by?
STANDBY_FILE_MANAGEMENT=AUTO
What is active data guard duplicate?Benefits
Which parameter need to set for redo transport mode ?
The redo transport mode is set in the parameter LOG_ARCHIVE_DEST_2.
example : Maximum performance by setting ASYNC NOAFFIRM.
What is difference between physical stand by and snapshot stand by?
11 g new feature . snapshot standby allows the standby database to be opened in read-write
mode.,without compromising redo shipping.
We need to turn flashback_on in snapshot mode.
SELECT flashback_on FROM v$database;
FLASHBACK_ON
-----------------NO
ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
ALTER DATABASE OPEN;
SELECT flashback_on FROM v$database;
FLASHBACK_ON
-----------------RESTORE POINT ONLY
How many types of mode of stand by database.
There are three protection modes for the primary database
Maximum Availability
Maximum Performance (default)
Maximum Protection
What is difference between Switch over and failover
Explain how will you perform switchover and failover ?
Failover happen but I am trying to old primary to come alive after failover its not happening.
After a failover occurs, the original primary database can no longer participate in the Data
Guard configuration until it is repaired and established as a standby database in the new

configuration. To do this, you can use the Flashback Database feature to recover the failed
primary database to a point in time before the failover occurred, and then convert it into a
physical or logical standby database in the new configuration
After failover happens we need to perform REINSTATE(RE-ENABLE) the primary database.
There are two ways to Reinstate Failed Primary Database: **
1. Using Flashback
2. Without using Flashback
1. Reinstate Failed Primary Database using Flashback Prerequisites for Reinstate Failed
Primary Database:
1. Flashback Database must have been enabled on the database prior to the failover
2. There must be sufficient flashback logs on that database to flashback up to the scn when
standby becomes the primary
3. The database to be reinstated and the new primary database must have network connectivity
4. Failed primary database should be part of broker configuration (in case of using EM or
DGMGRL).
Methods to Reinstate database using Flashback:
A. Using Enterprise Manager
B. Using DGMGRL
C. Using SQL*PLUS
** Reference Oracle Metalink documents.
What is FSFO?
Fast start failover : FSFO guarantee Primary DB to failover to the PRIVIOUSLY chosen
standby target database .
If Primary is loss , borker automatically fail over to previously chosen standby DB.
Points for FSFO :
1) FastStartFailoverTarget must be configure on both site.
2)Max protection MODE cant be user for FSFO.
3)Only dgmgrl or EM can be use to configure FSFO
Explain "ORA-16661 :the standby database needs to be reinstate"?

Interview questions on RAC


What is Cache Fusion and how does this affect applications?
Cache Fusion is a new parallel database architecture for exploiting clustered computers to
achieve scalability of all types of applications. Cache Fusion is a shared cache architecture that
uses high speed low latency interconnects available today on clustered systems to maintain
database cache coherency. Database blocks are shipped across the interconnect to the node where
access to the data is needed. This is accomplished transparently to the application and users of
the system. As Cache Fusion uses at most a 3 point protocol, this means that it easily scales to
clusters with a large numbers of nodes. For more information about cache fusion see the

following links: Additional Information can be found at:


Note: 139436.1 Understanding 9i Real Application Clusters Cache Fusion

Do we have to have Oracle Database on all nodes?


Each node of a cluster that is being used for a clustered database will typically have the database
and Oracle RAC software loaded on it, but not actual datafiles (these need to be available via
shared disk). For example, if you wish to run Oracle RAC on 2 nodes of a 4-node cluster, you
would need to install the clusterware on all nodes, Oracle RAC on 2 nodes and it would only
need to be licensed on the two nodes running the Oracle RAC database. Note that using a
clustered file system, or NAS storage can provide a configuration that does not necessarily
require the Oracle binaries to be installed on all nodes.
With Oracle RAC 11g Release 2, if you are using policy managed databases, then you should
have the Oracle RAC binaries accessible on all nodes in the cluster.

How do I determine which node in the cluster is the "Master" node?


For the cluster synchronization service (CSS), the master can be found by searching
ORACLE_HOME/log/nodename/cssd/ocssd.log where it is either the Oracle HOME for the
Oracle Clusterware (this is the Grid Infrastructure home in Oracle Database 11g Release 2).
For master of a enqueue resource with Oracle RAC, you can select from v$ges_resource. There
should be a master_node column.

If my OCR and Voting Disks are in ASM, can I shutdown the ASM instance?
No. You will have to stop the Oracle Clusterware stack on the node on which you need to stop
the Oracle ASM instance. Either use "crsctl stop cluster -n node_name" or "crsctl stop crs" for
this purpose.

I have changed my spfile with alter system set parameter_name =....


scope=spfile. The spfile is on ASM storage and the database will not start.
How to recover: </p>
In $ORACLE_HOME/dbs
. oraenv &ltinstance_name&gt
sqlplus "/ as sysdba"
startup nomount
create pfile='recoversp' from spfile
/

shutdown immediate
quit
Now edit the newly created pfile to change the parameter to something sensible.
Then:
sqlplus "/ as sysdba"
startup pfile='recoversp' (or whatever you called it in step one).
create spfile='+DATA/GASM/spfileGASM.ora' from pfile='recoversp'
/
<b>N.B.The name of the spfile is in your original init(instance_name).ora so adjust to suit</b>
shutdown immediate
startup
quit

How do I use DBCA in silent mode to set up RAC and ASM?


If you already have an ASM instance/diskgroup then the following creates a RAC database on
that diskgroup (run as the Oracle user):
$ORACLE_HOME/bin/dbca -silent -createDatabase -templateName General_Purpose.dbc
-gdbName $SID -sid $SID -sysPassword $PASSWORD -systemPassword $PASSWORD
-sysmanPassword $PASSWORD -dbsnmpPassword $PASSWORD -emConfiguration LOCAL
-storageType ASM -diskGroupName $ASMGROUPNAME -datafileJarLocation
$ORACLE_HOME/assistants/dbca/templates -nodeinfo $NODE1,$NODE2 -characterset
WE8ISO8859P1 -obfuscatedPasswords false -sampleSchema false -oratabLocation /etc/oratab
The following will create a ASM instance & 1 diskgroup (run as the ASM/Oracle user)
$ORA_ASM_HOME/bin/dbca -silent -configureASM -gdbName NO -sid NO -emConfiguration
NONE -diskList $ASM_DISKS -diskGroupName $ASMGROUPNAME -nodeinfo
$NODE1,$NODE2 -obfuscatedPasswords false -oratabLocation /etc/oratab -asmSysPassword
$PASSWORD -redundancy $ASMREDUNDANCY
where ASM_DISKS = '/dev/sda1,/dev/sdb1' and ASMREDUNDANCY='NORMAL'

How does OCR mirror work? What happens if my OCR is lost/corrupt?


OCR is the Oracle Cluster Registry, it holds all the cluster related information such as instances,
services. The OCR file format is binary and starting with 10.2 it is possible to mirror it. Location
of file(s) is located in: /etc/oracle/ocr.loc in ocrconfig_loc and ocrmirrorconfig_loc variables.

Obviously if you only have one copy of the OCR and it is lost or corrupt then you must restore a
recent backup, see ocrconfig utility for details, specifically -showbackup and -restore flags. Until
a valid backup is restored the Oracle Clusterware will not startup due to the corrupt/missing
OCR file.
The interesting discussion is what happens if you have the OCR mirrored and one of the copies
gets corrupt? You would expect that everything will continue to work seemlessly. Well.. Almost..
The real answer depends on when the corruption takes place.
If the corruption happens while the Oracle Clusterware stack is up and running, then the
corruption will be tolerated and the Oracle Clusterware will continue to funtion without
interruptions. Despite the corrupt copy. DBA is advised to repair this hardware/software problem
that prevent OCR from accessing the device as soon as possible; alternatively, DBA can replace
the failed device with another healthy device using the ocrconfig utility with -replace flag.
If however the corruption happens while the Oracle Clusterware stack is down, then it will not be
possible to start it up until the failed device becomes online again or some administrative action
using ocrconfig utility with -overwrite flag is taken. When the Clusteware attempts to start you
will see messages similar to:
total id sets (1), 1st set (1669906634,1958222370), 2nd set (0,0) my votes (1), total votes (2)
2006-07-12 10:53:54.301: [OCRRAW][1210108256]proprioini:disk 0 (/dev/raw/raw1) doesn't
have enough votes (1,2)
2006-07-12 10:53:54.301: [OCRRAW][1210108256]proprseterror: Error in accessing physical
storage [26]
This is because the software can't determin which OCR copy is the valid one. In the above
example one of the OCR mirrors was lost while the Oracle Clusterware was down. There are 3
ways to fix this failure:
a) Fix whatever problem (hardware/software?) that prevent OCR from accessing the device.
b) Issue "ocrconfig -overwrite" on any one of the nodes in the cluster. This command will
overwrite the vote check built into OCR when it starts up. Basically, if OCR device is configured
with mirror, OCR assign each device with one vote. The rule is to have more than 50% of total
vote (quorum) in order to safely make sure the available devices contain the latest data. In 2-way
mirroring, the total vote count is 2 so it requires 2 votes to achieve the quorum. In the example
above there isn't enough vote to start if only one device with one vote is available. (In the earlier
example, while OCR is running when the device is down, OCR assign 2 vote to the surviving
device and that is why this surviving device now with two votes can start after the cluster is
down). See warning below
c) This method is not recommend to be performed by customers. It is possible to manually
modify ocr.loc to delete the failed device and restart the cluster. OCR won't do the vote check if
the mirror is not configured. See warning below
EXTREME CAUTION should be excersized if chosing option b or c above since data loss can
occur if the wrong file is manipulated, please contact Oracle Support for assistance before
proceeding.

What are Oracle Clusterware processes for 10g on Unix and Linux
Cluster Synchronization Services (ocssd) Manages cluster node membership and runs as the
oracle user; failure of this process results in cluster restart.

Cluster Ready Services (crsd) The crs process manages cluster resources (which could be a
database, an instance, a service, a Listener, a virtual IP (VIP) address, an application process, and
so on) based on the resource's configuration information that is stored in the OCR. This includes
start, stop, monitor and failover operations. This process runs as the root user
Event manager daemon (evmd) A background process that publishes events that crs creates.
Process Monitor Daemon (OPROCD) This process monitor the cluster and provide I/O
fencing. OPROCD performs its check, stops running, and if the wake up is beyond the expected
time, then OPROCD resets the processor and reboots the node. An OPROCD failure results in
Oracle Clusterware restarting the node. OPROCD uses the hangcheck timer on Linux platforms.
RACG (racgmain, racgimon) Extends clusterware to support Oracle-specific requirements and
complex resources. Runs server callout scripts when FAN events occur.
What are Oracle database background processes specific to RAC
LMSGlobal Cache Service Process
LMDGlobal Enqueue Service Daemon
LMONGlobal Enqueue Service Monitor
LCK0Instance Enqueue Process
To ensure that each Oracle RAC database instance obtains the block that it needs to satisfy a
query or transaction, Oracle RAC instances use two processes, the Global Cache Service (GCS)
and the Global Enqueue Service (GES). The GCS and GES maintain records of the statuses of
each data file and each cached block using a Global Resource Directory (GRD). The GRD
contents are distributed across all of the active instances.
What are Oracle Clusterware Components
Voting Disk Oracle RAC uses the voting disk to manage cluster membership by way of a
health check and arbitrates cluster ownership among the instances in case of network failures.
The voting disk must reside on shared disk.
Oracle Cluster Registry (OCR) Maintains cluster configuration information as well as
configuration information about any cluster database within the cluster. The OCR must reside on
shared disk that is accessible by all of the nodes in your cluster
How do you troubleshoot node reboot
Please check metalink ...

Note 265769.1 Troubleshooting CRS Reboots


Note.559365.1 Using Diagwait as a diagnostic to get more information for diagnosing Oracle
Clusterware Node evictions.
How do you backup the OCR
There is an automatic backup mechanism for OCR. The default location is :
$ORA_CRS_HOME\cdata\"clustername"\
To display backups :
#ocrconfig -showbackup
To restore a backup :
#ocrconfig -restore
With Oracle RAC 10g Release 2 or later, you can also use the export command:
#ocrconfig -export -s online, and use -import option to restore the contents back.
With Oracle RAC 11g Release 1, you can do a manaual backup of the OCR with the command:
# ocrconfig -manualbackup
How do you backup voting disk
#dd if=voting_disk_name of=backup_file_name
How do I identify the voting disk location
#crsctl query css votedisk
How do I identify the OCR file location
check /var/opt/oracle/ocr.loc or /etc/ocr.loc ( depends upon platform)
or
#ocrcheck
Is ssh required for normal Oracle RAC operation ?
"ssh" are not required for normal Oracle RAC operation. However "ssh" should be enabled for
Oracle RAC and patchset installation.
What is SCAN?
Single Client Access Name (SCAN) is s a new Oracle Real Application Clusters (RAC) 11g
Release 2 feature that provides a single name for clients to access an Oracle Database running in
a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in
the cluster.
Click here for more details from Oracle

What is the purpose of Private Interconnect ?


Clusterware uses the private interconnect for cluster synchronization (network heartbeat) and
daemon communication between the the clustered nodes. This communication is based on the
TCP protocol.
RAC uses the interconnect for cache fusion (UDP) and inter-process communication (TCP).
Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches of
participating nodes in the cluster.
Why do we have a Virtual IP (VIP) in Oracle RAC?
Without using VIPs or FAN, clients connected to a node that died will often wait for a TCP
timeout period (which can be up to 10 min) before getting an error. As a result, you don't really
have a good HA solution without using VIPs.
When a node fails, the VIP associated with it is automatically failed over to some other node and
new node re-arps the world indicating a new MAC address for the IP. Subsequent packets sent to
the VIP go to the new node, which will send error RST packets back to the clients. This results in
the clients getting errors immediately.
What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in AWR Report?
This is most likely due to a fault in interconnect network.
Check netstat -s
if you see "fragments dropped" or "packet reassemblies failed" , Work with your system
administrator find the fault with network.
How many nodes are supported in a RAC Database?
10g Release 2, support 100 nodes in a cluster using Oracle Clusterware, and 100 instances in a
RAC database.
Srvctl cannot start instance, I get the following error PRKP-1001 CRS-0215, however
sqlplus can start it on both nodes? How do you identify the problem?
Set the environmental variable SRVM_TRACE to true.. And start the instance with srvctl. Now
you will get detailed error stack.
What is the purpose of the ONS daemon?
The Oracle Notification Service (ONS) daemon is an daemon started by the CRS clusterware as
part of the nodeapps. There is one ons daemon started per clustered node.
The Oracle Notification Service daemon receive a subset of published clusterware events via the
local evmd and racgimon clusterware daemons and forward those events to application
subscribers and to the local listeners.
This in order to facilitate:

a. the FAN or Fast Application Notification feature or allowing applications to respond to


database state changes.
b. the 10gR2 Load Balancing Advisory, the feature that permit load balancing accross different
rac nodes dependent of the load on the different nodes. The rdbms MMON is creating an
advisory for distribution of work every 30seconds and forward it via racgimon and ONS to
listeners and applications.
What are the major RAC wait events?
In a RAC environment the buffer cache is global across all instances in the cluster and hence the
processing differs.The most common wait events related to this are gc cr request and gc buffer
busy
GC CR request :the time it takes to retrieve the data from the remote cache
Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned queries will
increase the amount of data blocks requested by an Oracle session. The more blocks requested
typically means the more often a block will need to be read from a remote instance via the
interconnect.)

1) How to check privileges granted on a particular table?


2) How to check permissions given to a particular user?
3) How to Resize a datafile?
4) How to see the Installed product details of Oracle Database?
5) Find out the tables that are ANALYZED in the Database?
6) Show all Active Users in the System?
7) How to identify what a current user is doing?
8) How will I find the Count of Tables available in the Database?

9) How will we see the available ALL INDEXES in a database?


10) Show ALL TABLES available in a database?
11) Identify the Space Used by Tablespace?
12) Identify the Space Used by Users/Schema in a database?
13) How to find the OS Version, Database Version in Unix and Windows?

14) Identify the Reads and Writes of Datafiles in a Database?


15) Identify the SEGMENTS that are getting CLOSE TO MAX_EXTENT values?
16) Identify the SEGMENTS that are getting CLOSE TO RUNNING CONTIGUOUS FREE
SPACE?
17) How will we display Archived Log Information? v$archive_dest
18) How to see the HISTORICAL ARCHIVED LOG information from a Control File?
v$archived_log
19) How to find current archived log destinations? Archive log list
20) I want to know the details of BACKUPs of ARCHIVED LOG files?
21) How to check the ALL ONLINE REDO LOG GROUPS and MEMBERS in a database?
V$log-CURRENT STATUS, v$logfile-group&member details,V$log_history-history
of logs
22) Show ALL DATAFILES of a TABLESPACE? V$datafile ts#=v$tablespace-ts# or
dba_data_files
23) How to find SCHEMA / USER SIZE in a database? Dba_segments

24) What is the Size of QOUTA allocated for a particular user/schema? Dba_ts_quotas
25) How to find TABLESPACE Usage in %, Blocks Used and Blocks Empty?
Usage%:- sum(sys.seg$.blocks)*sys.ts$.blocksize*count(distinct(sys.file$.file#))*100
Total Available:- sum(sys.file$.blocks)*t.blocksize
Total Used:- sum(sys.seg$.blocks)*sys.ts$.blocksize
Total Space Remaining:- Total Available in sys.file$.blocks minus total used in
sys.seg$
26) Display all tables in current schema along with TABLESPACE and TABLE SIZE in GB?
27) How to find ROWS spread across different TABLESPACES and DATAFILES? How
many rows are there in each DATAFILE for EACH TABLE?
28) How to Recover Data after the loss of Redo Log Files in Archive mode & NoArchiveLog
mode?
29) How to Recovering After the Loss of All Members of an Online Redo Log Group?
30) How to recover table from DROP/DELETE/TRUNCATE commands in Oracle
Database?
Flashback table rman.rman_table to before drop;
Flashback table rman.rman_table to timestamp (systimestamp interval 05 minute);
31) How to recover database when ALL DATAFILES lost in User Managed Databases?
32) How to recover DATAFILE when there is no Backup available?
33) How to Restore and Recover database to a NEW HOST using RMAN?

34) How to SKIP a Tablespace for Restore Operation in RMAN?


35) Explain about Restore and Recover database in NOARCHIVELOG Mode?
36) Explain Restore and Recovery of INDIVIDUAL TABLESPACES / DATAFILES?
37) How to Restore SPFILE from a recent Backup?
38) How to Restore an SPFILE from Older backup more than 7 days / upto specific days?
39) Explain about Restore POINT and FLASHBACK DATABASE?
40) Write a script to TRACK SPACE UTILIZATION of your Database over time?
41) Cold backup procedure and Hot Backup Procedure explanation?
42) How to check ALERT LOG in oracle 11g?
43) What will happen if Oracle unable to write ALERT LOG, CORE DUMP OR TRACE
FILES?
44) Stop ALERT NOTIFICATION for a specified period of time as when you plan to bring
downtime for the database?
45) What is Server-Generated Alerts like Threshold Alerts, Event Based Alerts?
46) How to view and change Threshold Settings for Threshold Alerts?
47) How to notify or send email Event in oracle from EM?
48) What are the mandatory Variables to be declared for LOG_ARCHIVE_FORMAT?
49) Solution for ORA-16014 ORA-00312 ORA-16038 ORA-19809: limit exceeded for
recovery files
50) Enable Archive Log Mode for RAC Database?

51) Solution for ORA-000257: Archive Error. Connect Internal Only, Until Freed?
52) Solution for ORA-16038,ORA-00354,ORA-00312 corrupt redo log block header
53) Recovering a Database in NOARCHIVELOG Mode
54) User Managed, Consistent Backup in Noarchivelog Mode
55) User Managed hot backup of oracle database
56) ORA-16018 And ORA-16019 LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n
57) How to know dependent objects/which objects are dependent under an objects
58) RMAN-03002, RMAN-06059, ORA-19625 and ORA-27037 during RMAN archivelog
backup. The problem happened because Oracle archivelog files were deleted at OS
level.
59) What happens during oracle database hot backup
60) How to perform RMAN Incremental database backup in Oracle
61) I mounted remote location jupiter:/export/home/oracle on my local server as
/export/home/oracle/remote and then I wanted to take RMAN backup on the mapped
drive but it fails with ORA-19504: and ORA-27054.
62) How to take RMAN backup on a Remote Location?
63) How to extract data from a CORRUPT table?
64) WHERE Clause Fails with ORA-01578(Data block corrupted). This problem is caused
due to a corrupted block in one or more blocks belonging to an index type of segment.
Since the corrupted block does not belong to the table, some statements could be
executed successfully if the information is retrieved via full tablescan.

65) How to handle Block Corruptions in ORACLE and How to Recover Data from Corrupted
Blocks.
66) What is the solution for Solution of ORA-600 [4194] or ORA-600 [4193]. The problem
ORA-600[4194] or ORA-600[4193] occurs when there is mismatch detected between
Redo records and rollback (Undo) records.
67) Solution for ORA-600 or Data Corruption during database shutdown of RAC instance
68) Oracle data pump import fails with ORA-39002 and ORA-39322 during importing
transport tablespaces?
69) Data pump import fails with ORA-29913 when used PARALLEL and REMAP_SCHEMA
70) Backup controlfile to trace fails with ORA-600 [2662]
71) UnixChk.sh fails with Host not found, try again
72) ORA-07445: exception encountered: core dump [dbgrmqmqpk_query_pick_key()+217
73) ORA-07445: exception encountered: core dump [ldxite()+16] [SIGBUS]
74) ORA-07445: exception encountered: core dump [nstimexp()+28] [SIGSEGV]
[ADDR:0x58] [PC:0x107D6071C] [Address not mapped to object] []
75) ORA-07445: exception encountered: core dump [osnsgl()+625] [SIGSEGV] [Invalid
permissions for mapped object] [0x000000068] [] []
76) ORA-07445 [MSQSUB()+32] When Select From V$SQL_PLAN
77) ORA-07445: exception encountered: core dump [kotgtsch()+9]
78) Database Crash With ORA-07445 [_ndoprnt()+4]. Sorry, no swap space to grow stack
for pid 6048 (oracle)

79) ORA-07445: EXCEPTION ENCOUNTERED: CORE DUMP [ASM_IO()+20]


80) ORA-27103: internal error when MEMORY_TARGET is set to greater than 3G
81) ORA-07445: exception encountered: core dump [SIGILL] [Illegal opcode]
82) ORA-07445: exception encountered: core dump slaac_int unknown signal, unknown
code
83) Drop user hangs or it returns ORA-01940. SESSION HANGS WHEN TRYING TO
DROP A USER
84) Drop user cascade takes more than 1 day. Dropping a simple user takes hour after
hours and after 1 day it is not completed yet
85) Clusterware Installation fails at the end of CRS on Red Hat Linux 5
86) Overview of Oracle Clusterware and Oracle RAC
87) ORA-00054, ORA-04022 while gathering table statistics. The following errors are
reprted when executing DBMS_STATS procedures simultaneously in order to collect
database tables statistics.
88) ORA-13503: Creating SYSAUX tablespace with invalid attributes. While creating
SYSAUX tablespace manually it fails with error ORA-13503.
89) What is an Oracle database instance? Also, showing the steps in creating an Oracle
instance?
90) What is OEM (including showing some of its contents)? Also explain its advantages.
91) What is OFA? Also, what is the reason and purpose of adopting OFA?

92) What are the usages of the control and redo log files? What kind of relationship exists
between these two types of file.
93) Based on the logic structure (table, segment, extent, & data block) discussed in the
textbook, explain how can a database table (e.g. CUSTOMER table which stores all
customer data) be split and stored within the logic structure.
94) When creating an Oracle database table, the storage settings are optional, why?
95) What is the advantage and reasoning to include storage settings when creating a new
database table?
96) What is a role? What are the advantages of creating and using roles?
97) Script to check list of inactive users or inactive sessions in a database
98) What is Dead Connection and Inactive Session and differences between them
99) What to do when we found in trace fil WAITED TOO LONG FOR A ROW CACHE
ENQUEUE LOCK!.
100)

Name the different types of Constraints

101) What are the DDL statements?


102) What are the Transaction Control (TC) statements?
103) What are the Session Control statements?
104) What are the System Control statements?
105) What are the Possible Limitations When Adding Datafiles to a Tablespace

106) While connecting to oracle database it fails with ORA-12532: TNS:invalid argument
like below.
107) It is used LDAP, sqlnet.ora entry is NAMES.DIRECTORY_PATH = (LDAP) and
Tnsping fails with TNS-03505: Failed to resolve name or TNS-12154 / ORA-12154:
TNS:could not resolve service name.
108) Troubleshoot ORA-12154 TNS-12154 TNS-03505: Failed to resolve name
109) ORA-28547 connection to server failed, probable Net8 admin Error
110) ORA-12154: TNS:could not resolve the connect identifier specified
111) How to find the User who is connected to Oracle
112) ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
113) Troubleshooting ORA-2085 "database link %s connects to %s"
114) What is Connection Pooling?
115) In RAC database alert log reports ORA-00202 ORA-17510
116) RMAN-00571, RMAN-00569, RMAN-00571, RMAN-03002, RMAN-05021
117) ORA-00205: error in identifying control file. Whenever you try to start your oracle
database instance or mount your database it fails with ORA-00205 error message
118) ORA-00600: internal error code, arguments: [2141]. While starting up or shutting down
the database it fails with oracle error message ORA-00600
119) ORA-01665: control file is not a standby control file. While recovering standby
database, using command alter database recover managed standby database
disconnect from session it fails with message ORA-01665

120) Recover database after only lose of all controlfiles. You have lost all your current
and backup of controlfile. You have avaiable your current data files. You have
available your online redo log files.
121) MAXDATAFILES , DB_FILES parameters and ORA-00059. Whenever I try to create
tablespace it fails with error message, ORA-00059
122) ORA-01667: cannot add any more tablespaces: limit of exceeded. If your database
version is higher than 8 suppose 10.2g then when MAXDATAFILES of your control file
reached then MAXDATAFILES parameter would expand automatically unless you hit
bug. You can see the post here,
New Feature of 10.2g Eliminate Control file Recreation
However if you are before 8 then while creating any tablespace and while adding a
datafile to a tablespace you may get ORA-01667: cannot add any more tablespaces:
limit of exceeded
123) What you do if all copies of your control files are lost.
124) Both Data files and Online Redo logs are in tact
125) Data files are intact but Online Redo logs are lost
126) Data files are lost but online redo logs are available
127) Both Data files and redo logs file are lost
128) File size is not a multiple of logical block size ORA-00202,ORA-27046. Whenever
you tried to start the database the database failed to mount

129) How to Restore the Controlfile from Backup. If you loss or if your all copies of control
file is corrupted and if you have backup of your control file then it is required to restore
your control file from your backup
130) New Feature of 10.2g: Eliminate Control File Re-Creation. Before Oracle 10.2g if we
need to change the limit of MAXLOGFILE, MAXLOGMEMBERS, MAXLOGHISTORY,
MAXDATAFILES, and MAXINSTANCES then the possible solutions is either RE-create
new controlfile or create a new database. But from Oracle 10.2g all sections of the
control file are now automatically extended when they run out of space. This means that
there is no longer a requirement to re-create the control file when changes in the
configuration parameter the MAXLOGFILE, MAXLOGMEMBERS, MAXLOGHISTORY,
MAXDATAFILES, and MAXINSTANCES are needed
131) kccrsz: denied expansion of controlfile section 9 by 65535 record(s). The machine did
not respond properly and in the alert log you the got the following. kccrsz: denied
expansion of controlfile section 9 by 65535 record(s) the number of records is already at
maximum value (65535).
132) ORA-01450: maximum key length (3215) exceeded. Whenever I try to rebuild index
online then it fails with message ORA-00604: error occurred at recursive SQL level 1
along with ORA-01450: maximum key length (3215) exceeded.
133) How to determine OS block size for windows or unix. In many times you probably
have heard about set the oracle db block size as a multiple of the OS block size. But
whenever you ask how I can determine or find OS block size for windows or Unix then
many one get stopped. In fact this question is OS related.

134) Overview of Extents and when extents are allocated, When Extents are de-allocated.
135) Playing with Oracle data block size. I have experiment of oracle data block size with
8k and 16K. I performed DML operation against both 8k and 16k data block size. I
created two tables table_8k under 8k tablespace tbs_8k and table_16k under 16k
tablespace tbs_16k. The summary of the experiment is bigger data block cause more
time while update but less time while insert operation.
136) Explain Row Chaining, Migrating, PCTFREE, PCTUSE, Details of Data Block Format
in Oracle
137) Advantages and Disadvantages of using smaller and bigger data blocks
138) DB_BLOCK_SIZE, DB_nK_CACHE_SIZE and BLOCKSIZE. First I want to say about
BLOCKSIZE cluase in oracle. The BLOCKSIZE cluase is used to specify the block size
for the tablespace. If you don't specify this clause while tablespace creation then
standard that is default blocksize is used which is specified by parameter
DB_BLOCK_SIZE.
139) When datafile bytes size greater than maxbytes. From dba_data_files we can check
the size of the datafile, the maximum size of the datafile it can grows if
AUTOEXTENSIBLE option is set and their status with many other fields.
140) How to find Which Options are installed on your oracle database.
141) ORA-01295: DB_ID mismatch between dictionary USE_ONLINE_CATALOG and
logfiles. While doing remote mining in the mining database through logminer
START_LOGMNR procedure fails with ORA-01295. May be you want to analysis redo
log files of the production database in the testing environment.

142) How to Resize a Datafile


143) Difference between V$parameter and v$spparameter
144) How to determine free memory and used memory in Oracle
145) Available Views for Oracle Wait Events
146) How to Create the Data Dictionary in Oracle
147) Archiving not possible: No primary destinations. Today I got a very interesting
problem. The developer told me that they can't connect to database. It says ORA00257: archiver error. Then I log on to the database and it was ok. I asked developer it
is fine. After some time developers again asked me they are having the same problem. I
then look for alert log and saw the following stack of message.
148) What is Optimizer Statistics?
149) Table, View, Tablespace Creation Script in Oracle, In order to get definitions of view,
table ,tablespace etc we can use GET_DDL function of DBMS_METADATA package.
150) How to check which option is not installed to your database.
151) ORA-01536: space quota exceeded for tablespace
152) Causes and Solution of ORA-00376: ORA-01110:, Whenever I try to access a objects
it fails with errors.
153) Troubleshooting ORA-00942: ORA-04043: ORA-00942: table or view does not exist,
ORA-04043: object %s does not exist
154) Know how many database register in Recovery Catalog Views
155) How to create recovery catalog and use it

156) Startup of RAC database fails with ORA-01105 & ORA-01677


157) Diagnosis Oracle Logical Standby Data Guard Configuration
158) Error ORA-01555 on Active Data Guard Standby Database We have active data
guard setup in our 11.2.0.1 version of Oracle database. It is upgraded to version
11.2.0.2 and now we see this ORA-1555 on the Standby Database. We can't logon to
database with system, dbsnmp or other database users. Only sys as sysdba is working.
Also we have investigated that we are running on system's undo Tablespace, - and not
the one which has been created for undo.
159) Convert a Physical Standby Database into a Snapshot Standby Database using
dgmgrl
160) Converting a Physical Standby Database into a Snapshot Standby Database
Manually
161) Creation of second standby database using RMAN DUPLICATE fails with RMAN20242
162) Prerequisites for Oracle Data Guard Broker
163) Primary DB freezed with waited too long for a row cache enqueue lock. On Oracle
database 10.2.0.3.0 Data Guard with Broker configuration whenever there is an
attempting to restart the standby in read only
164) While startup standby database it fails with ORA-01154. Whenever you try to open or
shutdown a standby database it fails with error ORA-01154
165) ORA-01665: control file is not a standby control file. While recovering standby
database, using command alter database recover managed standby database

disconnect from session it fails with message ORA-01665: control file is not a standby
control file like below.
166) Impdp fails with ORA-39002 and ORA-39322 during importing transport tablespaces
167) Data pump import fails with ORA-29913 when used PARALLEL and
REMAP_SCHEMA
168) List of possible errors that can be generated during DataPump Export job
169) UDE-00018: Data Pump client is incompatible with database version 11.01.00.07.00
170) Expdp fails with ORA-39126, ORA-06502 PL/SQL: numeric or value error: character
string buffer too small
171) Data pump export is hung /horrible slow - Bug 8467825
172) Data Pump export hang with INCLUDE=OBJECT_GRANT ORA-39029, ORA-4030
173) How to recreate or reload Datapump Utility EXPDP/IMPDP to overcome internal
corruption
174) ORA-28365: wallet is not open
175) impdp fails with ORA-39174 or ORA-39176. You have transparent data encryption
feature enabled in your database. You took your dump with expdp utility with the
ENCRYPTION_PASSWORD parameter. Now whenever you try to import your dump
without ENCRYPTION_PASSWORD parameter you will get ORA-39174 error.
176) How to export table containing encrypted columns. Let's first check whether database
has any encrypted columns or not by querying dba_encrypted_columns view

177) EXP-00107: Feature (COLUMN ENCRYPTION) of column is not supported. While


exporting encrypted table using oracle export utility it fails with EXP-00107 error and
encrypted table is not exported.
178) ORA-39097, ORA-39065, ORA-31643, ORA-19510, ORA-27045 Linux-x86_64 Error:
5. Oracle data pump export operation on 10.2.0.4 database into CIFS file system fails
with error ORA-39097, ORA-39065, ORA-31643, ORA-19510, ORA-27045 Linuxx86_64 Error: 5.
179) ORA-39029, ORA-31671, ORA-39078 received during Oracle Parallel data pump
Import. Oracle data pump import operation is working fine without PARALLEL
parameter. But whenever we specify PARALLEL parameter within the import statement
it fails with this error.
180) Data pump fails with ORA-31626: job does not exist. Data pump export jobs failed
with following errors:
181) ORA-31626 ORA-31650 while using Oracle DataPump export in RAC database.
ORA-31626: job does not exist
ORA-31650: timeout waiting for master process response
182) Restrict DDL on a Schema
183) Create Read only user for a Schema
184) Moving a Table to a New Segment or Tablespace
185) How to Export data to a flat file
186) What is the overall database sizeHow to Create and Use OMF. Enable the Creation
of OMFs

187) How to Change Database Name and DBID?


188) DBConsole does not start due to TimeZone mismatch
189) EMCA fails with ORA-06502 PL/SQL: numeric or value error: character string buffer
too small
190) EM Daemon is not running. On windows whenever I try to start my dbconsole in one
time during process it shows me message EM Daemon is not running.
191) Authentication failed!null. After upgrading the database containing dbconsole's
repository whenever you try to logon to Enterprise Manager or DBCONSOLE it succeed
but return with error
192) How to Change DB Control Http Port
193) Login to Dbconsole, Authentication failed!null Returned
194) An Stack of Problems while creating Repository using emca. In my database I tried to
create repository and stopped several times while creating repository. I spend a
significant amount of time to create repository and after analysis I got the following
195) Running EMCA Fails To Accept the DBSNMP Password. Today when I tried to create
DB Control on my computer I got an interesting problem.
196) How to Access Database using Database Control
197) How To Drop, Create And Recreate DB Control In 10g Database
198) Troubleshooting DbConsole Error - OC4J Configuration issue
199) Java.lang.Exception: IOException in sending Request. this problem will appear if you
just change the Time Zone of your system.

200) You must have CREATE TARGET privilege to perform this operation. In the Enterprise
Manager main page (connected with SYS as SYSDBA or as SYSTEM), when I click on
performance tab, it gives me following notification
201) How to get port number list of EM and isqlplus
202) In EM connection fails with ERROR: NMO not setuid-root (Unix-only). This problem is
notified on Unix system only.
Whenever you try to connect to enterprise manager after giving host username and
password as prompted it fails with message
HostPassword - Connection to host as user oracle failed: ERROR: NMO not
setuid-root (Unix-only)
203) Options for Shuting Down a Database using RMAN
204) Does oversize of datatype VARCHAR2 causes performance problem. From the
beginning of learning Oracle SQL you have possibly heard that in case of VARCHAR2
datatype it allocates space exactly what it needs. So if you allocates 4000 bytes of
VARCHAR2 data type and database needs 10 bytes only then exactly 10 bytes are
allocated
205) Curtesian Join in Execution Plan
206) How the Query Optimizer Chooses Execution Plans for Joins
207) Index Skip, Full, Fast Full Index, Index Joins Bitmap Indexes Scan
208) What and when Index Scans is used
209) What and when oracle uses Rowid Scans in execution plans

210) What and when oracle use Full Table Scans in explain plans
211) Understanding Access Paths for the Query Optimizer
212) Optimizer Operations while executing SQL statement
213) How does one prevent Oracle from using an Index?
214) How to see Explain Plan from SQL*Plus
215) Export from 11g using exp utility version 9iR2 produces corrupted dumpfile
216) List of possible errors that can be generated during DataPump Export job
217) Exporting database fails with PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must
be declared
218) UDE-00018: Data Pump client is incompatible with database version 11.01.00.07.00
219) Export fails with ORA-24324 ORA-07445: exception encountered: core dump
[ACCESS_VIOLATION]. Database export operation fails with ORA-24324 and ORA07445
220) ORA-31693 ORA-01466 Errors During Datapump Export Using Flashback
221) EXP-00008: ORA-00904: invalid column name during Export
222) Data Pump Export Fails With ORA-39125 ORA-19502 ORA-27072 Error: 11:
Resource temporarily unavailable
223) EXP-00008 ORA-37002: Oracle OLAP failed to initialize
224) Export a domain Index fails with ORA-39127 and PLS-0030

225) Expdp fails with ORA-39126, ORA-06502 PL/SQL: numeric or value error: character
string buffer too small
226) FULL Export with AUDIT enabled fails with ORA-01406: fetched column value was
truncated
227) ORA-02298 cannot enable constraint - parent keys not found
228) ORA-39173: Encrypted data has been stored unencrypted in dump file set
229) How to export table containing encrypted columns
230) EXP-00107: Feature (COLUMN ENCRYPTION) of column is not supported
231) DataPump Export (EXPDP) Client Gets UDE-8 ORA-31626 ORA-39086. Doing
Oracle data pump export operation from client side reports error UDE-00008, ORA31626, ORA-39086 and ORA-06512.
232) Export fails with ORA-01406: fetched column value was truncated. Exporting oracle
11g database using 10g exp utility fails with ORA-01406 errors
233) exp fails with EXP-00023 and expdp fails with ORA-31631, ORA-39161, It is needed
to export/import full database. To export full database, "EXPORT FULL DATABASE"
privilege is granted and to import full database "IMPORT FULL DATABASE" privilege is
granted. Now while doing full database export/import, exp fails with EXP-00023 and
expdp fails with ORA-31631: privileges are required , ORA-39161: Full database jobs
require privileges
234) ORA-38760: This database instance failed to turn on flashback database ORA-38701
ORA-27037

235) Version Query Pseudocolumns, The version query pseudocolumns are only valid for
flashback version query which are discussed on Flashback Version Query.
236) ORA-01466: unable to read data - table definition has changed, Whenever you tried to
flashback of a table immediately after creating table and inserting data into it, or you
tried to flashback of the table to a time or to a SCN before creating it then flashback
table or flashback query fails with error message,
237) ORA-08189: cannot flashback row movement is not enabled, Whenever I tried to
Flashback Table feature of oracle the following error occurs.
238) Can you use flashback database if a period of noarchivelog exists,
239) Flashback ON fails with ORA-38706 and ORA-38714, Whenever you tried to enable
your database flashback feature it failed with errors.
240) How to get back dropped Tablespace using Flashback Database, It needs to
remember that if you drop your tablespace with including datafiles option then it is not
possible to get your tablespace back with flashback database. While dropping if you use
DROP TABLESPACE INCLUDING CONTENTS option then it is possible to get back
tablespace.
241) How to restore the old data using flashback query, My intention is , I want to get back
past data of database after erroneously updated and committed.
242) Limitation of Flashback Database, The Flashback Database allows you to get back
the entire database to a specific point-in-time
243) Flashback Database To The Right of Open Resetlogs, In some cases, you may need
to return the database to a point in time in the parent incarnation, later than the SCN of

the OPEN RESETLOGS at which the current incarnation path branched from the old
incarnation.
244) Flashback Database to Undo an OPEN RESETLOGS, Suppose you have opened
your database with OPEN RESETLOGS option after performing flashback feature. And
after that you have made unwanted changes in your database.
245) Performing Flashback Database, Before going any production upgrade to database
we can make a guaranteed restore point to database and if any wrong then we can get
back to the restore point state. Guaranteed restore point always ensure that we can get
back data to our restore point creation time.
246) ORA-00439: feature not enabled: Flashback Database, While trying to enable
flashback feature the error comes.
247) Restore Point and Flashback Database. Flashback database enables us to get back
our database to a prior time
248) How to Enable Flashback Database, To enable flashback database the following
operations is needed
249) Flashback Table and Flashback Drop, The FLASHBACK TABLE statement enables
users to get a table to a previous point in time. It provides a fast, online solution to get
back a table that has been accidentally modified or deleted by a user or application. It
eliminates the DBA to perform more complicated point in time recovery operations.
250) Numeric REMAINDER ROUND SIGN SIN SINH SQRT TAN TANH TRUNC function
251) Numeric EXP FLOOR LN LOG MOD NANVL POWER functions
252) Numeric ABS ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSH functions

253) List of Object Reference and Model functions


254) List of Analytic functions in oracle
255) List of Aggregate functions in Oracle
256) List of Single row functions in Oracle
257) Types of SQL function in Oracle
258) ORA-01843: not a valid month,
259) CSSCAN fails with ORA-00600, CSS-00152, CSS-00120, While running csscan it
fails with error message ORA-600, CSS-00152: failed to enumerate all tables and CSS00120 as below
260) CSSCAN fails with error while loading shared libraries: libclntsh.so.10.1, While
running csscan in order to check all character data in the database and tests for the
effects and problems of changing the character set, it fails with error while loading
shared libraries: libclntsh.so.10.1: cannot open shared object file as below
261) How to run csscan in the background as a sysdba
262) What is NLS_LANG environmental variable? Different ways to set up NLS parameters
263) How to know whether there is N-type columns on database, Which datatypes use
the National Character Set?
264) ORA-39014 ORA-39029 ORA-31672 One or more workers have prematurely exited,
Whenever you tried to import data into the database it failed with error as below
265) How to Import data without Dumpfile-Network Mode Import, It is possible to import
data in a database without the dump file. From network the data will be retrieved from

one database and then import that data back to the target database. There are no dump
files involved.
266) Import Oracle Data from Anywhere, Suppose, I have server machine named
"NEPTUNE". In the server machine under /oradata2 directory there is a dump file
named net.dmp. However to run import operation we need not connect to server
"NEPTUNE" and then perform import operation. From any machine which have data
pump import client can do the operation.
267) Original Export and Import Versus Data Pump Export and Import
268) Verify Physical Data Structure in Oracle
269) Extract DDL from Dump/ Read contents of dumpfile
270) How does one use the import/export utilities?
271) Export and Import from Enterprise Manager
272) How does one prevent Oracle from using an Index?
273) Troubleshoot unusable Index in Oracle
274) How to determine the name of the trace file to be generated
275) ORA-32010: cannot find entry to delete in SPFILE
276) How to avoid of recreating pfile or spfile if any error in spfile
277) What is REMOTE_LOGIN_PASSWORDFILE?
278) What is O7_DICTIONARY_ACCESSIBILITY and effect of it
279) Using ALTER SYSTEM to Change Initialization Parameter Values

280) Change NLS_DATE_FORMAT Parmanently


281) How to Start your database with non default spfile
282) How to know My Database Start with Spfile/Pfile?
283) ORA-07283/ORA-32004: obsolete and/or deprecated parameter(s) specified
284) Check whether required packages are installed on Red Hat Linux to install Oracle
11gR2
285) Running catqm.sql generates ORA-04098 Trigger
'SYS.XDB_INSTALLATION_TRIGGER' is Invalid
286) How to Deinstall and Reinstall XML Database (XDB) in Oracle 9.2 and 10.2
287) OUI-11108 error during OUI OS package requirements check
288) Relink Fails On Target "Client_sharedlib" During Install Of Interim Patch Or CPU
Patch
289) How to install Oracle 10g on windows vista or windows 7
290) How to uninstall Oracle 11g , Uninstall Oracle software 11.2g
291) Oracle Installation fails with OUI-10133: Invalid staging area
292) How to Identify OS or Oracle 64 bit or 32 bit on Unix
293) How to configure(modify,see) Kernel Parameters in Linux
294) Exception java.lang.UnsatisfiedLinkError libXp.so.6: cannot open shared object file
295) Resolve of DIM-00019: create service error
296) Hidden Parameters in Oracle. How to Change Hidden Parameter

297) How to discover DBID


298) How undo Space Allocation Works
299) Example of Antijoin, Semijoin, Curtesian Product,Self join
300) Difference between join, Inner join,Equijoin and Natural Join
301) Process and Runtime Limits, Logical Database Limits in Oracle
302) Physical Database Limits in oracle
303) LONG Datatype and its restriction in Oracle
304) Feature and Restriction of Temporary Table
305) Purpose and Restriction of Recover Command in Oracle
306) Limitations of Tablespace point-in-time Recovery
307) ORA-19566: exceeded limit of 0 corrupt blocks for file, While I am taking a database
backup it halt with returning an error,
308) How to display the number of processors in Linux
309) How to disable SELinux, Before going to directly disabling SELinux let's have an idea
about what SELinux is. SELinux indicates Security Enhanced Linux which is a security
patch applied to Linux kernel. When it is enabled in the kernel it follows some principle
of least privilege. It is an implementation of mandatory access control using Linux
Security Modules.
310) Check whether required packages are installed on Red Hat Linux to install Oracle
11gR2

311) Find command in Linux


312) While startup listener it fails with HPUX Error: 29: Illegal seek, While issuing "lsnrctl
start" command on HP-UX it fails with HPUX Error: 29: Illegal seek error like below
313) TNS-01169: The listener has not recognized the password, The TNS-01169 error
occurred because security feature is enabled for listener i.e password is set in
listener.ora file but lsnrctl command is issued without proper authentication
314) How to set oracle listener password
315) ORA-12518: TNS:listener could not hand off client connection
316) The listener supports no services, Whenever I issue lsnrctl status command it says
"The listener supports no services" and no one from outside could not connect to
database through listener
317) Listener Hangs, Child listener process remains persistence, Some days ago in our
database server we got a problem regarding listener issue. Our TNS Listener hangs.
Below is the problem symtompts.
318) ORA-12541: TNS:no listener, For newbie users they found ORA-12541 and search
here and there to solve the problem. But it is one word about the error which it says no
listener and think next what to do. Never mix this error with another error like ORA12514: which are different and mutually exclusive.
319) ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor, I will try to show how efficiently we can avoid error ORA-12514. My
suggestion is whenever you get this error forget about tnsnames.ora and other stuff
related to it. Start fixing problem step by step.

320) How to Enable Listener Logging and Tracing, I will try to show two different ways to
enable logging and tracing of listener.ora file. These logging and tracing helps you to
identify the network problems and troubleshooting connection problems in oracle.It also
help to identify when a client is connected to oracle database.
321) RMAN login fails with ORA-12638, RMAN login to the target database fails with the
following errors
322) CONFIG: Error uploading configuration data to the repository while, While configuring
dbconsole it fails with error message
oracle.sysman.emdrep.config.ConfigurationException: FATAL Configuration Exceptions.
323) What is Tnsnames.ora and sample Tnsnames.ora in Oracle
324) Service Names Using LDAP Fails With TNS-03505 and ORA-12154
325) Troubleshoot ORA-12154 TNS-12154 TNS-03505: Failed to resolve name
326) ORA-12641: Authentication service failed to initialize
327) CONFIG: Error uploading configuration data to the repository while
328) How to Check Your IP Address in Windows and Unix
329) Who is connected to your windows machine using which port
330) How to Monitor traffic between nodes, With the command netstat -i we can monitor
the traffic in the network nodes. The sample output of netstat -i is below
331) Types of Operators in Orace? Concatenation, Arthimetic, User-Defined, Hierarchial,
Set Operators?
332) Automatic startup and shutdown oracle on linux

333) Null value Concept in Oracle


334) Schema Object Naming Rules
335) Database Objects in Oracle, If we look for database objects in oracle then there
comes two types of objects, one is schema objects that are associated with a particular
schema or in other word they are owned by a database user. And the other is
nonschema Objects that are not reside in a particular schema
336) How to Rename a User Through Oracle, There is nothing straight forward command
in oracle to rename a user. You have to do it through several steps. In following I have
shown it.
337) Required users and groups while installing oracle, Drop Table Command, Default
Tablespace in Oracle
338) About Opening database with the RESETLOGS Option
339) Working an object that resides on multiple datafile, An object can span in multiple
datafiles within a single tablespace. In this case if I make one datafile offline then the
contents within that datafile will be affected, other datafile is online and can be possible
to query which may return rows with errors. To illustarte this scenario I will make two
datafiles inside a tablespace.
340) Use SELECT ANY DICTIONARY or SELECT_CATALOG_ROLE or SELECT ANY
TABLE
341) About Oracle Certifications of 10g
342) Requirements of Tablespace Point-in-time Recovery

343) User Managed Restore Operation in oracle Loss datafile loss controlfile loss spfile
344) Requirements for Using Guaranteed Restore Points
345) How to find swap, RAM and OS version on Unix AIX,HP-UX,Linux,Mac OS
X,Solaris,Tru64
346) How to check or identify which process is listening to port 80 in windows
347) How to know process ID or PID on windows
348) Different ways to open Office .docx documents
349) RMAN-06172: no autobackup found, While performing disaster recovery I get the
error RMAN-06172 as below
350) How to get Oracle Error Message from Database or OS
351) OUI-10020: A write lock cannot be obtained
352) Installing Clusterware through OUI fails Cheking OS version in RHL-5
353) Oracle UTL_FILE package practice examples
354) Online Redefinition fails with ORA-23540: Redefinition not defined or initiated, While
doing online redefinition on a table dbms_redefinition.copy_table_dependents fails with
error ORA-23540
355) How to know whether I use analyze or DBMS_STATS
356) ORA-31605 returned from LpxXSLResetAllVars in routine kuxslResetParams
357) ORA-39212: installation error: XSL stylesheets not loaded correctly
358) How to use Oracle Logminer to analysis Logfile

359) ORA-25153: Temporary Tablespace is Empty, Whenever you try to access temporary
tablespace it fails with error ORA-25153. Suppose I want to get the user creation script
of user ARJU but it fails with following message
360) Logminer fails with ORA-01284, ORA-00308, ORA-27047, Whenever you try to run
the logminer in the mining database (different from source database. Source database
is one in which redo or archived redo logs are generated and mining database is one in
which you try to analysis those logs) to add logfile using
DBMS_LOGMNR.ADD_LOGFILE it generates error ORA-01284, ORA-00308, ORA27047
361) How to Insert Blob data(image, video) into oracle BLOB size
362) How to get SCN from database. Timestamp against SCN
363) Switch From DBMS_JOB to DBMS_SCHEDULAR
364) How to resolve ORA-4030 errors on UNIX
365) How to monitor alert log file in Oracle
366) ORA-00019: maximum number of session licenses exceeded
367) ORA-00018, ORA-00020 maximum number of sessions exceeded
368) Database Startup fails with error ORA-16038,ORA-19809, ORA-00312
369) ORA-1000 Maximum Number of Cursors Exceeded
370) Parameters that control the behavior of Query Optimizer
371) Parameters that enable and control Query Optimizer Features
372) Use of Dynamic Sampling while estimating Statistics

373) About STATISTICS_LEVEL parameter in Oracle


374) Example of global partitioned, global non-partitioned and local Indexes
375) How to avoid rebuild of indexes if DDL performed on partitioned table
376) ORA-14120: incompletely specified partition bound for a DATE column
377) Partitioning in Oracle- How to do partition
378) java.util.zip.ZipException: reading zip file central directory failed, While applying
opatch, from the front end I see following message.
379) OPatch failed with error code = 1 java.lang.UnsupportedClassVersionError
380) OPatch supported patch methods in RAC environment
381) SEVERE:OUI-67073: Apply Session failed: ApplySession::processLocal() failed in
system
382) SEVERE: OUI-67073: ApplySession failed: Patch ID is null.
383) UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed
384) OPatch failed with error code 74 - CheckActiveFilesAndExecutables failed
385) How to Download Patchset or Opatch from metalink
386) How To Check if Asynchronous I/O is Working On Linux
387) How to check long running operations in Oracle
388) LRM-00123: invalid character 0 found in the input file
389) ORA-17510: Attempt to do i/o beyond file size ORA-00600
kmgs_parameter_update_timeout_1

390) Recover database Issue after missing spfile or pfile


391) How to know database initialization parameter in oracle
392) Rules to Specify values in an initialization parameter
393) Startup fails with oracle error ORA-00119, ORA-00132
394) Startup fails with ORA-27102: out of memory Solaris-AMD64 Error
395) Types of Initialization Parameters in Oracle
396) Troubleshoot ORA-06512: at line, ORA-06512 is a common error faced by Oracle
DBA, programmers as well as end users. ORA-06512 does not identify the root cause
of the problem, rather it only prints the line number where the errors or exception
happened. So just before ORA-06512 there will be additional error which we may need
to investigate. If the errors come from any function or package or package body or
procedure then with ORA-06512 there exists the name of the function or package or
package body or procedure as well as the line number of those objects where error is
occurred.
397) Database design practice for a Movie Company
398) ORA-28003, ORA-20002 while changing user password,
399) ORA-28000: the account is locked
400) User Resource Limits in Oracle

401) How to clone database on the same host with different name
402) How to recover or recreate temporary tablespace in 10g
403) Restore operation fails with RMAN-11003 ORA-01511 ORA-01516, I am performing
disaster recovery operation. The new host path are different than from original host. So
for the datafile I used SET NEWNAME .. clause. And for the online redo log file I used
SQL "ALTER DATABASE RENAME FILE .. " clause to rename the online logfiles to a
valid location on to a new host. I have already ran the restore srcipt in previous but it
fails to rename third online redo logfiles due to invalid location. And after fixing location
whenever I ran the script again it fails with serveral RMAN and Oracle error
404) Recover database after missing online redo logs and all controlfiles
405) How to restore an Spfile from autobackup older than 7 days
406) Crash Recovery Fails With ORA-27067, After performing shutdown abort whenever I
try to start my database it fails to perform crash recovery. Below is from alert log.
407) Allow Recovery to Corrupt Blocks, Whenever during recovery database finds corrupt
block then recovery will automatically stops. In order to do recovery with skipping
corrupt blocks run the RECOVER command with the ALLOW n CORRUPTION clause,
where n is the number of allowable corrupt blocks.
408) Recovering Through an Added Datafile with a Backup Control File, If database
recovery with a backup control file rolls forward through a CREATE TABLESPACE or an

ALTER TABLESPACE ADD DATAFILE operation, then the database stops recovery
when applying the redo record for the added files and lets you confirm the filenames.
409) ORA-01547,ORA-01194,ORA-01589 During Recovery,
410) Media recovery can be used to recover from a lost or damaged current datafile,
SPFILE or control file
411) Causes and Solutions on ORA-1113 Error File Needs Media Recovery
412) ORA-16086: Redo data cannot be written to the standby redo log
413) ORA-01624: log needed for crash recovery
414) Database Startup fails with error ORA-16038,ORA-19809, ORA-00312
415) ORA-00354 ORA-00353 ORA-00312 Corrupt redo block header
416) ORA-00313: open failed for members of log group
417) ORA-16038,ORA-00354,ORA-00312 corrupt redo log block header
418) ORA-3135: connection lost contact during RMAN backup
419) RMAN backup Fails with ORA-19510 and ORA-27046
420) ORA-19510, ORA-27044 HP-UX Error: 2: No such file or directory
421) RMAN-03002, RMAN-06059, ORA-19625 and ORA-27037 during RMAN archivelog
backup
422) Creation of second standby database using RMAN DUPLICATE fails with RMAN20242
423) RMAN duplicate fails with RMAN-10006, ORA-03113, ORA-01092

424) RMAN duplicate database fails with RMAN-00601, RMAN-10006, ORA-00704, ORA39700
425) crosscheck archivelog fails with validation failed for archived log
426) About RMAN Compatibility Matrix
427) RMAN-06900 RMAN-06901 ORA-19921: maximum number of 64 rows exceeded
428) ORA-00204 ORA-00202 ORA-27071 HP-UX Error: 9: Bad file number
429) File Deletion Policy from Flash Recovery Area (FRA)
430) RMAN-06091 no channel allocated for maintenance (of an appropriate type)
431) RMAN-06429: TARGET database is not compatible with this version of RMAN
432) How to take RMAN backup on a remote disk/ location
433) RMAN-00554,RMAN-04005,ORA-0103 when remote connection by rman
434) Set Date format inside RMAN environment
435) How to get description of all tables in database
436) Script to Check Schemas with Stale Statistics, This script is an automated way to deal
with stale statistics operations that are required to be done as part of manual upgrade
OR when reported by DBUA
437) Script to check details database growth per month
438) A complete RMAN shell script backup for Oracle 8i, 9i, 10g, 11g
439) Script to report used space in database tablespaces
440) Script to report free space and fragmentation in tablespaces

441) Script to calculate average row size for all tables in a schema
442) Script to delete duplicate rows from a table based on column values
443) Script to list of users and roles having privileges on a table
444) List of Privileges in Oracle
445) Password Policy Management in Oracle 10g and 11g
446) ORA-01031 while connecting as sysdba from remote machine, Connect / AS SYSDBA
fails with ORA-01031 on HP-UX Itanium
447) ORA-1031 insufficient privileges during OS and password file authentication
448) RMAN login fails with ORA-12638
449) ORA-28008: invalid old password, We have a 2 node RAC database. We wanted to
change our database password. As it is 2 node Oracle RAC so in the first node I
changed the password.
450) How to setup Oracle Transparent Data Encryption (TDE)
451) How to install whmautopilot software for your domain
452) ORA-01012: not logged on, No other user can connect to database. Whenever user
with sysdba privilege try to login to database it shows connected but it does not allow to
happen any query to database instead it fails with ORA-01012: not logged on as below
453) How to determine the software version of the database and the Data Pump client
454) How to determine database compatibility level
455) ORA-02082: a loopback database link must have a connection qualifier

456) ORA-00845: MEMORY_TARGET not supported on this system


457) How to make global read only user
458) Implicitly Assigned temp tablespace changes after database default tablespace
change
459) All Purge commands in Oracle -Delete an object permanently
460) Drop Temporary Tablespace Hangs
461) Relationship between Transaction and Undo Segments.
462) Managing Archive Destination LOG_ARCHIVE_DEST, LOG_ARCHIVE_DEST_n
463) Relocate Datafiles in Oracle Database, Rename/relocate datafiles operation vary
based on the log mode of the database. Database may be in archival mode or
noarchive mode.
464) ORA-01940: Cannot drop a user that is currently connected
465) How to check whether it is binary or ascii file in Linux
466) List of Operators in Linux Shell Script
467) List of comparison made by test operator in shell script
468) Control Characters in Linux and shell script
469) How to share and Access file on Solaris machine
470) On Solaris putty login fails with Using keyboard-interactive authentication
471) X11 connection rejected because of wrong authentication
472) Running Runinstaller fails with DISPLAY not set

473) Startup fails with ORA-27102: out of memory Solaris-AMD64 Error


474) ORA-27123 unable to attach to shared memory segment
475) Swap Space in Solaris
476) OMF, init.ora Parameter files, Startup, Shutdown Exercises
477) While startup ORA-27046: file size is not a multiple of logical block size
478) Recover database Issue after missing spfile or pfile
479) How to restore an Spfile from autobackup older than 7 days
480) How to know database initialization parameter in oracle
481) About STATISTICS_LEVEL parameter in Oracle
482) Rules to Specify values in an initialization parameter
483) Drop user cascade takes more than 1 day
484) ORA-29857: domain indexes and/or secondary objects exist in the tablespace
485) Script to report used space in database tablespaces
486) Script to calculate average row size for all tables in a schema
487) Script to delete duplicate rows from a table based on column values
488) Script to list of users and roles having privileges on a table
489) ORA-00600: internal error code, arguments: [15264]
490) Script to check list of inactive users or inactive sessions in a database
491) SQL*Plus shows error SP2-0575 use of Oracle sql feature not in sql92 entry level

492) ORA-04043 on DBA_* Views if they are described while database is mount stage
493) Non-Oracle user hits SP2-0642 or SP2-1503/SP2-152 after DST patch
494) After 11.2g new installation invoking sqlplus fails with SP2-1503 SP2-0152
495) SP2-0734: unknown command beginning rest of line ignored
496) Understanding Execution Plan Statistics
497) Controlling the Autotrace Report in sql*plus
498) Communicate with the user through Accept and Prompt in Sql*plus
499) Working with Sql*plus Scripts
500) Error 45 initializing SQL*Plus Internal error
501) How to see Explain Plan from SQL*Plus
502) LRM-00123: invalid character 0 found in the input file
503) Oracle is extremely buggy database - ORA-00600 [3020]
504) ORA-12709: error while loading create database character set
505) ORA-29760: instance_number parameter not specified
506) Database startup fails with ORA-00064
507) startup migrate fails with ORA-00064 while upgrading to 10.2.0.2 with DBUA
508) ORA-01102: cannot mount database in EXCLUSIVE mode
509) ORA-27100: shared memory realm already exists, when you try to startup your
database instance even you issue startup nomount ORA-27100 is reported.
510) ORA-01033: ORACLE initialization or shutdown in progress

511) Database startup fails with ORA-27302: failure occurred at: sskgpsemsper
512) Database Startup fails with ORA-00444, ORA-07446
513) Startup fails with ORA-01261: Parameter db_recovery_file_dest destination string
cannot be translated
514) RMAN-04014: startup failed: ORA-07446: sdnfy: bad value
515) ORA-12906 cannot drop default temporary tablespace
516) How to move LOB data to another tablespace
517) ORA-12906 cannot drop default temporary tablespace
518) How to recover or recreate temporary tablespace in 10g
519) Possible Limitations When Adding Datafiles to a Tablespace
520) ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping
tablespace
521) ORA-25153: Temporary Tablespace is Empty
522) Benefits and Considerations of Using Bigfile tablespaces
523) ORA-01536: space quota exceeded for tablespace
524) ORA-30041: Cannot grant quota on the tablespace
525) Free space in Temporary Tablespace
526) ORA-01650,ORA-01652,ORA-01653,ORA-01654,ORA-01688 Unable to Extend
527) ORA-01110 ORA-01187: cannot read from file because it failed verification tests
528) How to recover or recreate temporary tablespace in 10g

529) Feature and Restriction of Temporary Table


530) The operation that require sort area or Temporary Tablespace
531) Information about Temporary Segments
532) ORA-12162: TNS:net service name is incorrectly specified
533) Troubleshoot TNS-12535 or ORA-12535 or ORA-12170 Errors
534) Troubleshoot ORA-12547: TNS: lost contact
535) In 10g listener log WARNING: Subscription for node down event still pending
536) ORA-12557: TNS:protocol adapter not loadable
537) After changing Database name startup fails with ORA-01103: database name in
controlfile
538) How to make INVALID OLAP Catalog VALID
539) $_GET request does not show expected result but forwarded to homepage
540) ORA-39029, ORA-31671, ORA-39078 received during Oracle Parallel data pump
Import
541) UDE-00008, ORA-39078, ORA-25205, ORA-06512 during Oracle data pump export
542) ORA-32018: parameter cannot be modified in memory on another instance
543) DIM-04503: Message 4503 not found
544) ORA-12709: error while loading create database character set
545) ORA-28056: Writing audit records to Windows Event Log failed
546) General Solutions of ORA-12547: TNS: lost contact

547) EXP-00008, ORA-04063, ORA-06508, EXP-00083 PL/SQL: could not find program
unit
548) Check whether required packages are installed on Red Hat Linux to install Oracle
11gR2
549) Prerequisites for Oracle Database Installation on Linux x86
550) How to find swap, RAM and OS version on Unix AIX,HP-UX,Linux,Mac OS
X,Solaris,Tru64
551) How to determine kernel parameters on AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64
552) Summary of Less command in Unix/Linux
553) ORA-01295: DB_ID mismatch between dictionary USE_ONLINE_CATALOG and
logfiles
554) How to generate External Table from sql loader
555) How to load data using external table into oracle database
556) Logminer fails with ORA-01284, ORA-00308, ORA-27047
557) How to Load or copy data from SQL Server or excel to Oracle
558) LRM-00116: ORA-39001 ORA-39071 ORA-00907 in impdp
559) Import Oracle Data from Anywhere.
560) Original Export and Import Versus Data Pump Export and Import
561) Verify Physical Data Structure in Oracle.
562) How does one use the import/export utilities?

563) Export and Import from Enterprise Manager


564) DIM-04503: Message 4503 not found
565) Turn off Fn key - weird behavior of keyboard
566) Huge number of oracle processes and oracle is not releasing process
567) How to open an odt file
568) How to delete duplicate rows from a excel file
569) How to know process ID or PID on windows
570) How to check or identify which process is listening to port 80 in windows
571) Automatic startup issues of oracle database on windows
572) How to get GUI from windows to linux/Unix computer
573) Copy files between Unix and Windows with rcp
574) Who is connected to your windows machine using which port
575) How to start services from command prompt on windows
576) ORA-00054: resource busy and acquire with NOWAIT specified
How do you increase the performance of %LIKE operator?

The % placed after he search word can enable the use of index if one is specified in the index
column. This performs better than the other two ways of using % - before the search word OR
before and after the search word.............
Read answer
What is the purpose of configuring more than one Database Writer Processes(DBWn)? How
many should be used? (On UNIX)
Assume you work in an xyz company as senior DBA and on your absence your back up DBA has
corrupted all the control files while working with the ALTER DATABASE BACKUP
CONTROLFILE command. What do you do?

Can we perform hot backup without being in archive log mode, can you recover in the event of a
failure? Why or why not?
How can we find how many users are currently logged into the database and their respective
operating system id?
Can we reduce the space of TEMP datafile? How?
What is a standby database? Difference between Physical and logical standby databases.

A standby database is a backup database that can be promoted should the primary fail.
A physical standby database is created from an existing other database. This other database will
then be the primary database...............
Read answer
What is Cache Fusion Technology?

Cache fusion treats multiple buffer caches as one joint global cache.This solves the issues like
data consistency internally, without any impact on the application code or design..............
Read answer
What is simple replication and advance replication?

Replication is the process of creating and maintaining replicas of database objects in a distributed
database system..............
Read answer
How are the indexes updated?

Whenever a table partition is modified using a DDL command, the associated index partitions
are placed in the default tablespace or in the same tablespace as the data segments. This has been
an issue with the previous releases of the Oracle databases..............
Read answer
Latches vs Enqueues

Enqueues permit several concurrent processes to have varying degree of sharing of resources.
Any object which can be concurrently used, can be protected with enqueues. The enqueue is
obtained using an OS.............
Read answer
Explain the difference between a hot backup and a cold backup.

A cold backup is done when there is no user activity going on with the system. Also called as
offline backup, is taken when the database is not running and no users are logged in. all files of
the database are copied and no changes during the copy are made...............
Read answer
How many memory layers are in the oracle shared pool? Explain them

Oracles shared pool consists of two layers namely, Library cache and Data dictionary cache.

Library cache: This layer has information about SQL statements that were parsed, information
about cursors and any plan data...............
Read answer
What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is
involved in tuning it?

When the cache client like a CPU, web browser etc finds a successful entry in the cache memory,
it is called as a cache hit..............
Read answer
Explain the concept of the DUAL table.

On installing Oracle database, DUAL table Is present by default. It is a special table with just one
row. It has a single column called DUMMY. The data type of this column in VARCHAR2(1). It
has a value X..............
Read answer
What are the ways tablespaces can be managed and how do they differ?

Objects can be assigned to a table space. The related objects can be then grouped together. Table
space can also be managed using extents. Extents consist of a specific number of contiguous data
blocks..............
Read answer
Explain what are Oracle Catalog and Oracle Archive log?

Oracle catalog contains tables and views to get information about the database. It helps user to
understand the available tables, attributes, constraints etc..............
Read answer
What are PCT Free and PCT Used? What is PCT increase parameter in segment?

PCTFREE is a parameter used to find how much space should be left in a database block for
future updates. This means that if the PCTFREE = 20, new rows will be added in the block until
it is 80% full..............
Read answer
What is dump destination? What are bdump, cdump and udump?

Trace files for Oracle processes are stored in dump destination.


Bdump- Oracle writes to the trace log and creates trace files for background processes in
background dump destination. If this directory becomes full and more files cannot be written,
debugging becomes difficult...............
Read answer
What is the difference between Cloning and Standby databases?

The clone database is a copy of the database which can be opened in read write mode. It is
treated as a separate copy of the database that is functionally completely separate. The standby

database is a copy of the production database used for disaster protection..............


Read answer
Why use materialized view instead of a table?

Materialized views are basically used to increase query performance since it contains results of a
query..............
Read answer
Why and how the deadlock situation arises?

A deadlock situation arises when two or more users wait for the same resource locked by one
anther or two or more processes wait to update rows which are locked by other
processes..............
Read answer

What is the purpose of configuring more than one Database Writer


Processes(DBWn)? How many should be used? (On UNIX)
-DBWn processes are responsible for writing modified buffers(Dirty buffers) in Database Buffer
Cache to data files(Physical files) on disk, thus managing the buffer cache so that user process
can always find free buffers.
-Default is to have one DBWn process, but multiple DBWn processes are used in case of larger
databases to efficiently frree the buffer cache to make iit available to user processes.
-We can configure additional processes (DBW1 through DBW9 and DBWa through DBWj) to
improve write performance if our system modifies data heavily.
-The initialization parameter DB_WRITER_PROCESSES specifies the number of DBWn
processes upto a maximum number of 20.
-If the Unix system being used is capable of asynchronous input/output processing then only one
DBWn process is enough, if not the case the total DBWn processes required will be twice the
number of disks used by oracle,and this can be set with DB_WRITER_PROCESSES
initialaization parameter.

Assume you work in an xyz company as senior DBA and on your absence your
back up DBA has corrupted all the control files while working with the ALTER
DATABASE BACKUP CONTROLFILE command. What do you do?
-As long as all data files are safe and on a successful completion of BACKUP control file
command by your Back up DBA you are in safe zone.
-We can restore the control file by performing following commands
1) CONNECT INTERNAL STARTUP MOUNT
2) TAKE ANY OFFLINE TABLESPACE (Read-only)
3) ALTER DATABASE DATAFILE (OFFLINE)
4) RECOVER DATABASE USING BACKUP CONTROL FILE
5) ALTER DATABASE OPEN RESETLOGS

6) BRING READ ONLY TABLE SPACE BACK ONLINE


-Shutdown and back up the system. then restart.
-Then give the command ALTER DATABSE BACKUP CONTROL FILE TO TRACE
-This output can be used for control file recovery as well.
-If control file bacup is not available,then the following will be required
1) CONNECT INTERNAL STARTUP NOMOUNT
2) CREATE CONTROL FILE .....;
-But we need to know all of the datafiles,logfiles, and settings of
MAXLOGFILES,MAXLOGMEMBERS,MAXLOGHISTORY,MAXDATAFILES for the
database to use the command.

Can we perform hot backup without being in archive log mode, can you recover
in the event of a failure? Why or why not?
-Basic is Archive log mode is essential for production databases where the loss of transaction is
fatal,it is unnecessary in development and test environments.
-Main reason of Archive log mode is 24/7 availability and guarantees complete data
recoverability
-As hot backups are done online it is necessary to enable archive log mode before one can start to
use on-line database backups.
-So, you cant use hot backup without being in archivelog mode, so we couldnt recover.

How can we find how many users are currently logged into the database and
their respective operating system id?
-We can look at the v$session or v$process views
-We can also check current user logins parameter in the v$sysstat view.
-Or through Unix command ps ef | grep oracle | wc I ?
The above command works only for single instance database.

Can we reduce the space of TEMP datafile? How?


-Yes, we can reduce the space of the TEMP datafile.
-Prior to oracle 11g,,you had to recreate the datafile.
-In oracle 11g you reduce space of TEMP datfile by shrinking the TEMP tablespace.It is a new
feature to 11g.
-The dynamic performance view can be very useful in determining which table space to shrink.
Also read
Oracle tablespaces

A table space can be considered as a storage location where the database objects are kept...........
Oracle system privilege

A system privilege is the right to perform an action on any schema objects of a particular
type.............
Oracle Security

Explain the security features in Oracle, What are roles? How can we implement roles?, What is
user Account in Oracle database?, What is a trace file and how is it created?, What are
Tablespace Quota and default tablespace?............
Oracle optimizer

Explain how oracle optimizer works, Describe optimization methods, i.e. cost-based approach
and role-based optimization..........
Explain how to prevent tablespace fragmentation in oracle.

Tablespace fragmentation can be prevented by using PCTINCREASE command.


PCTINCREASE is the percentage a new subsequent extent will grow..............
Oracle database tuning

Automatic Performance Diagnostic and Tuning Features, Automatic Shared Memory


Management - Automatic Shared Memory Management puts Oracle in control of allocating
memory within the SGA.........
What are layers in Oracle Architecture?

The Oracle database has a logical layer and a physical layer. The physical layer consists of the
files that reside on the disk and logical layer map the data to these files of physical..........
What is a static data dictionary in Oracle?

The information in data dictionary can be accessed through data dictionary views as they are not
directly accessible............
What is a database buffer cache?

Database buffer cache is a component of SGA. It has the responsibility to cache most recent
accessed data. It keeps the transaction in the buffer cache till it is written on the disk.............

8) Difference between SGA and PGA.


SGA (System Global Area) is a memory area allocated during an instance start up.
SGA is allocated as 40% of RAM size by default.
SGA size is controlled by DB_CACHE_SIZE parameter defined in initialization
parameter file (init.ora file or SPFILE).
PGA (Program or Process Global Area) is a memory area that stores a user session
specific information.
PGA is allocated as 10% of RAM size by default.

9) What are the disk components in Oracle?


These are the physical components which gets stored in the disk.
Data files
Redo Log files
Control files
Password files
Parameter files

10) What is System Change Number (SCN)?


SCN is a unique ID that Oracle generates for every committed transaction.
It is recorded for every change in the redo entry.
SCN is also generated for every checkpoint (CKPT) occurred.
It is an ever increasing number which is updated for every 3 seconds
You can get the SCN number by querying select SCN from v$database from
SQLPLUS.

11) What is Database Writer (DBWR) and when does DBWR write to the data
file?
DBWR is a background process that writes data blocks information from Database
buffer cache to data files.
There are 4 important situations when DBWR writes to data file
Every 3 seconds
Whenever checkpoint occurs
When server process needs free space in database buffer cache to read new
blocks.
Whenever number of changed blocks reaches a maximum value.

12) What is Log Writer and when does LGWR writes to log file?
LGWR writes redo or changed information from redo log buffer cache to redo log
files in database.
It is responsible for moving redo buffer information to online redo log files, when
you commit and a log switch also occurs.
LGWR writes to redo files when the redo log buffer is 1/3 rd full.
It also writes for every 3 seconds.
Before DBWR writes modified blocks to the datafiles, LGWR writes to the
log file

13) Which Table spaces are created automatically when you create a database?

SYSTEM tablespace is created automatically during database creation.


It will be always online when the database is open.
Other Tablespaces include
SYSAUX tablespace
UNDO tablespace
TEMP tablespace
UNDO & TEMP tablespace are optional when you create a database.

14) Which file is accessed first when Oracle database is started and What is the
difference between SPFILE and PFILE?
Init<SID>.ora parameter file or SPFILE is accessed first .( SID is instance name)
Settings required for starting a database are stored as parameters in this file.
SPFILE is by default created during database creation whereas PFILE should be
created from SPFILE.
PFILE is client side text file whereas SPFILE is server side binary file.
SPFILE is a binary file (it cant be opened) whereas PFILE is a text file we can edit
it and set parameter values.
Changes made in SPFILE are dynamically effected with running database whereas
PFILE changes are effected after bouncing the database.
We can backup SPFILE using RMAN.

15) What are advantages of using SPFILE over PFILE?


SPFILE is available from Oracle 9i and above.
Parameters in SPFILE are changed dynamically.
You cant make any changes to PFILE when the database is up.
RMAN cant backup PFILE, It can backup SPFILE.
SPFILE parameters changes are checked before they are accepted as it is
maintained by Oracle server thereby reducing the human typo errors.

16) How can you find out if the database is using PFILE or SPFILE?
You can query Dynamic performance view (v$parameter) to know your database
is using PFILE or SPFILE.

SQL> select value from V$parameter where name= SPFILE;


A non-null value indicates the database is using SPFILE.
Null value indicates database is using PFILE.
You can force a database to use a PFILE by issuing a startup command as
SQL> startup PFILE = full path of Pfile location;

17) Where are parameter files stored and how can you start a database using a
specific parameter file?
In UNIX they are stored in the location $ORACLE_HOME/dbs and
ORACLE_HOME/database for Windows directory.
Oracle by default starts with SPFILE located in $ORACLE_HOME/dbs.
If you want to start the database with specific file we can append it at the startup
command as
SQL > startup PFILE = full path of parameter file ;
You can create PFILE from SPFILE as create PFILE from SPFILE;
All the parameter values are now updated with SPFILE.
Similarly, create SPFILE from PFILE; command creates SPFILE from PFILE.

18) What is PGA_AGGREGATE_TARGET parameter?


PGA_AGGREGATE TARGET parameter specifies target aggregate PGA memory
available to all server process attached to an instance.
Oracle sets its value to 20% of SGA.
It is used to set overall size of work-area required by various components.
Its value can be known by querying v$pgastat dynamic performance view.
From sqlplus it can be known by using SQL> show parameter pga.

19) What is the purpose of configuring more than one Database Writer
Processes? How many should be used? (On UNIX)
DBWn process writes modified buffers in Database Buffer Cache to data files, so
that user process can always find free buffers.
To efficiently free the buffer cache to make it available to user processes, you can
use multiple DBWn processes.
We can configure additional processes (DBW1 through DBW9 and DBWa through
DBWj) to improve write performance if our system modifies data heavily.
The initialization parameter DB_WRITER_PROCESSES specifies the number of
DBWn processes upto a maximum number of 20.
If the Unix system being used is capable of asynchronous input/output processing
then only one DBWn process is enough, if not the case the total DBWn processes
required will be twice the number of disks used by oracle, and this can be set with
DB_WRITER_PROCESSES initialization parameter.

20) List out the major installation steps of oracle software on UNIX in brief?
Set up disk and make sure you have Installation file (run Installer) in your dump.
Check the swap and TEMP space .
Export the following environment variables
1) ORACLE_BASE
2) ORACLE_HOME
3) PATH
4) LD_LIBRARY_PATH
5) TNS_ADMIN
Set up the kernel parameters and file maximum descriptors.
Source the Environment file to the respective bash profile and now run Oracle
Universal Installer.

21) Can we check number of instances running on Oracle server and how to set
kernel parameters in Linux?
Editing the /etc/oratab file on a server gives the list of oracle instances running on
your server.
Editing /etc/sysctl.conf file with vi editor will open a text file listing out kernel level
parameters.
We can make changes to kernel parameters as required for our environment only
as a root user.
To make the changes affected permanently to kernel run the command /sbin/sysctl
p.
We must also set file maximum descriptors during oracle installation which can be
done by editing /etc/security/limits.conf as a root user.

22) What is System Activity Reporter (SAR) and SHMMAX?

SAR is a utility to display resource usage on the UNIX system.


sar u shows CPU activity.
Sar w shows swapping activity
Sar b shows buffer activity
SHMMAX is the maximum size of a shared memory segment on a Linux system.

23) List out some major environment variable used in installation?


ORACLE_BASE=/u01/app/<installation-directory>
ORACLE_HOME=$ORACLE_BASE/product/11.2.0(for 11g)/dbhome_1
ORACLE_SID=<instance-name>

PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
TNS_ADMIN=$ORACLE_HOME/network/admin
These are absolutely critical environment variables in running OUI.

24) What is a control file?


Control file is a binary file which records the physical structure of a database.
It includes number of log files and their respective location, Database name and
timestamp when database is created, checkpoint information.
We find CONTROL_FILE parameter in initialization parameter file which stores
information about control file location.
We can multiplex control files, store in different locations to make control files
available even if one is corrupted.
We can also avoid the risk of single point of failure.

25) At what stage of instance, control file information is read and can we recover
control file and how to know information in a control file?
During database mounting, control file information is read.
We cant recover or restore lost control file, but we can still startup the database
using control files created using multiplexing in different locations.
We can query the following command
SQL> alter database backup controlfile to trace;
We find a trace file(.trc) in udump location,we can edit it and find the complete
database structure.
Multiplexing can also be done using Following command
SQL> alter database backup controlfile to <Different location/path>.

26) How can you obtain Information about control file?


Control file information can be shown in initialization parameter file.
We can query v$controlfile to display the names of control files
From sql we can execute
SQL> show parameter control_files;
The above query gives the name, Location of control files in our physical disk.
We can edit PFILE using a vi editor and control_files parameter gives us
information about number of and location of control files.

27) How do you resize a data file and tablespace?


Prior to Oracle 7.2 you cant resize a datafile.
The solution was to delete the tablespace, recreating it with different sized
datafiles.

After 7.2 you can resize a datafile by using ALTER DATABASE DATAFILE
<file_name> RESIZE;
Resizing Table space includes creation of new data file or resizing existing data
file.
ALTER TABLESPACE <tablespacename> ADD DATAFILE <datafile name> size M;
creates a new datafile.

28) Name the views used to look at the size of a datafile, controlfiles, block size,
determine free space in a tablespace ?
DBA_DATA_FILES or v$datafile view can be used to look at the size of a datafile .
DBA_FREE_SPACE is used to determine free space in a tablespace.
V$contolfile used to look at the size of a control file which includes maxlogfiles,
maxlogmembers, maxinstances.
Select * from v$controlfile gives the size of a controlfile.
From sqlplus, query show parameter block_size to get size of db_block_size.

29) What is archive log file?


In archive log mode, the database will makes archive of all redo log files that are filled, called

as archived redo logs or archive log files.


By default your database runs in NO ARCHIVE LOG mode, so we cant perform online
backups (HOT backup).
You must shut down database to perform clean backup (COLD backup) and recovery can be
done to the previous backup state.
Archive log files are stored in a default location called FRA (Flash Recovery Area).
We can also define our own backup location by setting log_archive_dest parameter.

30) Assume you work in an xyz company as senior DBA and on your absence
your back up DBA has corrupted all the control files while working with the
ALTER DATABASE BACKUP CONTROLFILE command. What do you do?
As long as all data files are safe and on a successful completion of BACKUP control file

command by your Back up DBA you are in safe zone.


We can restore the control file by performing following commands
1) CONNECT INTERNAL STARTUP MOUNT
2) TAKE ANY OFFLINE TABLESPACE (Read-only)
3) ALTER DATABASE DATAFILE (OFFLINE)
4) RECOVER DATABASE USING BACKUP CONTROL FILE
5) ALTER DATABASE OPEN RESETLOGS
6) BRING READ ONLY TABLE SPACE BACK ONLINE

Shutdown and back up the system. Then restart.


Then give the command ALTER DATABSE BACKUP CONTROL FILE TO TRACE
This output can be used for control file recovery as well.
If control file backup is not available, then the following will be required
1) CONNECT INTERNAL STARTUP NOMOUNT
2) CREATE CONTROL FILE .....;
But we need to know all of the datafiles, logfiles, and settings of MAXLOGFILES,
MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES for the database to use the
command.

31) Can we reduce the space of TEMP datafile? How?


Yes, we can reduce the space of the TEMP datafile.

Prior to oracle 11g,,you had to recreate the datafile.

In oracle 11g you reduce space of TEMP datafile by shrinking the TEMP tablespace.It is a new
feature to 11g.
The dynamic performance view can be very useful in determining which table space to shrink.

32) What do you mean by database backup and which files must be backed up?
Database stores most crucial data of business ,so its important to keep the data safe and this

can be achieved by backup.


The following files must be backed up
Database files (Header of datafiles is freezed during backup)
Control files
Archived log files
Parameter files (spfile and pfile)
Password file

33) What is a full backup and name some tools you use for full backup?
A full backup is a backup of all the control files, data files, and parameter file (SPFILE or

PFILE).
You must also backup your ORACLE_HOME binaries which are used for cloning.
A full backup can be performed when our database runs in NON ARCHIVE LOG mode.

As a thumb rule, you must shutdown your database before you perform full backup.
Full or COLD backup can be performed by using copy command in unix.

34) What are the different types of backups available and also explain the
difference between them?
There are 2 types of backups

1) COLD backup(User managed & RMAN)


2) HOT backup(User managed & RMAN)
Hot backup is taken when the database is still online and database should be in ARCHIVE
LOG MODE.
Cold backup is taken when the database is in offline mode.
Hot backup is inconsistent backup where as cold backup is consistent backup.
You can begin backup by using the following command
SQL> alter database begin backup;
End backup by
SQL> alter database end backup;

35) How to recover database if we lost the control file and we do not have a
backup and what is RMAN?
We can recover our database at any point of time, when we have backup of our control files in

different mount points.


Also check whether the control file is available in trace file located in USERDUMP or the alert
log to recover the database.
RMAN
RMAN called as Recovery manager tool supplied by oracle that can be used to manage backup
and recovery activities.
You can perform both offline (Cold) and online (Hot) backups using RMAN.
We need to configure Flash_Recovery_Area of database to use RMAN.
RMAN maintains the repository of backup information in control file.

36) Name the architectural components of RMAN

RMAN executable
Server process
Channels
Target database
Recovery catalog database

Media management layer


Backup sets and backup pieces

37) What is a recovery catalog?


Recovery catalog is an inventory of backup taken by RMAN for the database.
The size of the recovery catalog schema depends upon the number of databases
monitored by the catalog.
It is used to restore a physical backup, reconstruct it, and make it available to the
oracle server.
RMAN can be used without recovery catalog.
Recovery catalog also holds RMAN stored scripts.

38) List some advantages of using RMAN.


Table spaces are not put in the backup mode ,therefore there is no extra redo log
file during online backups.
Incremental backups that only copy data blocks, which have changed since last
backup.
Detection of corrupt blocks.
Built in reporting and listing commands.
Parallelization of I/O operations.

39) How to bring a database from ARCHIVE LOG mode to NON ARCHIVE
LOG MODE?

You should change your init<SID>.ora file with the following information
log_archive_dest=/u01/oradata/archlog (for example)
log_archive_format=%t_%s.dbf
log_archive_start=true (prior to 10g)
sql>shutdown;
sql> startup mount;
sql> alter database archivelog;
sql>alter database open;
Make sure you backup your database before switching to ARCHIVELOG mode.

40) What are the different stages of database startup?


Database undergoes different stages before making itself available to end users
Following stages are involved in the startup of database
? NoMount
? Mount
? Open

NoMount Oracle Instance is available based on the parameters defined in SPFile.


Mount - Based on the Information from parameter control files location in spfile, it
opens and reads them and available to next stage.
Open - Datafiles, redo log files are available to the end users.

41) Name some of the important dynamic performance views used in Oracle.

V$Parameter
V$Database
V$Instance
V$Datafiles
V$controlfiles
V$logfiles

42) What are the different methods we can shutdown our database?
SHUTDOWN (or) SHUTDOWN NORMAL
No new connections are accepted and wait for the user to close the session.
SHUTDOWN TRANSACTIONAL
No new connections are accepted and wait for the existing transactions to commit
and logouts the session without the permission of user.
SHUTDOWN IMMEDIATE
No new connections are accepted and all committed transactions are reflected in
database and all the transactions are about to commit are rolled back to previous
value.
SHUTDOWN ABORT
Its just like an immediate power off for a database, it doesnt mind what are the
transactions running it just stops entire activity -(even committed transactions are
not reflected in database) and make database unavailable. SMON process takes
responsibility for recovery during next startup of database.
SHUTDOWN NORMAL, TRANSACTIONAL, IMMEDIATE are clean shutdown methods
as database maintains its consistency.
SHUTDOWN ABORT leaves our database in an inconsistent state,data integrity is
lost.

43) What are the different types of indexes available in Oracle?


Oracle provides several Indexing schemas
B-tree index Retrieves a small amount of information from a large table.
Global and Local index Relates to partitioned tables and indexes.
Reverse Key Index - It Is most useful for oracle real application clusters
applications.

Domain Index Refers to an application


Hash cluster Index Refers to the index that is defined specifically for a hash
cluster.

44) What is the use of ALERT log file? Where can you find the ALERT log file?
Alert log file is a log file that records database-wide events which is used for
trouble shooting.
We can find the Log file in BACKGROUND_DUMP_DEST parameter.
Following events are recorded in ALERT log file:
Database shutdown and startup information.
All non-default parameters.
Oracle internal (ORA-600) errors.
Information about a modified control file.
Log switch change.

45) What is a user process trace file?


It is an optional file which is produced by user session.
It is generated only if the value of SQL_TRACE parameter is set to true for a
session.
SQL_TRACE parameter can be set at database, instance, or session level.
If it set at instance level, trace file will be created for all connected sessions.
If it is set at session level, trace file will be generated only for specified session.
The location of user process trace file is specified in the USER_DUMP_DEST
parameter.

46) What are different types of locks?


There are different types of locks, which are given as follows:
System locks controlled by oracle and held for a very brief period of time.
User locks Created and managed using dbms_lock package.
Different types of user locks are given as follows
UL Lock Defined with dbms_lock package.
TX Lock Acquired once for every transaction. It isa row transaction lock.
TM Lock Acquired once for each object, which is being changed. It is a DML lock.
The ID1 column identifies the object being modified.

47) What do db_file_sequential_read and db_file_scattered_read events define?


Db_file_sequential_read event generally indicates index usage.
It shows an access by row id.
While the db_file-scattered_read event indicates full table scan.

Db_file_sequential_read event reads a single block at one time.


Whereas db_file_scattered_read event reads multiple blocks.

48) What is a latch and explain its significance?


Latch is an on/off switch in oracle that a process must access in order to perform
certain type of activities.
They enforce serial access to the resources and limit the amount of time for which
a single process can use a resource.
A latch is acquired for a very short amount of time to ensure that the resource is
allocated.
We may face performance issues which may be due to either of the two following
reasons
Lack of availability of resource.
Poor application programming resulting in high number of requests for resource.
Latch information is available in the v$LATCH and v$LATCHHOLDER dynamic
performance views.

49) Explain the architecture of data guard?


Data guard architecture includes the following components
Primary database Refers to the production database.
Standby Database Refers to a copy of primary or production database.It may
have more than one standby database.
Log transport service Manages transfer of archive log files primary to standby
database.
Network configuration Refers to the network connection between primary and
standby database.
Applies archived logs to the standby database.
Role management services Manages the role change between primary and
standby database.
Data guard broker Manages data guard creation process and monitors the
dataguard.

50) What is role transition and when does it happen?


Database operates in one of the following mutually exclusive roles
Primary
Standby
Role transition is the change of role between primary and standby databases.
Data guard enables you to change this roles dynamically by issuing the sql
statements.
Transition happens in between primary and standby databases in the following

way
Switchover, where primary database is switched to standby database and standby
to primary database.
Failover, where a standby database can be used as a disaster recovery solution in
case of a failure in primary database.
DRM allows you to create resource plans, which specify resource allocation to
various consumer groups.
DRM offers an easy-to-use and flexible system by defining distinct independent
components.
Enables you to limit the length of time a user session can stay idle and
automatically terminates long-running SQL statement and users sessions.
Sets the initial login priorities for various consumer groups.
DRM will automatically queue all the subsequent requests until the currently
running sessions complete.

Oracle replication

<<Previous Next>>
Define read-only replication and its uses.
Read only replication creates local copy of table data originating from one or
more remote master tables. An application can query the data in a read-only table
snapshot, but cannot insert, update, or delete rows in the snapshot of the
data..............
Read answer
Read-only replication and snapshots
Replication is the process of copying database into one or more databases to make
a system distributed...............
Read answer
Also read
Oracle DBA
How do you increase the performance of %LIKE operator?, What is a standby
database? Difference between Physical and logical standby databases, What is
Cache Fusion Technology?, What is simple replication and advance
replication?.............
What dynamic data replication?
Dynamic data replication is the way in which updating or inserting records in remote
database through database triggers.............
<<Previous Next>>

Oracle transaction

<<Previous Next>>
Explain the steps executed during SQL statement processing.

The parser scans the statement and breaks it into logical units such as keywords,
identifiers and operators. A query or a sequence tree is built using the units above.
This is done to transform the source data into the format required by the result
set..............
Read answer
Explain the steps executed during a typical transaction.
A transaction contains one or more SQL statements. It is an atomic unit...............
Read answer
Oracle PL/SQL
PL/SQL is a transaction processing language that offers the following
advantages............
Read answer
What are transaction isolation levels supported by Oracle?
READ COMMITTED: If row locks are obtained by a certain transaction, then any other
transaction that contains DML needs to wait until the row locks have been released
by that particular transaction.............
Read answer
What are the uses of Rollback Segment?
Rollback segments undo changes when a transaction is rolled back, they also
ensure that transactions leave the uncommitted changes unnoticed..............
Read answer
Explain how to start a new transaction in Oracle.
Oracle server implicitly starts a new transaction with the following two conditions:
The first executable statement of a new user session automatically starts a new
transaction.............
Read answer
Explain how to end the current transaction in Oracle.
Following commands could be run to explicitly end the current transaction: COMMIT
and ROLLBACK.............

Oracle optimizer

<<Previous Next>>
Explain how oracle optimizer works.
Oracle optimizer determines the best possible way to execute a query. This
optimizer uses internal set of rules or costing methods to ace hove the
result...................
Read answer
Describe optimization methods, i.e. cost-based approach and role-based
optimization
Oracle decides how to retrieve the necessary data whenever a valid SQL statement
is processed................
Read answer
Also read
Oracle database tuning
Automatic Performance Diagnostic and Tuning Features, Automatic Shared Memory
Management - Automatic Shared Memory Management puts Oracle in control of
allocating memory within the SGA..........
Oracle DBA
How do you increase the performance of %LIKE operator?, What is a standby
database? Difference between Physical and logical standby databases, What is
Cache Fusion Technology?, What is simple replication and advance
replication?.............
What is the purpose of Indexes?
Oracle uses indexes to avoid the need for large-table, full-table scans and disk sorts,
which are required when the SQL optimizer cannot find an efficient way to service
the SQL..........
<<Previous Next>>

Session auditing

Auditing can be for an individual user at session level or access level.


At access level a single record is created per action and at session level one record
is created for all audit actions per session.
Session audit records all distinct Encryption and Decryption requests for all
sessions.
Session Auditing allows viewing who has had access to your encrypted data down to
the Terminal ID and database column level.
The Encryption Wizard management reports to trace user activity against the
encrypted data.

Statement auditing
Auditing powerful system privileges without regard to specifically named objects is
called statement auditing.

Privilege auditing
Auditing the use of powerful system privileges without regard to specifically named
objects is called privilege auditing.

Object auditing
Auditing accesses to specific schema objects without regard to user is called Object
auditing.
Also read
Oracle database tuning
Automatic Performance Diagnostic and Tuning Features, Automatic Shared Memory
Management - Automatic Shared Memory Management puts Oracle in control of
allocating memory within the SGA..........
Difference between post database commit & post-form commit
Post-form commit fires once during the post and commit transactions process, after
the database commit occurs. The post-form-commit trigger fires after
inserts.............
Oracle error handling
What is Exception in Oracle?, What are the predefined oracle exceptions?, Explain
user defined exceptions in oracle, How PL/SQL Exceptions Are Raised?.............

How are extents allocated to a segment?


An extent is stored some specific information. This information is stored using
specific number of adjoining data blocks. A collection of extent is called as a
segment stored in the same tablespace.............
Oracle Modernization Solutions
A lot has been written on legacy modernization in the past few years. Most of the
books, analyst reports, and white papers discuss at a high level why one should
modernize and theorize, and the different approaches to, and possible outcomes of
modernization............
<<Previous Next>>

S-ar putea să vă placă și