Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
15Activity
0 of .
Results for:
No results containing your search query
P. 1
Enabling Archive Logs in a RAC Environment

Enabling Archive Logs in a RAC Environment

Ratings: (0)|Views: 372 |Likes:
Published by SHAHID FAROOQ

More info:

Published by: SHAHID FAROOQ on Aug 29, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/06/2012

pdf

text

original

 
Enabling Archive Logs in a RAC Environment -
(Oracle10g)
 
by Jeff Hunter, Sr. Database Administrator 
 Whether a single instance or clustered database, Oracle tracks (logs) all changes todatabase blocks in
online redolog files
. In an Oracle RAC environment, each instancewill have its own set of online redolog files known as a
thread 
. Each Oracle instancewill use its set (group) of online redologs in a circular manner. Once an online redologfills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oraclewill make a copy of the online redo log before it gets reused. A thread must contain atleast two online redologs (or online redolog groups). The same holds true for a singleinstance configuration. The single instance must contain at least two online redologs(or online redolog groups).The size of an online redolog file is completely independent of another intances'redolog size. Although in most configurations the size is the same, it may be differentdepending on the workload and backup / recovery considerations for each node. It isalso worth mentioning that each instance has exclusive write access to its own onlineredolog files. In a correctly configured RAC environment, however, each instance canread another instance's current online redolog file to perform instance recovery if thatinstance was terminated abnormally. It is therefore a requirement that online redo logs be located on a shared storage device (just like the database files).As already mentioned, Oracle writes to its online redolog files in a circular manner.When the current online redolog fills, Oracle will switch to the next one. To facilitatemedia recovery, Oracle allows the DBA to put the database into "Archive Log Mode"which makes a copy of the online redolog after it fills (and before it gets reused). Thisis a process known as archiving.The Database Creation Assistant (DBCA) allows users to configure a new database to be in archive log mode, however most DBA's opt to bypass this option. In cases likethis where the database is in no archive log mode, it is a simple task to put thedatabase into archive log mode. Note however that this will require a short databaseoutage. From one of the nodes in the Oracle RAC 10
 g 
configuration, use thefollowing tasks to put a RAC enabled database into archive log mode. For the purposeof this article, I will use the node
linux1
which runs the
orcl1
instance:1.Login to one of the nodes (i.e.
linux1
) and disable the cluster instance parameter by setting
cluster_database
to
FALSE
from the current instance:2.
$
sqlplus "/ as sysdba"
SQL>
alter system set cluster_database=false scope=spfilesid='orcl1';
3.Shutdown
all 
instances accessing the clustered database:
$
srvctl stop database -d orcl
 
4.Using the local instance,
MOUNT 
the database:5.
$
sqlplus "/ as sysdba"
SQL>
startup mount
6.Enable archiving:
SQL>
alter database archivelog;
7.Re-enable support for clustering by modifying the instance parameter 
cluster_database
to
TRUE
from the current instance:
SQL>
alter system set cluster_database=true scope=spfilesid='orcl1';
8.Shutdown the local instance:
SQL>
shutdown immediate
9.Bring
all 
instance back up using
srvctl
:
$
srvctl start database -d orcl
10.(Optional) Bring any services (i.e. TAF) back up using
srvctl
:
$
srvctl start service -d orcl
11.Login to the local instance and verify Archive Log Mode is enabled:12.
$
sqlplus "/ as sysdba"
13.
SQL>
archive log list
14.
Database log mode
 Archive Mode
15.
Automatic archival
Enabled 
16.Archive destination USE_DB_RECOVERY_FILE_DEST17.Oldest online log sequence 8318.Next log sequence to archive 84Current log sequence 84
After enabling Archive Log Mode, each instance in the RAC configuration canautomatically archive redologs!
Enabling Archive Logs in a RAC Environment -
(Oracle11g)
 
by Jeff Hunter, Sr. Database Administrator 
 Whether a single instance or clustered database, Oracle tracks (logs) all changes todatabase blocks in
online redolog files
. In an Oracle RAC environment, each instance
 
will have its own set of online redolog files known as a
thread 
. Each Oracle instancewill use its set (group) of online redologs in a circular manner. Once an online redologfills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oraclewill make a copy of the online redo log before it gets reused. A thread must contain atleast two online redologs (or online redolog groups). The same holds true for a singleinstance configuration. The single instance must contain at least two online redologs(or online redolog groups).The size of an online redolog file is completely independent of another intances'redolog size. Although in most configurations the size is the same, it may be differentdepending on the workload and backup / recovery considerations for each node. It isalso worth mentioning that each instance has exclusive write access to its own onlineredolog files. In a correctly configured RAC environment, however, each instance canread another instance's current online redolog file to perform instance recovery if thatinstance was terminated abnormally. It is therefore a requirement that online redo logs be located on a shared storage device (just like the database files).As already mentioned, Oracle writes to its online redolog files in a circular manner.When the current online redolog fills, Oracle will switch to the next one. To facilitatemedia recovery, Oracle allows the DBA to put the database into "Archive Log Mode"which makes a copy of the online redolog after it fills (and before it gets reused). Thisis a process known as archiving.The Database Creation Assistant (DBCA) allows users to configure a new database to be in archive log mode, however most DBA's opt to bypass this option. In cases likethis where the database is in no archive log mode, it is a simple task to put thedatabase into archive log mode. Note however that this will require a short databaseoutage. From one of the nodes in the Oracle RAC 11
 g 
configuration, use thefollowing tasks to put a RAC enabled database into archive log mode. For the purposeof this article, I will use the node
linux1
which runs the
orcl1
instance:1.Login to one of the nodes (i.e.
linux1
) and disable the cluster instance parameter by setting
cluster_database
to
FALSE
from the current instance:2.
$
sqlplus "/ as sysdba"
SQL>
alter system set cluster_database=false scope=spfilesid='orcl1';
3.Shutdown
all 
instances accessing the clustered database:
$
srvctl stop database -d orcl
4.Using the local instance,
MOUNT 
the database:5.
$
sqlplus "/ as sysdba"
SQL>
startup mount
6.Enable archiving:
SQL>
alter database archivelog;
7.Re-enable support for clustering by modifying the instance parameter 
cluster_database
to
TRUE
from the current instance:

Activity (15)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
infyrajayaar liked this
sunny_dba liked this
sunny_dba liked this
fabioapl liked this
infyrajayaar liked this
ukatru liked this
brijesh.y1747 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->