当前位置:网站首页>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.
边栏推荐
- 同花顺是正规平台吗?同花顺开户安全吗
- 02-Epicor二次开发常用代码
- 软件测试人员的7个等级,据说只有1%的人能做到级别7
- Talking about the advantages of flying book in development work | community essay solicitation
- Experience of epidemic prevention and control, home office and online teaching | community essay solicitation
- 进入阿里做测试员遥不可及?这里或许有你想要的答案
- js正则匹配数字、大小写字母、下划线、中线和点[通俗易懂]
- 非凸联合创始人李佐凡:将量化作为自己的终身事业
- 都2022年了,你还不了解什么是性能测试?
- ProcessOn制作ER过程(自定义)
猜你喜欢

It's 2022, and you still don't know what performance testing is?

Sumati GameFi生态纵览,神奇世界中的元素设计

yarn : 无法加载文件 C:\Users\xxx\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本

3年测试经验,连简历上真正需要什么都没搞明白,张口就要20k?

Please run IDA with elevated permissons for local debugging.

Processon producer process (customized)
Cusdis - lightweight, privacy first open source comment system | chain of the city

When they are in private, they have a sense of propriety

Once beego failed to find bee after passing the go get command Exe's pit

业务与技术双向结合构建银行数据安全管理体系
随机推荐
Taishan Office Technology Lecture: a simple study of Chinese punctuation in vertical arrangement
Multimodal emotion recognition_ Research on emotion recognition based on multimodal fusion
Smartctl opens the device and encounters permission denied problem troubleshooting process record
当他们在私域里,掌握了分寸感
beescms网站渗透测试和修复意见「建议收藏」
Intranet learning notes (6)
LINQ query (3)
PE文件基础结构梳理
AI服装生成,帮你完成服装设计的最后一步
疫情防控,居家办公,网上授课之心得 | 社区征文
非凸联合创始人李佐凡:将量化作为自己的终身事业
Cusdis - lightweight, privacy first open source comment system | chain of the city
如何选择正规安全的外汇交易平台?
产业互联网的概念里有「互联网」字眼,但却是一个和互联网并不关联的存在
[analysis of STL source code] functions and applications of six STL components (directory)
Rod and Schwartz cooperated with ZhongGuanCun pan Lianyuan Institute to carry out 6G technology research and early verification
入职一家新公司,如何快速熟悉代码?
对进程内存的实践和思考
Viewing MySQL password on Linux_ MySQL forgets password "suggestions collection" under Linux
02-Epicor二次开发常用代码