Beruflich Dokumente
Kultur Dokumente
(Oracle10g)
by Jeff Hunter, Sr. Database Administrator
Whether a single instance or clustered database, Oracle tracks (logs) all changes to
database 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 instance
will use its set (group) of online redologs in a circular manner. Once an online redolog
fills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oracle
will make a copy of the online redo log before it gets reused. A thread must contain at
least two online redologs (or online redolog groups). The same holds true for a single
instance configuration. The single instance must contain at least two online redologs
(or online redolog groups).
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 facilitate
media 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). This
is 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 like
this where the database is in no archive log mode, it is a simple task to put the
database into archive log mode. Note however that this will require a short database
outage. From one of the nodes in the Oracle RAC 10g configuration, use the
following tasks to put a RAC enabled database into archive log mode. For the purpose
of 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=spfile
sid='orcl1';
6. Enable archiving:
10. (Optional) Bring any services (i.e. TAF) back up using srvctl:
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_DEST
17.Oldest online log sequence 83
18.Next log sequence to archive 84
Current log sequence 84
After enabling Archive Log Mode, each instance in the RAC configuration can
automatically archive redologs!
Whether a single instance or clustered database, Oracle tracks (logs) all changes to
database 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 instance
will use its set (group) of online redologs in a circular manner. Once an online redolog
fills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oracle
will make a copy of the online redo log before it gets reused. A thread must contain at
least two online redologs (or online redolog groups). The same holds true for a single
instance configuration. The single instance must contain at least two online redologs
(or online redolog groups).
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 facilitate
media 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). This
is 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 like
this where the database is in no archive log mode, it is a simple task to put the
database into archive log mode. Note however that this will require a short database
outage. From one of the nodes in the Oracle RAC 11g configuration, use the
following tasks to put a RAC enabled database into archive log mode. For the purpose
of 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=spfile
sid='orcl1';
6. Enable archiving:
10. (Optional) Bring any services (i.e. TAF) back up using srvctl:
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_DEST
17.Oldest online log sequence 83
18.Next log sequence to archive 84
Current log sequence 84
After enabling Archive Log Mode, each instance in the RAC configuration can
automatically archive redologs!