当前位置:网站首页>Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (3) -- set the database to archive mode
Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (3) -- set the database to archive mode
2022-06-25 02:23:00 【Rsda DBA_ WGX】
hold Oracle Database from Windows System migration to Linux Oracle Rac Cluster environment (3)—— Set the database to archive mode
Catalog
- hold Oracle Database from Windows System migration to Linux Oracle Rac Cluster environment (3)—— Set the database to archive mode
- One 、 Check if the database is in archive mode
- Two 、 Open archive mode
- 1、 Set nodes rac1 Archive mode
- (1) Close the node 2 Example
- 2、 At the node rac1 Perform the following operations on
- (1) Normal shutdown , Then start the database to mount state
- (2) Use alter database Command to open archive mode
- (3) Close the node 1 Example
- 3、 At the node rac2 Perform the following operations on
- (1) Then start the database to mount state
- (2) Use alter database Command to open archive mode
- (3) Close the node 1 Instance archiving mode of
- 4、 Open database , View archive status
- 3、 ... and 、 Set the location of the archive
One 、 Check if the database is in archive mode
-- node 1: No Archive Mode
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 15
Current log sequence 17
-- node 2: No Archive Mode
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Current log sequence 2
Two 、 Open archive mode
stay oracle rac In a cluster environment , To set a node to archive mode or non archive mode , Other nodes must be shut down .
1、 Set nodes rac1 Archive mode
(1) Close the node 2 Example
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
2、 At the node rac1 Perform the following operations on
(1) Normal shutdown , Then start the database to mount state
-- Close instance
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
-- Start database to mount state
SQL> startup mount
ORACLE instance started.
Total System Global Area 638853120 bytes
Fixed Size 2255952 bytes
Variable Size 507511728 bytes
Database Buffers 121634816 bytes
Redo Buffers 7450624 bytes
Database mounted.
(2) Use alter database Command to open archive mode
SQL> alter database archivelog;
Database altered.
(3) Close the node 1 Example
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
3、 At the node rac2 Perform the following operations on
(1) Then start the database to mount state
-- node rac2 In the off state
-- Start database to mount state
SQL> startup mount
ORACLE instance started.
Total System Global Area 638853120 bytes
Fixed Size 2255952 bytes
Variable Size 465568688 bytes
Database Buffers 163577856 bytes
Redo Buffers 7450624 bytes
Database mounted.
(2) Use alter database Command to open archive mode
SQL> alter database archivelog;
Database altered.
(3) Close the node 1 Instance archiving mode of
SQL> alter database archivelog;
Database altered.
4、 Open database , View archive status
-- node 1
SQL> startup
ORACLE instance started.
Total System Global Area 638853120 bytes
Fixed Size 2255952 bytes
Variable Size 507511728 bytes
Database Buffers 121634816 bytes
Redo Buffers 7450624 bytes
Database mounted.
Database opened.
-- View archive status
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
-- node 2
SQL> alter database open;
Database altered.
-- View archive status
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 15
Next log sequence to archive 17
Current log sequence 17
3、 ... and 、 Set the location of the archive
When the database is in archive mode , During log switching, the background process will automatically generate archive logs .
1、 View the number of archive processes
SQL> show parameter LOG_ARCHIVE_MAX_PROCESSES
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_max_processes integer 4
2、 Look at the archive
The current archive location is :/u01/app/oracle/flash_recovery_area/HISDB/archivelog
SQL> select sequence#, name from v$archived_log;
SEQUENCE# NAME
--------------------------------------------------------------------------------
17
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_17_kbr52
8s8_.arc
18
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_18_kbr52
d2g_.arc
19
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_19_kbr52
g87_.arc
2
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_2_2_kbr52d
rp_.arc
20
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_20_kbr52
hdo_.arc
3、 Modify the location of the archive log to :+BAK/hisdb/archivelog
modify log_archive_dest_1 The parameter points to the defined archive location :
SQL> alter system set log_archive_dest_1 = 'location=+BAK' scope = both sid='*';
System altered.
-- contrast log_archive_dest and log_archive_dest_1 Differences in setting archiving
-- alter system set log_archive_dest='+DATA'
-- alter system set log_archive_dest_1='location=+DATA'
4、 Look at the archive
-- Cut the log
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> select sequence#, name from v$archived_log;
SEQUENCE# NAME
--------------------------------------------------------------------------------
17
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_17_kbr52
8s8_.arc
18
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_18_kbr52
d2g_.arc
19
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_19_kbr52
g87_.arc
2
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_2_2_kbr52d
rp_.arc
20
/u01/app/oracle/flash_recovery_area/HISDB/archivelog/2022_06_17/o1_mf_1_20_kbr52
hdo_.arc
21
+BAK/hisdb/archivelog/2022_06_17/thread_1_seq_21.262.1107612429
22
+BAK/hisdb/archivelog/2022_06_17/thread_1_seq_22.263.1107612429
23
+BAK/hisdb/archivelog/2022_06_17/thread_1_seq_23.264.1107612429
24
+BAK/hisdb/archivelog/2022_06_17/thread_1_seq_24.265.1107612453
25
+BAK/hisdb/archivelog/2022_06_17/thread_1_seq_25.266.1107612453
26
+BAK/hisdb/archivelog/2022_06_17/thread_1_seq_26.267.1107612457
3
+BAK/hisdb/archivelog/2022_06_17/thread_2_seq_3.268.1107612601
4
+BAK/hisdb/archivelog/2022_06_17/thread_2_seq_4.269.1107612605
5
+BAK/hisdb/archivelog/2022_06_17/thread_2_seq_5.270.1107612607
14 rows selected.
边栏推荐
猜你喜欢

Use of hashcat

华为、阿里等大厂程序员真的好找对象吗?

How to monitor the log through the easycvr interface to observe the platform streaming?

Please run IDA with elevated permissons for local debugging.

How to quickly familiarize yourself with the code when you join a new company?

DDD概念复杂难懂,实际落地如何设计代码实现模型?

Pit entry machine learning: I. Introduction

一线城市软件测试工资——你拖后腿了吗
Cusdis - lightweight, privacy first open source comment system | chain of the city

【STL源码剖析】配置器(待补充)
随机推荐
ProcessOn制作ER过程(自定义)
Basic layout -qhboxlayout class, qvboxlayout class, qgridlayout class
Once beego failed to find bee after passing the go get command Exe's pit
谈谈飞书对开发工作的优势 | 社区征文
Sumati GameFi生态纵览,神奇世界中的元素设计
EasyCVR国标协议接入的通道,在线通道部分播放异常是什么原因?
Kaggle 专利匹配比赛金牌方案赛后总结
Cusdis - 轻量级、隐私优先的开源评论系统 | 倾城之链
[day 26] given the ascending array nums of n elements, find a function to find the subscript of target in nums | learn binary search
同花顺是正规平台吗?同花顺开户安全吗
【FPGA】串口以命令控制温度采集
DDD concept is complex and difficult to understand. How to design code implementation model in practice?
MOS tube related knowledge
Convert string array to list collection
调用系统函数安全方案
业务与技术双向结合构建银行数据安全管理体系
内网学习笔记(7)
如何通过EasyCVR接口监测日志观察平台拉流情况?
左手梦想 右手责任 广汽本田不光关注销量 还有儿童安全
把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(3)—— 把数据库设置为归档模式