In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Generally, archiving is enabled by default when installing databases, but because most of the newly created databases need to do a lot of data operations, to avoid disk capacity alarm problems caused by unnecessary archiving in the early stage, archiving will be closed when the database is built, and archiving will be closed when the database is built in the oracle RAC cluster, and how to open archiving in future management to make a record.
1. Oracle users log in to the database to view the status of the parameters in the database:
1. Check the status of the party:
SQL > archive log list
Database log mode No Archive Mode-non-archiving mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 59
Current log sequence 60
two。 Node instance status:
SQL > select instance_name,host_name,status from gv$instance
INSTANCE_NAME HOST_NAME STATUS
Orcl1 test1 OPEN
Orcl2 test2 OPEN
-the instance is enabled
3. Database cluster parameters:
SQL > show parameter cluster
NAME TYPE VALUE
-
Cluster_database boolean TRUE-View the parameters of the cluster. Cluster_database is represented as true and represented as cluster database, otherwise, non-cluster database
Cluster_database_instances integer 2
Cluster_interconnects string
two。 Start database archive mode
Note: the following operation is performed on only one node. In this example, the operation is performed by node 1.
1. Back up the parameter file:
SQL > create pfile='/u01/oracle/db/dbs/orcl-bak.ora' from spfile
two。 Modify cluster_database parameters
SQL > alter system set cluster_database=false scope=spfile sid='*';-modified to a non-clustered database. This parameter is static and requires the use of scope=spfile
3. Switch to the grid user, open another terminal to switch the user, and stop the database under the grid user:
[grid@test1 ~] $srvctl stop database-d orcl-stop the database consistently
[grid@test1 ~] $srvctl start instance-d orcl-I orcl1-o mount-Boot Node 1 to mount state
4. Node 1 switches to the oracle user login database:
Query database instance status:
SQL > select instance_name,status from v$instance
INSTANCE_NAME STATUS
--
Ora10g1 MOUNTED
Modify the database to archive mode:
SQL > alter database archivelog;-change the database to archive mode
Database altered.
Modify the cluster parameters back:
SQL > alter system set cluster_database=true scope=spfile sid='*';-changing the database to cluster mode
System altered.
5. Switch to the grid user, shut down the entire database, and restart:
[grid@test1 ~] $srvctl stop database-d orcl-shut down the database
[grid@test1 ~] $srvctl start database-d orcl-Open the database
6. Switch to oracle user to log in to the database to query the archive status:
SQL > archive log list;-View archiving mode
Database log mode Archive Mode-already in archiving mode
Automatic archival Enabled-automatic filing
Archive destination USE_DB_RECOVERY_FILE_DEST-Archive location is the value of parameter DB_RECOVERY_FILE_DEST
Oldest online log sequence 60-the following is information about sequence
Next log sequence to archive 61
Current log sequence 61
At this point, the filing and modification has been completed. You can modify the filing location as needed.
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: 0
*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.