Oracle
的Data Guard环境中,
逻辑备库应用进程停止,日志显示错误为ORA-01403 not data found
。
LOGSTDBY status: ORA-01403: no data found
LOGSTDBY Apply process P004 pid=143 OS id=13936 stopped
Errors in file /u01/app/oracle/admin/db/bdump/rdb_lsp0_13922.trc:
ORA-12801: error signaled in parallel query server P004
LOGSTDBY Analyzer process P003 pid=38 OS id=13932 stopped
这种错误在logical standby
环境中很常见。
通过dba_logstdby_events
视图查询失败的事务信息。
'exec dbms_logstdby.skip_transaction(' || xidusn || ',' || xidslt || ',' ||
xidsqn || ');' as exec_sql,
from dba_logstdby_events a
where event_time = (select max(event_time) from dba_logstdby_events);
从event
列中我们查询出失败的具体信息,是更新一张表失败。
第一种,可以使用skip_transaction
方法忽略掉该事务。
exec dbms_logstdby.skip_transaction(487,12,951001);
但这个方法有后遗症,接下来的同步过程中会有不断的麻烦,数据没找到的问题会层出不穷。
第二种,使用skip
方法忽略掉该表的所有的操作。
alter database stop logical standby apply;
execute dbms_logstdby.skip('DML','username','T_ZHUSHOU_ORDER');
execute dbms_logstdby.skip('SCHEMA_DDL','username','T_ZHUSHOU_ORDER');
alter database start logical standby apply immediate;
忽略掉出问题的表的DML
操作和SCHEMA_DDL
操作。
数据复制停止的问题是解决了,但这里造成了一张表事实上不能同步了。
新问题:如何将已skip
的表再加入logical standby
中?
解决这个新问题主要是靠DBMS_LOGSTDBY.INSTANTIATE_TABLE
方法。
This procedure creates and populates a table in the standby database from a corresponding table in the primary database. The table requires the name of the database link (dblink) as an input parameter. If the table already exists in the logical standby database, it will be dropped and re-created based on the table definition at the primary database. This procedure only brings over the data associated with the table, and not the associated indexes and constraints.
alter database stop logical standby apply;
execute dbms_logstdby.unskip('DML','username','T_ZHUSHOU_ORDER');
execute dbms_logstdby.unskip('SCHEMA_DDL','username','T_ZHUSHOU_ORDER');
3
、使用INSTANTIATE_TABLE
重新实例化一张表。
EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC');
注意,源库上的用户必须有
SELECT_CATALOG_ROLE
权限,否则会报错ORA-16276
SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC');
begin DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC'); end;
ORA-16276: specified database link does not correspond to primary database
ORA-06512: at "SYS.DBMS_INTERNAL_LOGSTDBY", line 5361
ORA-02019: connection description for remote database not found
ORA-06512: at "SYS.DBMS_LOGSTDBY", line 636
分享到:
相关推荐
OGG之ORA-01403案例,包括这个案例所遇到的错误详解,对使用的参数进行了详细的解说
Oracle 11gr2连Oracle 19c 报ORA-28040 ORA-01017解决方法
ora-00604 错误 解决 方法 ora-00604 错误 解决 方法 ora-00604 错误 解决 方法 ora-00604 错误 解决 方法 ora-00604 错误 解决 方法ora-00604 错误 解决 方法
创建物化视图ORA-12014错误解决方法 创建物化视图ORA-12014错误解决方法
oracle数据库ora-01152和ora-01110的解决办法
Drop goldengate用户时,报ORA-00604 ORA-20782 ORA-06512错误
使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查。使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查 使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查
oracle启动失败,ORA-00702报错,windows,linux系统下解决办法
Oracle RAC环境修改字符集遇到ORA-00205解决方法.rar
oracle 11g中ora-28056错误的解决方法
oracle网络配置(listener_ora-sqlnet_ora-tnsnames_ora).mht
ORA-12541 TNSno listener 的解决方案 ORA-12541 TNSno listener 的解决方案
离线误删空间文件导致的ORA-01033及ORA-01145问题的解决办法,在解决ORA-01033的过程中,又出现ORA-01145 * 第 1 行出现错误: ORA-01145: 除非启用了介质恢复, 否则不允许立即脱机 接着的解决步骤
ora-01033:oracle initialization or shutdown in progress 解决方法 ora-01033:oracle initialization or shutdown in progress 解决方法 ora-01033:oracle initialization or shutdown in progress 解决方法 ora-...
用oracle数据库新建连接时遇到ora-12505,此问题解决后又出现ora-12519错误,郁闷的半天,经过一番折腾问题解决,下面小编把我的两种解决方案分享给大家,仅供参考。 解决方案一: 今天工作时在新建连接的时候遇到...
ORACLE ORA-00132 ORA-00214
win 8 升级 win 10 后,oracle 11g 无法启动及客户端连接,命令行sqlplus登录,startup 时报 ORA-00119 和 ORA-00132 的错误。 1. sqlplus /nolog 2. conn / as sysdba 3. startup 报错: ORA-00119 和 ORA-00132
ora-01720 授权选项对于'xxxx'不存在的解决方法,希望有帮助。
ORA-01157解决方案
ORA-32001:write to spfile requested but no spfile is in use请求写入spfile,但没有使用spfile的解决方法 在输入以下语句中报了这样的错误: SQL>alter system set control_files=’/u01/app/oracle/oradata/prod/...