当前位置:网站首页>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.
边栏推荐
- 【Proteus仿真】Arduino UNO+数码管显示4x4键盘矩阵按键
- 记一次beego通过go get命令后找不到bee.exe的坑
- psql 列转行
- 非凸联合创始人李佐凡:将量化作为自己的终身事业
- Left hand dreams right hand responsibilities GAC Honda not only pays attention to sales but also children's safety
- Do you know your ABC
- DDD概念复杂难懂,实际落地如何设计代码实现模型?
- Please run IDA with elevated permissons for local debugging.
- EasyCVR平台EHOME协议接入,视频播放出现断流是什么原因?
- 背了八股文,六月赢麻了……
猜你喜欢
华为、阿里等大厂程序员真的好找对象吗?
【直播回顾】战码先锋第七期:三方应用开发者如何为开源做贡献
Are programmers from Huawei, Alibaba and other large manufacturers really easy to find?
进入阿里做测试员遥不可及?这里或许有你想要的答案
Can automate - 10k, can automate - 20K, do you understand automated testing?
The role of software security testing, how to find a software security testing company to issue a report?
【STL源码剖析】STL六大组件功能与运用(目录)
How to quickly familiarize yourself with the code when you join a new company?
入职一家新公司,如何快速熟悉代码?
How to monitor the log through the easycvr interface to observe the platform streaming?
随机推荐
When an interface has an exception, how do you analyze the exception?
谈谈飞书对开发工作的优势 | 社区征文
Intranet learning notes (7)
[live review] battle code pioneer phase 7: how third-party application developers contribute to open source
内网学习笔记(5)
Explanation of FTP protocol
调用系统函数安全方案
背了八股文,六月赢麻了……
记一次beego通过go get命令后找不到bee.exe的坑
入职一家新公司,如何快速熟悉代码?
|How to analyze bugs? Professional summary and analysis
Post competition summary of kaggle patent matching competition
Is it out of reach to enter Ali as a tester? Here may be the answer you want
如何卸载cuda
Are programmers from Huawei, Alibaba and other large manufacturers really easy to find?
Experience of epidemic prevention and control, home office and online teaching | community essay solicitation
把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(2)——将数据库转换为集群模式
多模态情感识别_多模态融合的情感识别研究「建议收藏」
把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(1)——迁移数据到节点1
当他们在私域里,掌握了分寸感