VIII. RAC archive 1. archive storage method
Archived logs in RAC can be stored in the following ways:
In initialization parameter file, you must set the following parameters:
Sid1.log _ archive_dest_1 = (location =/arc_dest_1)
Sid2.log _ archive_dest_1
= (Location =/arc_dest_2)
1.1 respectively stored on each node
In this case, recover will cause the archived log replication problem, and the same directory should be created on each node, because
You must be able to access the archived generated by all nodes as needed during recover.
Log. Of course, you can also remotely access the archived log of other nodes (such as NFS)
Log on to OracleUser:
[Root @ raw1 ~] # Su-Oracle
[Oracle @ raw1 ~] $ Sqlplus/As sysdba
SQL * Plus: Release 10.2.0.1.0
-Production on Tue Mar 1 12:35:42 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g enterprise
Edition Release 10.2.0.1.0-Production
With the partitioning, real application
Clusters, OLAP and Data Mining options
SQL> select instance_name from
GV $ instance;
Instance_name
----------------
Raw1
Raw2
View database Archiving:
SQL> select
Inst_id, instance_name, version, archiver, status from GV $ instance;
Inst_id instance_name
Version archive status
--------------------------------------------------------------
1 raw1 10.2.0.1.0 stopped open
2 raw2 10.2.0.1.0 stopped open
SQL> archive log list;
Database Log mode No archive Mode
Automatic Archival disabled
Archive destination/u01/APP/Oracle/product/10.2.0/db_1/dbs/Arch
Oldest online log sequence 33
Current Log sequence 34
1.2. Stored in (ASM, CFS, etc.) Storage
In this way, each node can access all the archived logs.
1.3. Modify the archive path
Note: RACBecause the database has multiple instances, pay attention to the initialization parameters related to each instance: log_archive_dest_nYou must make sure that the path set for this parameter is valid and valid.
Set raw1Local archive path
SQL> alter system set
Log_archive_dest_1 = 'location =/u01/raw2arch 'scope = spfile SID = 'raw2 ';
System altered.
View the changed archive path
SQL> archive log list;
Database Log mode No archive Mode
Automatic Archival disabled
Archive destination/u01/raw1arch
Oldest online log sequence 33
Current Log sequence 34
Set raw2Local archive path
SQL> alter system set log_archive_dest_1 = 'location =/u01/raw1arch'
Scope = spfile SID = 'raw1 ';
System altered.
You can also view other archive parameters in the following ways:
SQL> show parameter log_archive
Name type value
------------------------------------
-----------------------------------------
Log_archive_config string
Log_archive_dest string
Log_archive_dest_1 string location =/u01/raw2arch
1.4. Archive Switching
Oracle production databases are all started in archive mode. Archive non-archive switchover under RAC is the same as that for a single instance. The alter database archivelog/noarchivelog command is executed in Mount mode.
The difference is that all instances in the RAC environment must be in a non-open state, and then execute the alter DATABASE Command on any instance in the Mount state. After the operation is successful, start other instances.
1After logging on to the two instances, run shutdown immediate on each instance.
SQL> shutdown immediate
Database closed.
Database dismounted.
Oracle instance shut down.
2, Open archive (executed on an instance ):
Startup
Mount; Alter database archivelog; Alter database open;
SQL>Shutdown immediate
Database closed.
Database dismounted.
Oracle instance shut down.
SQL>Startup Mount
Oracle instance started.
Total system global area 281018368 bytes
Fixed size 1218968 bytes
Variable Size 130025064 bytes
Database buffers 146800640 bytes
Redo buffers 2973696 bytes
Database mounted.
SQL>Alter database archivelog;
Database altered.
SQL>Alter database open;
Database altered.
3, Close the archive (executed on an instance ):(Same as above)
Startup
Mount; Alter database noarchivelog; Alter database open;
4And execute startup on another instance.
SQL> startup
Oracle instance started.
Total system global area 281018368 bytes
Fixed size 1218968 bytes
Variable Size 134219368 bytes
Database buffers 142606336 bytes
Redo buffers 2973696 bytes
Database mounted.
Database opened.
View node archiving Mode
SQL> archive log list;
Database Log mode archive Mode
Automatic Archival Enabled
Archive destination/u01/raw2arch
Oldest online log sequence 5
Next log sequence to archive 6
Current Log sequence 6
2. Archive Backup Recovery (to be continued)
PS: continue with the installation document. <strong words RAC> the NFS archive is used, which is similar to the one in this post. It mainly focuses on RMAN. For more information, see
Http://space.itpub.net/67294/viewspace-557894