Oracle 10g RAC and Single Instance open archive Operation example

Source: Internet
Author: User
Tags time interval

First, single instance to open the order of the archive log

1. The original parameter file needs to be backed up first

Create pfile= ' F:\pfile1018.ora ' from SPFile;

2. Adjust the format of the archive log

Alter system set log_archive_format= '%s_%t_%r.log ' scope=spfile;

3. Set the archive path
Before you take this step, you have to build your catalogue.

Alter system set log_archive_dest_1= ' location=/u01/app/oracle/archive ';

4. Set up one hours must be forced to file

Alter system set ARCHIVE_LAG_TARGET=3600 Scope=both;

5. Close the database

Shutdown immediate;

6. Open database to Mount state

startup Mount;

7. Open Archive

ALTER DATABASE Archivelog;

8. Open the Database

ALTER DATABASE open;

9. Archive test for current log

Alter system archive log current;

Note: The above steps apply to oracle10g\oracle11g.
If you want to oracle9i, you need to add the following statement in the second step:

Alter system set LOG_ARCHIVE_START=TRUE Scope=spfile;

Second, Oracle RAC Open Archive log

10g and 11g RAC-enabled methods of archiving

Sql> select group#,thread# from V$log;
group# thread#
---------- ----------
1 1
2 1
3 2
4 2
1, first stop the database
[ROOT@BTEDB1 bin]#./srvctl Stop database-d Btedb
2, in which the database will be opened to mount
Sql> Startup Mount
ORACLE instance started.
Total System Global area 1.4097E+10 bytes
Fixed Size 2266624 bytes
Variable Size 3321891328 bytes
Database buffers 1.0737E+10 bytes
Redo buffers 35618816 bytes
Database mounted.

3. Modify the archive path

Sql> alter system set log_archive_dest_1= ' LOCATION=+ARCHDG ' scope=spfile sid= ' btedb1 ';
System altered.
Sql> alter system set log_archive_dest_1= ' LOCATION=+ARCHDG ' scope=spfile sid= ' btedb2 ';
System altered.
Sql> alter system set log_archive_format= '%s_%t_%r.log ' scope=spfile sid= ' btedb1 ';
System altered.
Sql> alter system set log_archive_format= '%s_%t_%r.log ' scope=spfile sid= ' btedb2 ';
System altered.
sql> ALTER DATABASE Archivelog;
Database altered.
sql> ALTER DATABASE open;
Database altered.

4, adjust the mandatory filing time interval

Sql> Show parameter lag
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Archive_lag_target integer 0
Client_result_cache_lag Big Integer 3000
Plsql_ccflags string
Sql> alter system set Archive_lag_target = 1800 scope = Both SID = ' * ';
System altered.

5, shut down the database and restart

sql> shutdown Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
To start the two node databases
[Root@btedb1 bin]#./srvctl start database-d btedb

6. Modify Cluster_database

Sql> Show parameter Cluster_da
name                                   type        VALUE
------------------------------------- ----------------------------------------
cluster_database                      boolean     TRUE
cluster_database_instances           integer      2
If you need to adjust for false. Because in some data said, first turn to false and then adjust the archive, in fact, it is also possible!
Sql> alter system set CLUSTER_DATABASE=TRUE Scope=spfile;
System altered.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.