前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Oracle 更改归档文件到ASM磁盘

Oracle 更改归档文件到ASM磁盘

作者头像
星哥玩云
发布2022-08-17 21:27:42
8610
发布2022-08-17 21:27:42
举报
文章被收录于专栏:开源部署开源部署

01,配置磁盘路径

  📁 ,nide1节点

[Oracle@node1 ~]$ su - grid Password: [grid@node1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 11 11:10:38 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options

SQL> select name from v$asm_diskgroup;

NAME ------------------------------ OCR_VOTE ORADATA01 ORADATA02

SQL> alter diskgroup ORADATA01 add directory '+ORADATA01/arch1';

Diskgroup altered.

  📂,node2节点

[oracle@node2 ~]$ su - grid Password: [grid@node2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 11 11:10:38 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options

SQL> select name from v$asm_diskgroup;

NAME ------------------------------ OCR_VOTE ORADATA01 ORADATA02

SQL> alter diskgroup ORADATA01 add directory '+ORADATA01/arch2';

Diskgroup altered.

02,设置归档地址

  登入节点一:node1

[grid@node1 ~]$ su - oracle Password: [oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 11 11:09:48 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME ---------------- oracle1

SQL> archive log list; Database log mode          No Archive Mode Automatic archival          Disabled Archive destination          /oracle/app/oracle/product/11.2.0/db_1/dbs/arch Oldest online log sequence    61 Current log sequence          62 SQL> alter system set log_archive_dest_1='LOCATION=+ORADATA01/arch1' scope=spfile sid='oracle1';

System altered.

SQL> alter system set log_archive_dest_1='LOCATION=+ORADATA01/arch2' scope=spfile sid='oracle2'; System altered.

03,重启node1,node2节点并更改为归档模式

  node1:

SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started.

Total System Global Area 2505338880 bytes Fixed Size            2255832 bytes Variable Size          738198568 bytes Database Buffers    1761607680 bytes Redo Buffers            3276800 bytes Database mounted. SQL> alter database archivelog;

Database altered.

SQL> shutdown immediate; ORA-01109: database not open

Database dismounted. ORACLE instance shut down. SQL> startup  -- 启动 ORACLE instance started.

Total System Global Area 2505338880 bytes Fixed Size            2255832 bytes Variable Size          738198568 bytes Database Buffers    1761607680 bytes Redo Buffers            3276800 bytes Database mounted. Database opened. SQL> archive log list Database log mode          Archive Mode Automatic archival          Enabled Archive destination          +ORADATA01/arch1 Oldest online log sequence    61 Next log sequence to archive  62 Current log sequence          62 SQL> alter system switch logfile;  --- 刷写日志 System altered.

  node2:

SQL> archive log list; Database log mode          No Archive Mode Automatic archival          Disabled Archive destination          /oracle/app/oracle/product/11.2.0/db_1/dbs/arch Oldest online log sequence    5 Current log sequence          6 SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started.

Total System Global Area 2505338880 bytes Fixed Size            2255832 bytes Variable Size          738198568 bytes Database Buffers    1761607680 bytes Redo Buffers            3276800 bytes Database mounted. SQL> alter database archivelog;

Database altered.

SQL> shutdown immediate; ORA-01109: database not open

Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started.

Total System Global Area 2505338880 bytes Fixed Size            2255832 bytes Variable Size          738198568 bytes Database Buffers    1761607680 bytes Redo Buffers            3276800 bytes Database mounted. Database opened. SQL> archive log list Database log mode          Archive Mode Automatic archival          Enabled Archive destination          +ORADATA01/arch2 Oldest online log sequence    6 Next log sequence to archive  7 Current log sequence          7 SQL> alter system switch logfile;

System altered.

04,验证归档

[oracle@node2 ~]$ su - grid Password: [grid@node2 ~]$ asmcmd ASMCMD> ls OCR_VOTE/ ORADATA01/ ORADATA02/ ASMCMD> cd ORADATA01 ASMCMD> ls ORACLE/ arch1/ arch2/ ASMCMD> cd arch2 ASMCMD> ls 2_7_1002129034.dbf ASMCMD> cd ../ ASMCMD> cd arch1 ASMCMD> ls 1_62_1002129034.dbf 2_6_1002129034.dbf ASMCMD> exit

发现已经有文档了

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
命令行工具
腾讯云命令行工具 TCCLI 是管理腾讯云资源的统一工具。使用腾讯云命令行工具,您可以快速调用腾讯云 API 来管理您的腾讯云资源。此外,您还可以基于腾讯云的命令行工具来做自动化和脚本处理,以更多样的方式进行组合和重用。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档