In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to set CLUSTER_DATABASE parameters when Oracle RAC starts archiving". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to set CLUSTER_DATABASE parameters when Oracle RAC starts archiving".
Conclusion:
Database version Release 9.0.1 to 10.1, starting archive mode requires setting the CLUSTER_DATABASE parameter.
Database version 10.2 and higher version, you do not need to set the CLUSTER_DATABASE parameter to start archive mode.
So what is the purpose of the CLUSTER_DATABASE parameter?
Cluster_database
When you want multiple instances to mount the database at the same time, the CLUSTER_DATABASE parameter must be TRUE
When the CLUSTER_DATABASE parameter is FALSE, only one instance can mount the database.
If Oracle Database allows multiple instances to mount the same database concurrently, then the CLUSTER_DATABASE initialization parameter setting can make the database available to multiple instances. Database behavior depends on the setting:If CLUSTER_DATABASE is false (default) for the first instance that mounts a database, then only this instance can mount the database.If CLUSTER_DATABASE is true for the first instance, then other instances can mount the database if their CLUSTER_DATABASE parameter settings are set to true. The number of instances that can mount the database is subject to a predetermined maximum specified when creating the database.
Test starts 11.2.0.4.0 database archiving mode
View Archive Mod
SQL > archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination / u01/app/oracle/product/11.2.0/db_1/dbs/archOldest online log sequence 26Current log sequence 27
Create an archive directory
[grid@rac01 ~] $asmcmdASMCMD > lsARCH/DATA/OCR/ASMCMD > cd ARCHASMCMD > lsASMCMD > mkdir arch
Modify the archive directory and archive format
SQL > alter system set log_archive_format= 'cjcdb_%t_%s_%r.arc' scope=spfile sid='*';SQL > alter system set log_archive_dest_1='location=+ARCH/arch' scope=spfile sid='*'
Stop the database
[oracle@rac01 ~] $srvctl stop database-d cjcdb [oracle@rac01 ~] $srvctl status database-d cjcdbInstance cjcdb1 is not running on node rac01Instance cjcdb2 is not running on node rac02
Mount the database
[oracle@rac01] $srvctl start database-d cjcdb-o mount [oracle@rac01] $srvctl status database-d cjcdb-vInstance cjcdb1 is running on node rac01. Instance status: Mounted (Closed). Instance cjcdb2 is running on node rac02. Instance status: Mounted (Closed).
Start archive mode
[oracle@rac01 ~] $sqlplus / as sysdbaSQL > alter database archivelog
Restart the database
[oracle@rac01 ~] $srvctl stop database-d cjcdb [oracle@rac01 ~] $srvctl start database-d cjcdb
View Archiv
[oracle@rac02 ~] $sqlplus / as sysdbaSQL > archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination + ARC/archOldest online log sequence 1Next log sequence to archive 2Current log sequence 2
Reference: Doc ID 235158.1 and Doc ID 1186764.1
10.1 and previous versions start archive mode
How To Enable/Disable Archive Log Mode in Real Application Cluster Environment (Doc ID 235158.1)
APPLIES TO:Oracle Database-Enterprise Edition-Version 9.0.1.0 to 10.1.0.5 [Release 9.0.1 to 10.1] Information in this document applies to any platform.1. Shut down all instances. 2. Set the CLUSTER_DATABASE parameter to false on one instance in the parameter file. If using the server parameter file, make an entry for this: * .CLUSTER_DATABASE= FalseFor Modifying server parameter file (SPFILE): Alter system set cluster_database=FALSE scope=spfile sid='*';See Document 137483.1 How to Modify the Content of a SPFILE Parameter File 3. Set the LOG_ARCHIVE_START parameter to true. 4. Set the LOG_ARCHIVE_FORMAT and make sure the parameter containing the% t parameter includes the thread number in the archived logfile name.5. Set the cluster database wide LOG_ARCHIVE_DEST_1 parameter in the parameter file as follows: LOG_ARCHIVE_DEST_1='LOCATION=$ORACLE_BASE/oradata//archive' Note: You can multiplex the destination to up to ten locations, refer to:Document 66433.1 Oracle8i-Multiple Archive Destinations and Remote Archival To specify the archive log destinations on a per instance basis for a two-instance cluster database, for example Set the parameter as follows: .log _ ARCHIVE_DEST_1='LOCATION=$ORACLE_BASE/oradata//archive'. Log _ ARCHIVE_DEST_1='LOCATION=$ORACLE_BASE/oradata//archive' 6. Mount the database (in exclusive mode) for the instance on which you have set CLUSTER_DATABASE to false. 7. Set the database in ARCHIVELOG mode: SQL > ALTER DATABASE ARCHIVELOG; 8. Shutdown the instance. SQL > SHUTDOWN IMMEDIATE;9. Change the value of the CLUSTER_DATABASE parameter back to true.10. Startup all instances.To disable archive logging, follow the same steps but use the NOARCHIVELOG clause of the ALTER DATABASE statement.
Version 10.2 starts archiving mode
How To Enable/Disable Archive Logging In RAC Environment for 10.2 and higher version (Doc ID 1186764.1)
APPLIES TO:Oracle Database Cloud Service-Version N-Version An and laterOracle Database-Enterprise Edition-Version 10.2.0.1 and laterOracle Database Cloud Schema Service-Version N-An and laterOracle Database Exadata Express Cloud Service-Version N-and laterOracle Database Exadata Express Cloud Service An and laterOracle Database Exadata Cloud Machine-Version N-An and laterInformation in this document applies to any platform.SOLUTION1. The following steps need to be taken to enable archive logging in a RAC database environment:-- shutdown immediate all database instances$ srvctl stop database-d-startup database in mount mode$ srvctl start database-d-o mount-- enable archive logging$ sqlplus / as sysdbasql > alter database archivelog;sql > exit;-- stop database$ srvctl stop database-d-- restart all database instances$ srvctl start database-d-- verify archiving is enabled/disabled by means of:sql > archivelog list You might need to set your log_archive_dest (_ n) parameters to a shared location in each spfile, but the log_archive_start parameter does not need to be set anymore as of 10g (see Note 274302.1). 2. To disable archive logging, follow the same steps but use the NOARCHIVELOG clause of the ALTER DATABASE statement. Thank you for your reading, the above is the content of "how to set CLUSTER_DATABASE parameters when Oracle RAC starts archiving". After the study of this article, I believe you have a deeper understanding of how to set CLUSTER_DATABASE parameters when Oracle RAC starts archiving, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 296
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.