Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

RAC enables database archiving

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

RAC enables database archiving:

The first step is to determine the path to the archive:

1. Switch to the grid user and use the asmcmd command to see which path to store the archive under.

Execute on Node 1

[root@yang1 ~] # su-grid

[grid@yang1 ~] $sqlplus / as sysasm

SQL > select name from v$asm_diskgroup

NAME

-

DATA

OCR

FRA

SQL > alter system set log_archive_dest_1='LOCATION=+RECOC1/yang/archivelog' scope=spfile sid='yang1'

Diskgroup altered.

SQL > alter system set log_archive_dest_1='LOCATION= + RECOC1/yang/archivelog 'scope=spfile sid=' yang 2'

Diskgroup altered.

two。 Use the shutdown immediate command to close two instances of a node

Execute on node yang1

SQL > shutdown immediate

Execute on node yang 2

SQL > shutdown immediate

3. Turn on archiving mode

Execute on yang1

SQL > startup mount

SQL > alter database archivelog

Database altered.

SQL > archive log list

Database log mode Archive Mode

Automatic archival Enabled

Archive destination + RECOC1/yang/archivelog

Oldest online log sequence 48

Next log sequence to archive 50

Current log sequence 50

Modified successfully on Node 1.

Execute execution on node yang2

SQL > startup mount

SQL > alter database archivelog

Database altered.

SQL > archive log list

Database log mode No Archive Mode

Automatic archival Disabled

Archive destination + RECOC1/yang/archivelog

Oldest online log sequence 53

Current log sequence 55

4. Open the database

Execute separately on the node yang1,yang2

SQL > alter database open

5. Verify that the archive file was successfully generated at the target location

Execute on node yang1

SQL > alter system switch logfile

System altered.

[oracle@yang1 ~] $su-grid

[grid@yang1 ~] $asmcmd

ASMCMD > cd yang/archivelog/2018_11_29

ASMCMD > pwd

+ RECOC1/RISKDB/archivelog/2018_11_29

ASMCMD > ls

Thread_1_seq_55.41248.993493281

Thread_1_seq_56.41243.993493295

Thread_2_seq_49.41922.993492943

Thread_2_seq_50.40857.993493383

Thread_2_seq_51.41798.993493589

You can use the same method to verify that the node is successful.

Execute alter system switch logfile on the node yang2 according to this method and switch several times to make sure that the corresponding archive log is generated for each switch.

Explain a little bit about the path of archiving:

If the path to the archive is not set under grid

Oracle users will put the archive in db_recovery_file_dest will use db_recovery_file_dest_size, if the archive db_recovery_file_dest_size big Lesser Fullness of Grain, the database will hang live.

Db_recovery_file_dest string + RECOC1

Db_recovery_file_dest_size big integer 5000000M

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: 255

*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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report