Professional Documents
Culture Documents
What is fal_server and fal_client ? Where do you need to set this ? What the
values would be ?
How do you setup physical standby and logical stand by ? Give me the steps
in detail ? What are the differences ?
What is oracle streams ? How do you enable the replication with streams ?
Give me the steps ?
How do you resolve/skip the data errors which comes with logical standby ?
How do you skip or exclude specific tables from replication in the logical
standby configuration ?
How do you identify the latency and issues with logical standby ?
How do you bypass the database guard and allow modifications to the
tables ?
Give me the Top 5 init parameters which needs to be setup in the source db
in the physical standby config ?
Give me the Top 5 init parameters which needs to be setup in the target db
in the physical standby config ?
How do you handle the nologging issues, If force logging is not enabled in
the physical standby environment ?
How do you ensure the 0% data loss in physical standby configuration ?
How do you perform the switch over from primary to standby and standby to
primary ?
What is the lock_name_space setting ? When do you need to use this ?
Give me the syntax to create a standby controlfile using RMAN ?
How do you identify the list of stand alone patches applied ?
How do you rollback a stand alone patches ?
Give me the list of steps, approach you take for patch set upgrade ?
Give me the list of steps, approach you take for database release
upgrades(9i-10g) ?
How do you apply the standby alone patches ?
How do you figure out the pre-req os patches/packages required for a
specific database release ?
How do you compile the steps for a database upgrade ?
How do you perform the cross platform migrations ?
How do you raise a service request with oracle when you can't resolve certain
upgrade issues
production machine, and ship that file, along with all the archived redolog
files to the standby server. Once you have all these files assembled, place
them in their proper locations, recover the standby database, and you're
ready to roll. From this point on, you must manually ship, and manually
apply those archived redologs to stay in sync with production.
To test your standby database, make a change to a table on the production
server, and commit the change. Then manually switch a logfile so those
changes are archived. Manually ship the newest archived redolog file, and
manually apply it on the standby database. Then open your standby
database in read-only mode, and select from your changed table to verify
those changes are available. Once you're done, shutdown your standby and
startup again in standby mode.
2. What is the difference between Active Dataguard, and the Logical Standby
implementation of 10g dataguard?
Active dataguard is mostly about the physical standby.
Use physical standby for testing without compromising protection of the
production system. You can open the physical standby read/write - do some
destructive things in it (drop tables, change data, whatever - run a test perhaps with real application testing). While this is happening, redo is still
streaming from production, if production fails - you are covered. Use physical
standby for reporting while in managed recovery mode. Since physical
standby supports all of the datatypes - and logical standby does not (11g
added broader support, but not 100%) - there are times when logical
standby isnt sufficient. It also permits fast incremental backups when
offloading backups to a physical standby database.
3. What is a Dataguard?
Oracle Dataguard is a disaster recovery solution from Oracle Corporation that
has been utilized in the industry extensively at times of Primary site failure,
failover, switchover scenarios.
4. What are the uses of Oracle Data Guard?
a) Oracle Data Guard ensures high availability, data protection, and disaster
recovery for enterprise data.
b) Data Guard provides a comprehensive set of services that create,
maintain, manage, and monitor one or more standby databases to enable
production Oracle databases to survive disasters and data corruptions.
RMAN QUESTIONS:
1. What is RMAN ?
Recovery Manager (RMAN) is a utility that can manage your entire Oracle
backup and recovery activities.
Which Files must be backed up?
Database Files (with RMAN)
Control Files (with RMAN)
Offline Redolog Files (with RMAN)
INIT.ORA (manually)
Password Files (manually)
2. When you take a hot backup putting Tablespace in begin backup mode,
Oracle records SCN # from header of a database file. What happens when
you issue hot backup database in RMAN at block level backup? How does
RMAN mark the record that the block has been backed up ? How does RMAN
know what blocks were backed up so that it doesn't have to scan them
again?
In 11g, there is Oracle Block Change Tracking feature. Once enabled; this
new 10g feature records the modified since last backup and stores the log of
it in a block change tracking file. During backups RMAN uses the log file to
identify the specific blocks that must be backed up. This improves RMAN's
performance as it does not have to scan whole datafiles to detect changed
blocks.
Logging of changed blocks is performed by the CTRW process which is also
responsible for writing data to the block change tracking file. RMAN uses
SCNs on the block level and the archived redo logs to resolve any
inconsistencies in the datafiles from a hot backup. What RMAN does not
require is to put the tablespace in BACKUP mode, thus freezing the SCN in
the header. Rather, RMAN keeps this information in either your control files or
in the RMAN repository (i.e., Recovery Catalog).
3. What are the Architectural components of RMAN?
1.RMAN executable
2.Server processes
3.Channels
4.Target database
5.Recovery catalog database (optional)
6.Media management layer (optional)
7.Backups, backup sets, and backup pieces
initialization file and then turning on tracing for either the entire database via
the sql_trace parameter or for the session using the ALTER SESSION
command. Once the trace file is generated you run the tkprof tool against the
trace file and then look at the output from the tkprof tool. This can also be
used to generate explain plan output.
8. When looking at v$sysstat you see that sorts (disk) is high. Is this bad or
good? If bad, how do you correct it?
If you get excessive disk sorts this is bad. This indicates you need to tune the
sort area parameters in the initialization files. The major sort are parameter
is the SORT_AREA_SIZE parameter.
9. When should you increase copy latches? What parameters control copy
latches?
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.
10. Where can you get a list of all initialization parameters for your instance?
How about an indication if they are default settings or have been changed?
You can look in the init.ora file for an indication of manually set parameters.
For all parameters, their value ad whether or not the current value is the
default value, look in the v$parameter view.
11. Describe hit ratio as it pertains to the database buffers. What is the
difference between instantaneous and total hit ratio; which should be used
for tuning?
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 take the ratio of existing parameters this will be a
***ulative 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.
12. Discuss row chaining, how does it happen? How can you reduce it? How
do you correct it?
Row chaining occurs when a VARCHAR2 value is updated and the length of
the new value is longer than the old value and won't fit in the remaining
block space. This results in the row chaining to another block. It can be
reduced by setting the storage parameters on the table to appropriate
values. It can be corrected by export and import of the effected table.
13. When looking at the estat events report you see that you are getting
busy buffer waits. Is this bad? How can you find what is causing it?
Buffer busy waits may indicate contention in redo, rollback or data blocks.
You need to check the v$waitstat view to see what areas are causing the
problem. The value of the "count" column tells where the problem is, the
"class" column tells you with what. UNDO is rollback segments, DATA is data
base buffers.
14. If you see contention for library caches how can you fix it?
Increase the size of the shared pool.
15. If you see statistics that deal with "undo" what are they really talking
about?
Rollback segments and associated structures.
16. If a tablespace has a default pctincrease of zero what will this cause (in
relationship to the smon process)?
The SMON process won't automatically coalesce its free space fragments.
17. If a tablespace shows excessive fragmentation what are some methods
to defragment the tablespace? (7.1,7.2 and 7.3 only)
In Oracle 7.0 to 7.2 The use of the 'alter session set events 'immediate trace
name coalesce level ts#';' command is the easiest way to defragment
contiguous free space fragmentation. The ts# parameter corresponds to the
ts# value found in the ts$ SYS table. In version 7.3 the 'alter tablespace
coalesce;' is best. If free space isn't contiguous then export, drop and import
of the tablespace contents may be the only way to reclaim non-contiguous
free space.
18. How can you tell if a tablespace has excessive fragmentation?
If a select against the dba_free_space table shows that the count of a
tablespaces extents is greater than the count of its data files, then it is
fragmented.
19. You see the following on a status report:
redo log space requests 23
redo log space wait time 0
Is this something to worry about? What if redo log space wait time is high?
How can you fix this?
Since wait time is zero, no. If wait time was high it might indicate a need for
more or larger redo logs.
20. What can cause a high value for recursive calls? How can this be fixed?
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 relinking
applications to hold cursors, use proper space management techniques
(proper storage and sizing) or ensure repeat queries are placed in packages
for proper reuse.
21. If you see a pin hit ratio of less than 0.8 in the estat library cache report
is this a problem? If so, how do you fix it?
This indicates that the shared pool may be too small. Increase the shared
pool size.
22. If you see the value for reloads is high in the estat library cache report is
this a matter for concern?
Yes, you should strive for zero reloads if possible. If you see excessive
reloads then increase the size of the shared pool.
23. 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?
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.
24. You look at the dba_rollback_segs view and see that you have a large
number of wraps is this a problem?
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.
25. In a system with an average of 40 concurrent users you get the following
from a query on rollback extents:
ROLLBACK CUR EXTENTS
--------------------- -------------------------R01 11
R02 8
R03 12
R04 9
SYSTEM 4
You have room for each to grow by 20 more extents each. Is there a
problem? Should you take any action?
No there is not a problem. You have 40 extents showing and an average of
40 concurrent users. Since there is plenty of room to grow no action is
needed.
26. You see multiple extents in the temporary tablespace. Is this a problem?
As long as they are all the same size this isn't a problem. In fact, it can even
improve performance since Oracle won't have to create a new extent when a
user needs one.
RAC :
Some useful commands to manage Oracle 10g RAC
Check status of Oracle RAC :
$ocrconfig -showbackup
$ocrconfig -export /data/backup/rac/ocrdisk.bak
!To restore OCR, it must stop Clusterware on all nodes before.
$ocrconfig -import /data/backup/rac/ocrdisk.bak
$cluvfy comp ocr -n all //verification
$ocrcheck
Real Application Cluster (RAC) configurations for Oracle 10g have an inherent
issue with the transaction manager when Oracle attempts to recover twophase commit distributed transactions that span over multiple Oracle RAC
nodes. A problem can occur when one node fails, and Oracle opens up the
other surviving nodes for business before the Oracle RAC completes the
necessary recovery action for the node that has failed. The application
server's ability to maintain transaction affinity provides you the ability to
circumvent this issue.
About this task
Errors can occur when the recovery process attempts to commit or rollback a
transaction branch through a RAC node that was previously active but later
failed. The transaction manager would receive the following exception:
ORA- 24756: transaction does not exist
If this error is encountered, the Oracle database administrator might need to
manually resolve the in-doubt transaction by forcing a rollback or commit
process. If you do not desire a manual intervention, however, you might want
to configure an automatic and transparent strategy for transaction recovery.
If the in-doubt transaction is not resolved, any subsequent transactions will
receive the following exception:
ORA-01591 lock held by in-doubt distributed transaction
The result is that portions of the database will not be usable.
node. Instead, you will have to manually move the service to the restarted
RAC node.
When you configure DTP on the Oracle service, you have transferred load
balancing from the Oracle JDBC provider to the application server. The
workload will be distributed by the application server instead of Oracle, which
is why you created services that do not implement load balancing and only
use one primary node. This configuration prevents situations in which
transaction processes span multiple RAC nodes and alleviates recovery
problems that can arise when one or more RAC nodes fail.