Changing the archive mode in rac is not as easy as changing the archive mode in standalone or master/backup mode, mainly because of the cluster_database parameter. By changing the ter_database parameter from true to false, You can smoothly change the archive settings by changing the standalone archiving mode.
After the modification, change cluster_database to true. For archiving logs, you can use nfs sharing to save the archive logs on both sides. Of course, you can also use rman to directly generate the archive logs for each node. When you need to restore the logs, merge the archived logs.
1. Shut down the running database
# Su-oracle $ Sqlplus/nolog SQL> connect/as sysdba SQL> shutdown immediate |
2. Export the spfile file of an existing database
If no spfile exists, you can create a spfile first. SQL> create spfile from pfile; Then export the spfile SQL> create pfile = '/oracle/pfile. ora' from spfile; // create a pfile IN THE/oracle directory |
3. Modify the/oracle/pfile. ora File
Set cluster_database to false. You can also add the automatic archiving parameter log_archive_start = true, as shown below:
*. Log_archive_start = true *. Cluster_database = false *. Log_archive_dest = 'location =/oracle/archivelog '// Save the archived logs to the/oracle/archivelog File System for ease of Management *. Log_archive_format = % t _ % s. dbf |
4. Import the modified spfile
When the database is closed:
| SQL> create spfile from pfile = '/oracle/pfile. ora '; |
5. Start the database to the load status (mount)
$ Sqlplus/nolog SQL> connect/as sysdba SQL> startup mount |
6. Change the database running mode to archive mode.
$ Sqlplus/nolog SQL> connect/as sysdba SQL> startup mount SQL> alter database archivelog; // change to archive Mode SQL> alter database open; // open the database SQL> archive log list; // check whether the database archive parameters have been correctly changed |
7. Change cluster_database to true.
First shut down the database
$ Sqlplus/nolog SQL> connect/as sysdba SQL> shutdown immediate SQL> create spfile from pfile = '/oracle/pfile01.ora'; // export an existing spfile Modify/oracle/pfile01.ora and set cluster_database to true; |
8. Import the new pfile01.ora file.
$ Sqlplus/nolog SQL> connect/as sysdba SQL> create spfile from pfile = '/oracle/pfile01.ora '; SQL> startup // start the database normally |
How to modify the archive mode of Oracle 9i RAC:
1. change the cluster_server = false in a instance
2. shutdown both instances;
3. change proper parameter about archivelog mode.
4. startup mount the instance from set 1.
5. login db as sysdba and alter database archivelog;
6. shutdown instance and change parameter cluster_server = true
7. start both instance;
General modification method:
Close the database and back up existing data
Changing the running mode of the database is an important change to the database. Therefore, you must back up the database to protect possible problems.
Start Instance, Mount database, but do not open database, to change the archive Mode
Sqldba lmode = ysvrmgrl) Sqldba> connect internal Sqldba> startup mount Sqldba> alter database archivelog; |
Enable automatic archiving
Add the following parameters to the initialization file init *. ora (usually under dbs in the lower directory of the ORACLE root directory:
Specify the redo login file name and storage location for the archive
Add the following parameters to the initialization file init *. ora:
Log_archive_format = % S. arc Log_archive_dest =/arch12/arch (arch12 is the directory where log files are stored) |
Close the database, restart the database, and archive the data.
(