标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-01595 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,748)
- DB2 (22)
- MySQL (75)
- Oracle (1,594)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (162)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (68)
- Oracle Bug (8)
- Oracle RAC (54)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (584)
- Oracle安装升级 (96)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (84)
- PostgreSQL (30)
- pdu工具 (6)
- PostgreSQL恢复 (9)
- SQL Server (30)
- SQL Server恢复 (11)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (38)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (21)
-
最近发表
- Oracle 19c 202504补丁(RUs+OJVM)-19.27
- Oracle Recovery Tools修复ORA-600 6101/kdxlin:psno out of range故障
- pdu完美支持金仓数据库恢复(KingbaseES)
- 虚拟机故障引起ORA-00310 ORA-00334故障处理
- pg创建gbk字符集库
- PostgreSQL运行日志管理
- ora-600 kdsgrp1 错误描述
- GAM、SGAM 或 PFS 页上存在页错误处理
- ORA-600 krhpfh_03-1208
- VMware勒索加密恢复(vmdk勒索恢复)
- ORA-39773: parse of metadata stream failed故障处理
- sql数据库备份失败—失败: 23(数据错误(循环冗余检查)
- vmdk文件被加密恢复(虚拟机文件加密)
- 差点被误操作的ORA-600 kcratr_nab_less_than_odr故障
- win平台19c 打patch遭遇2个小问题汇总
- pg单个数据库目录恢复-pdu恢复单个数据库目录数据
- pg删除数据恢复—pdu恢复pg delete数据
- .[OnlyBuy@cyberfear.com].REVRAC勒索mysql恢复
- 表dml操作权限授权给public,导致只读用户失效
- 21c数据库恢复遭遇ora-600 ktugct: corruption detected
标签归档:12c switchover
Oracle 12c active dataguard switchover
从12.1开始adg的切换发生了一些改变,直接使用alter database switchover to [target standby db_unique_name] verify; alter database switchover to [target standby db_unique_name]; 即可完成切换,以下是一次生产环境的具体操作步骤
主库操作
SQL> select database_role from v$database; DATABASE_ROLE ---------------- PRIMARY SQL> alter database switchover to xifenfei verify; 数据库已更改。 --alert日志 Sun Jun 25 09:07:08 2017 diag_adl:SWITCHOVER VERIFY: Send VERIFY request to switchover target xifenfei diag_adl:SWITCHOVER VERIFY COMPLETE SQL> alter database switchover to xifenfei; 数据库已更改。 --alert日志 Sun Jun 25 09:07:46 2017 diag_adl:Starting switchover [Process ID: 37024] Sun Jun 25 09:07:46 2017 diag_adl:ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY [Process Id: 37024] (xifenfei) diag_adl:Waiting for target standby to receive all redo Sun Jun 25 09:07:46 2017 diag_adl:Waiting for all non-current ORLs to be archived... Sun Jun 25 09:07:46 2017 diag_adl:All non-current ORLs have been archived. Sun Jun 25 09:07:46 2017 diag_adl:Waiting for all FAL entries to be archived... Sun Jun 25 09:07:46 2017 diag_adl:All FAL entries have been archived. Sun Jun 25 09:07:46 2017 diag_adl:Waiting for dest_id 2 to become synchronized... Sun Jun 25 09:07:47 2017 diag_adl:Active, synchronized Physical Standby switchover target has been identified diag_adl:Preventing updates and queries at the Primary diag_adl:Generating and shipping final logs to target standby diag_adl:Switchover End-Of-Redo Log thread 1 sequence 96534 has been fixed diag_adl:Switchover: Primary highest seen SCN set to 0x3.0x109d7502 diag_adl:ARCH: Noswitch archival of thread 1, sequence 96534 diag_adl:ARCH: End-Of-Redo Branch archival of thread 1 sequence 96534 diag_adl:ARCH: LGWR is scheduled to archive destination LOG_ARCHIVE_DEST_2 after log switch diag_adl:ARCH: Standby redo logfile selected for thread 1 sequence 96534 for destination LOG_ARCHIVE_DEST_2 diag_adl:ARCH: Archiving is disabled due to current logfile archival diag_adl:Primary will check for some target standby to have received all redo diag_adl:Waiting for target standby to apply all redo diag_adl:Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/xifenfeildg/xifenfei/trace/xifenfei_ora_37024.trc diag_adl:Converting the primary database to a new standby database diag_adl:Clearing standby activation ID 612004791 (0x247a73b7) diag_adl:The primary database controlfile was created using the diag_adl:'MAXLOGFILES 16' clause. diag_adl:There is space for up to 11 standby redo logfiles diag_adl:Use the following SQL commands on the standby database to create diag_adl:standby redo logfiles that match the primary database: diag_adl:ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 1073741824; diag_adl:ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 1073741824; diag_adl:ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 1073741824; diag_adl:ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 1073741824; diag_adl:ALTER DATABASE ADD STANDBY LOGFILE 'srl5.f' SIZE 1073741824; diag_adl:ALTER DATABASE ADD STANDBY LOGFILE 'srl6.f' SIZE 1073741824; diag_adl:Archivelog for thread 1 sequence 96534 required for standby recovery diag_adl:Switchover: Primary controlfile converted to standby controlfile succesfully. diag_adl:Switchover: Complete - Database shutdown required diag_adl:Sending request(convert to primary database) to switchover target xifenfei Sun Jun 25 09:07:58 2017 diag_adl:Switchover complete. Database shutdown required diag_adl:USER (ospid: 37024): terminating the instance Sun Jun 25 09:07:59 2017 diag_adl:Instance terminated by USER, pid = 37024 diag_adl:Shutting down instance (abort) diag_adl:License high water mark = 527 Sun Jun 25 09:07:59 2017 Instance shutdown complete
备库alert日志
Sun Jun 25 09:05:54 2017 SWITCHOVER VERIFY BEGIN SWITCHOVER VERIFY COMPLETE Sun Jun 25 09:06:35 2017 RFS[107]: Assigned to RFS process (PID:7330) RFS[107]: Selected log 12 for thread 1 sequence 96534 dbid 588725663 branch 916962073 Sat Jun 24 20:06:35 2017 Archived Log entry 100576 added for thread 1 sequence 96534 ID 0x247a73b7 dest 1: Sat Jun 24 20:06:35 2017 Resetting standby activation ID 612004791 (0x247a73b7) Sat Jun 24 20:06:35 2017 Media Recovery End-Of-Redo indicator encountered Sat Jun 24 20:06:35 2017 Media Recovery Continuing Media Recovery Waiting for thread 1 sequence 96535 Sun Jun 25 09:06:36 2017 SWITCHOVER: received request 'ALTER DTABASE COMMIT TO SWITCHOVER TO PRIMARY' from primary database. Sun Jun 25 09:06:36 2017 ALTER DATABASE SWITCHOVER TO PRIMARY (xifenfei) Maximum wait for role transition is 15 minutes. Switchover: Media recovery is still active Role Change: Canceling MRP - no more redo to apply Sat Jun 24 20:06:36 2017 MRP0: Background Media Recovery cancelled with status 16037 Sat Jun 24 20:06:36 2017 Errors in file /u01/app/oracle/diag/rdbms/xifenfei/xifenfei/trace/xifenfei_pr00_4590.trc: ORA-16037: user requested cancel of managed recovery operation Managed Standby Recovery not using Real Time Apply Recovery interrupted! Sat Jun 24 20:06:36 2017 Errors in file /u01/app/oracle/diag/rdbms/xifenfei/xifenfei/trace/xifenfei_pr00_4590.trc: ORA-16037: user requested cancel of managed recovery operation Sat Jun 24 20:06:37 2017 MRP0: Background Media Recovery process shutdown (xifenfei) Sun Jun 25 09:06:38 2017 Role Change: Canceled MRP Killing 2 processes(PIDS:7328,4704)(all RFS) in order to disallow current and future RFS connections.Requested by OS process 7334 Stopping Emon pool All dispatchers and shared servers shutdown CLOSE: killing server sessions. Active process 5428 user 'oracle' program 'oracle@kage7.hk0620.com (TNS V1-V3)' Active process 5161 user 'oracle' program 'oracle@kage7.hk0620.com' ………… Active process 5428 user 'oracle' program 'oracle@kage7.hk0620.com (TNS V1-V3)' Active process 5161 user 'oracle' program 'oracle@kage7.hk0620.com' Active process 5178 user 'oracle' program 'oracle@kage7.hk0620.com' CLOSE: all sessions shutdown successfully. Stopping Emon pool Sat Jun 24 20:06:43 2017 SMON: disabling cache recovery Sat Jun 24 20:06:44 2017 Buffer Cache Full DB Caching mode changing from FULL CACHING DISABLED to FULL CACHING ENABLED Sun Jun 25 09:06:44 2017 Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/xifenfei/xifenfei/trace/xifenfei_rmi_7334.trc SwitchOver after complete recovery through change 13163656450 Online logfile pre-clearing operation disabled by switchover Online log /u01/app/oracle/oradata/xifenfei/redo01n.log: Thread 1 Group 1 was previously cleared Online log /u01/app/oracle/fast_recovery_area/xifenfei/redo01n.log: Thread 1 Group 1 was previously cleared Online log /u01/app/oracle/oradata/xifenfei/redo02n.log: Thread 1 Group 2 was previously cleared Online log /u01/app/oracle/fast_recovery_area/xifenfei/redo02n.log: Thread 1 Group 2 was previously cleared Online log /u01/app/oracle/oradata/xifenfei/redo03n.log: Thread 1 Group 3 was previously cleared Online log /u01/app/oracle/fast_recovery_area/xifenfei/redo03n.log: Thread 1 Group 3 was previously cleared Online log /u01/app/oracle/oradata/xifenfei/redo04n.log: Thread 1 Group 4 was previously cleared Online log /u01/app/oracle/fast_recovery_area/xifenfei/redo04n.log: Thread 1 Group 4 was previously cleared Online log /u01/app/oracle/oradata/xifenfei/redo05n.log: Thread 1 Group 5 was previously cleared Online log /u01/app/oracle/fast_recovery_area/xifenfei/redo05n.log: Thread 1 Group 5 was previously cleared Standby became primary SCN: 13163656448 Switchover: Complete - Database mounted as primary SWITCHOVER: completed request from primary database. Sat Jun 24 20:07:12 2017 ARC0: Becoming the 'no SRL' ARCH
原备库(现主库)操作
SQL> conn / as sysdba Connected. SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- -------------------- PRIMARY MOUNTED SQL> alter database open; Database altered.
原主库(现备库)操作
[oracle@localhost scripts]$ ss SQL*Plus: Release 12.1.0.2.0 Production on 星期日 6月 25 09:09:40 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved. 已连接到空闲例程。 SQL> startup ORACLE 例程已经启动。 Total System Global Area 8.5899E+10 bytes Fixed Size 7654304 bytes Variable Size 1.2616E+10 bytes Database Buffers 7.3014E+10 bytes Redo Buffers 260780032 bytes 数据库装载完毕。 数据库已经打开。 SQL> alter database recover managed standby database disconnect; 数据库已更改。