当前位置:网站首页>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.
边栏推荐
- AI服装生成,帮你完成服装设计的最后一步
- 非凸联合创始人李佐凡:将量化作为自己的终身事业
- When they are in private, they have a sense of propriety
- 保险APP适老化服务评测分析2022第06期
- Do you know your ABC
- 消息称一加将很快更新TWS耳塞、智能手表和手环产品线
- Qt中使用QDomDocument操作XML文件
- 探索C语言程序奥秘——C语言程序编译与预处理
- Taishan Office Technology Lecture: a simple study of Chinese punctuation in vertical arrangement
- EasyCVR平台EHOME协议接入,视频播放出现断流是什么原因?
猜你喜欢

做软件安全测试的作用,如何寻找软件安全测试公司出具报告?

分布式事务解决方案和代码落地
Cusdis - 轻量级、隐私优先的开源评论系统 | 倾城之链

EasyCVR平台EHOME协议接入,视频播放出现断流是什么原因?

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

内网学习笔记(7)

Intranet learning notes (7)

Pit entry machine learning: I. Introduction

消息称一加将很快更新TWS耳塞、智能手表和手环产品线

How to monitor the log through the easycvr interface to observe the platform streaming?
随机推荐
Left hand dreams right hand responsibilities GAC Honda not only pays attention to sales but also children's safety
Multimodal emotion recognition_ Research on emotion recognition based on multimodal fusion
【直播回顾】战码先锋第七期:三方应用开发者如何为开源做贡献
Of the seven levels of software testers, it is said that only 1% can achieve level 7
|遇到bug怎么分析,专业总结分析来了
3 years of testing experience. I don't even understand what I really need on my resume. I need 20K to open my mouth?
消息称一加将很快更新TWS耳塞、智能手表和手环产品线
Processon producer process (customized)
|How to analyze bugs? Professional summary and analysis
入坑机器学习:一,绪论
入职一家新公司,如何快速熟悉代码?
Constant current circuit composed of 2 NPN triodes
Application of TSDB in civil aircraft industry
【Proteus仿真】Arduino UNO+继电器控制照明设备
Kaggle 专利匹配比赛金牌方案赛后总结
What is the reason for the disconnection of video playback due to the EHOME protocol access of easycvr platform?
产业互联网的概念里有「互联网」字眼,但却是一个和互联网并不关联的存在
算力服务网络:一场多元融合的系统革命
左手梦想 右手责任 广汽本田不光关注销量 还有儿童安全
3年测试经验,连简历上真正需要什么都没搞明白,张口就要20k?