文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

oracle 11g DataGuad如何修改sys密码

2024-04-02 19:55

关注

这篇文章主要介绍oracle 11g DataGuad如何修改sys密码,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

一、环境描述

    database version:11.2.0.4

    单实例DataGuard

    rhel 6.6

二、实验过程

  1. 主库修改sys密码

SQL> alter user sys identified by oracle321;

User altered.

SQL> alter system switch logfile;

System altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /arch
Oldest online log sequence     125
Next log sequence to archive   127
Current log sequence           127
SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /arch
Oldest online log sequence     127
Next log sequence to archive   129
Current log sequence           129

2.备库查看是否正常同步数据

SQL> select applied,sequence# from v$archived_log order by 2;

APPLIED    SEQUENCE#
--------- ----------
YES              106
YES              107
YES              108
YES              109
YES              110
YES              111
YES              112
YES              113
YES              114
YES              115
YES              116

APPLIED    SEQUENCE#
--------- ----------
YES              117
YES              118
YES              119
YES              120
YES              121
YES              122
YES              123
YES              124
YES              125
YES              126
YES              127

APPLIED    SEQUENCE#
--------- ----------
IN-MEMORY        128

3.备库取消应用后,再启用mrp进程查看

SQL> alter database recover managed standby database cancel;

SQL> alter database recover managed standby database using current logfile disconnect from session;

SQL> select applied,sequence# from v$archived_log order by 2;

APPLIED    SEQUENCE#
--------- ----------
YES              107
YES              108
YES              109
YES              110
YES              111
YES              112
YES              113
YES              114
YES              115
YES              116
YES              117

APPLIED    SEQUENCE#
--------- ----------
YES              118
YES              119
YES              120
YES              121
YES              122
YES              123
YES              124
YES              125
YES              126
YES              127
YES              128

APPLIED    SEQUENCE#
--------- ----------
YES              129
IN-MEMORY        130

4.重启备库,然后启用mrp进程,再观察

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

Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1526729768 bytes
Database Buffers          117440512 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> select message from v$dataguard_status;

MESSAGE
--------------------------------------------------------------------------------
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC2: Becoming the heartbeat ARCH
ARC2: Becoming the active heartbeat ARCH
Error 1017 received logging on to the standby
FAL[client, ARC3]: Error 16191 connecting to orcl for fetching gap sequence  --报错
ARC4: Archival started
Attempt to start background Managed Standby Recovery process

MESSAGE
--------------------------------------------------------------------------------
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply

13 rows selected.

5.主库同步密码文件

<roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/dbs>$scp orapworcl roidb02:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapworcldg
oracle@roidb02's password:
orapworcl                                                                                          100% 1536     1.5KB/s   00:00    
<roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/dbs>$

SQL> select message from v$dataguard_status;

MESSAGE
--------------------------------------------------------------------------------
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC2: Becoming the heartbeat ARCH
ARC2: Becoming the active heartbeat ARCH
Error 1017 received logging on to the standby
FAL[client, ARC3]: Error 16191 connecting to orcl for fetching gap sequence
ARC4: Archival started
Attempt to start background Managed Standby Recovery process

MESSAGE
--------------------------------------------------------------------------------
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply
RFS[1]: Assigned to RFS process 2723
RFS[2]: Assigned to RFS process 2725
RFS[3]: Assigned to RFS process 2727
RFS[4]: Assigned to RFS process 2729
ARC4: Beginning to archive thread 1 sequence 131 (1137893-1138457)
ARC4: Completed archiving thread 1 sequence 131 (0-0)
Media Recovery Log /arch/1_132_955700418.dbf
Media Recovery Log /arch/1_133_955700418.dbf
Media Recovery Log /arch/1_134_955700418.dbf

MESSAGE
--------------------------------------------------------------------------------
Media Recovery Waiting for thread 1 sequence 135
Primary database is in MAXIMUM PERFORMANCE mode
RFS[5]: Assigned to RFS process 2731
ARC1: Beginning to archive thread 1 sequence 135 (1139616-1140903)
ARC1: Completed archiving thread 1 sequence 135 (0-0)
Media Recovery Log /arch/1_135_955700418.dbf
Media Recovery Waiting for thread 1 sequence 136 (in transit)
ARC4: Beginning to archive thread 1 sequence 136 (1140903-1141035)
ARC4: Completed archiving thread 1 sequence 136 (0-0)
Media Recovery Waiting for thread 1 sequence 137 (in transit)

32 rows selected.

以上是“oracle 11g DataGuad如何修改sys密码”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     807人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     351人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     314人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     433人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     221人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯