Dynamically Change Oracle Data Guard Broker Fast-Start Failover Target
可以通过 SET FAST_START FAILOVER TARGET 这条命令动态改变 fast-start failover 目标备库。
SET FAST_START FAILOVER TARGET TO Boston NOWAIT;
The NOWAIT
clause specifies that the fast-start failover target setting must be updated immediately.
Simplified Database Parameter Management in Oracle Data Guard Broker
可以通过alter system 在sql plus管理相关参数或者在edit database 管理,在dgmgrl修改的参数立刻在目标库执行。
EDIT DATABASE 'North_sales' SET PARAMETER log_archive_trace = 1 'SCOPE = BOTH';
Observe-only Mode for Oracle Data Guard Broker's Fast-Start Failover
Observe-only模式允许自动测试数据库 fast-start failover,而不会对生产数据库(主从角色)有影响。
ENABLE FAST_START FAILOVER OBSERVE ONLY;
主库宕机的时候并不会failover,以观察者模式输出日志,主库起来后还是主库。
关掉DISABLE FAST_START FAILOVER:
DISABLE FAST_START FAILOVER;
ENABLE FAST_START FAILOVER;
Propagate Restore Points from Primary to Standby Site
Oracle Database automatically replicates restore points from a primary database to the standby database when the following conditions are met:
-
COMPATIBLE
initialization parameter for both the primary database and the standby database is set to 19.0.0 or higher -
primary database is open(数据库不能处于mount模式,因为复制是通过redo)
The managed redo process (MRP) manages the creation and maintenance of replicated restore points.MRP启动时,开始复制。可以查看V$RESTORE_POINT
;
create restore point Oracle_test guarantee flashback database;
In the event of a failover in a Primary and Standby configuration where the Primary database is completely lost and the standby database becomes the primary.
This feature is Benefical only for Rman restore /duplicate to the restore point or Flashback of the table to the restore point.
控制文件一直保留restore point的信息。除非手动删除
没验证。。用于升级回退???ORA-29702
Bug 31561819 - OCW: Incompatible maxmembers at CRSD Level Causing Database Instance Not Able to Start (Doc ID 31561819.8) |
Flashback Standby Database When Primary Database is Flashed Back
主库闪回数据库(resetlogs),备库可以跟着闪回数据库也可以不跟。(备库要有足够的flashback data)
With Oracle Database Release 19c, if the standby is in mount mode and flashback database is enabled, you may not need to do anything. In the common case, if there is sufficient flashback data, the standby is automatically flashed back so that the standby continues to follow the primary.
MRP进程中断:ORA-39874
ORA-39874: Pluggable Database PDB1 recovery halted ORA-39873: Restore all data files to a checkpoint SCN lower than 1437261.
ALTER DATABASE CLOSE;
FLASHBACK PLUGGABLE DATABASE pdb1 TO SCN 1437260;
RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Performing Recovery When Flashback Is Not Enabled:
ALTER DATABASE CLOSE;
RMAN> RESTORE PLUGGABLE DATABASE pdb1 UNTIL SCN 1437261;
SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT;
The UNTIL
SCN
syntax allows RMAN to automatically choose a suitable backup to restore from. After the data files have been restored at the standby, restart MRP to continue applying the redo logs.
Oracle Data Guard Multi-Instance Redo Apply Works with the In-Memory Column Store
在dg备库。列存储跟多实例日志应用可以一起使用
Active Data Guard DML Redirection
alter system set adg_redirect_dml=true scope=both sid='*';
alter session enable adg_redirect_dml;
可以在备库进行 insert、update、 delete 的操作,是通过dblink从备库从主库写。更改的数据只对当前运行命令的standby database可见。在主库提交后,应用到所有的standby database;
alter session enable adg_redirect_plsql;
添加一些细节,来自:
http://www.ohsdba.cn/index.php?g=Home&m=Article&a=show&id=442
要启用这个功能,需满足一下几点
1.不能是sys或system等common user
2.使用SRL(standby redo logfile)
3.如果使用了CDB,要确保主库所有的PDB处于read write状态,备库所有PDB处于read only状态
4.备库必须启用real time apply
oerr ora 16397
16397, 00000, "statement redirection from Oracle Active Data Guard standby database to primary database failed"
// *Cause: The statement redirection failed because of one of the following reasons:
// 1. The primary database connect string was not established.
// 2. The primary database could not be reached.
// 3. The undo-mode or incarnation were not the same.
// 4. The current user and logged-in user were not the same.
// 5. Redirecting CREATE TABLE AS SELECT (CTAS) of the global temporary
// table was not supported.
// 6. Redirecting PL/SQL execution having bind variable was not supported.
// *Action: Run the statement after fixing the condition that caused the failure.
如果要执行CREATE TABLE等操作,需求启用adg_redirect_plsql
PDB Recovery Catalog
local user or common user 授权sysdba权限
rman target tt@db1
connect target "sys@salespdb as sysdba"
connect catalog rco@catdb(recovery catalog database)
Clear Flashback Logs Periodically for Increased Fast Recovery Area Size Predictability
compatible 设置19.0.0 or higher
不能备份闪回日志。
New Parameters to Tune Automatic Outage Resolution with Oracle Data Guard
You can now use two new parameters, DATA_GUARD_MAX_IO_TIME and DATA_GUARD_MAX_LONGIO_TIME, to tune waits times for a specific Oracle Data Guard configuration based on the user network and disk I/O behavior
DATA_GUARD_MAX_IO_TIME:进程被挂起的最大秒数,常规的I/O操作,包括read,write,status
默认240,范围10到7200
DATA_GUARD_MAX_LONGIO_TIME:长I/O操作,包括open,close操作。
Finer Granularity Supplemental Logging
打开数据库或者用户级别的附加日志,可以对个别表禁用附加日志