重庆思庄Oracle、Redhat认证学习论坛

标题: oracle 11g DataGuad如何修改sys密码 [打印本页]

作者: jiawang    时间: 2024-1-9 11:36
标题: oracle 11g DataGuad如何修改sys密码
本帖最后由 jiawang 于 2024-1-9 11:51 编辑

一、环境描述
    database version:11.2.0.4
    单实例 DataGuard
    rhel 6.5

二、实验过程
SQL> alter user sys identified by oracle321;
User altered.

SQL> alter system switch logfile;
System altered.

2.备库取消应用
SQL> alter database recover managed standby database cancel;

Database altered.

3.重启备库
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 6413680640 bytes
Fixed Size                  2265224 bytes
Variable Size            1610616696 bytes
Database Buffers         4781506560 bytes
Redo Buffers               19292160 bytes
Database mounted.
Database opened.

4.主库拷贝密码文件到备库
[oracle@ dbs]$ scp orapwegret oracle@172.16.96.71:$ORACLE_HOME/dbs
oracle@172.16.96.71's password:
orapwegret                                                                                                                                                        100% 1536     1.5KB/s   00:00   
[oracle@ dbs]$

5.再启用mrp进程查看
SQL> alter database recover managed standby database using current logfile disconnect from session;

6.验证
SQL> select message from v$dataguard_status;

MESSAGE
--------------------------------------------------------------------------------
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC2: Becoming the 'no FAL' ARCH
ARC1: Becoming the heartbeat ARCH
ARC1: Becoming the active heartbeat ARCH
ARC3: Archival started
RFS[1]: Assigned to RFS process 51650
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Assigned to RFS process 51652
ARC2: Beginning to archive thread 1 sequence 31950 (14519360191421-1451936022552

MESSAGE
--------------------------------------------------------------------------------
2)

ARC2: Completed archiving thread 1 sequence 31950 (0-0)
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply
Media Recovery Log /oradata/archive/1_31949_1050099923.dbf
Media Recovery Log /oradata/archive/1_31950_1050099923.dbf
Media Recovery Waiting for thread 1 sequence 31951 (in transit)
ARC2: Beginning to archive thread 1 sequence 31951 (14519360225522-1451936025820
6)

MESSAGE
--------------------------------------------------------------------------------

ARC2: Completed archiving thread 1 sequence 31951 (0-0)
Media Recovery Waiting for thread 1 sequence 31952 (in transit)

21 rows selected.

SQL>


SQL> select process,status,thread#,sequence# from v$managed_standby;

PROCESS   STATUS          THREAD#  SEQUENCE#
--------- ------------ ---------- ----------
ARCH      CLOSING               1      31952
ARCH      CONNECTED             0          0
ARCH      CLOSING               1      31951
ARCH      CONNECTED             0          0
RFS       IDLE                  0          0
RFS       IDLE                  0          0
RFS       IDLE                  1      31953
MRP0      APPLYING_LOG          1      31953

8 rows selected.





欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2