logical standby database问题解决---转

工程师check logstdby数据库状态报告发现自10月29号来logical standby  database就没有应用日志了.

select * from dba_logstdby_log;查看结果发现真是如此.

tail -n 1000 alert*.log

发现里面报不能alter database datafile "" resize xxM.

原来是在主库中扩展数据文件,备库不支持的dml语句报错.

在备库中.

alter database stop logical standby apply;

//alter session disable guard;

手工扩展datafile大小.

alter database datafile '' autoextend on;

alter database start logical standby apply

tail -f alert*.log

发现还是报错,select * form. dba_logstdby_process和dba_logstdby_event;中发现

在执行delete * from qr$*** 表报错.

原来qr$*** 表在主库中有1000多万条数据,如果用的是最大性能的逻辑数据库,oracle官方建议数据量不能太大.

只能查找资料如何处理,发现有下面好东东.按下面处理完后,问题解决.

A.9.1.2 Recovering from DML Failures
Do not use the SKIP_TRANSACTION procedure to filter DML failures. Not only is the DML that is seen in the events table skipped, but so is all the DML associated with the transaction. This will cause multiple tables.
DML failures usually indicate a problem with a specific table. For example, assume the failure is an out-of-storage error that you cannot resolve immediately. The following steps demonstrate one way to respond to this problem.
1. Bypass the table, but not the transaction, by adding the table to the skip list:
SQL> EXECUTE DBMS_LOGSTDBY.SKIP('DML','SCOTT','EMP');
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
From this point on, DML activity for the SCOTT.EMP table is not applied. After you correct the storage problem, you can fix the table, provided you set up a database link to the primary database that has administrator privileges to run procedures in the DBMS_LOGSTDBY package.
2. Using the database link to the primary database, drop the local SCOTT.EMP table and then re-create it, and pull the data over to the standby database.
SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('SCOTT','EMP','PRIMARYDB');
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
3. To ensure a consistent view across the newly instantiated table and the rest of the database, wait for SQL Apply to catch up with the primary database before querying this table. Refer to Section 9.4.6, "Adding or Re-Creating Tables On a Logical Standby Database" for a detailed example.
A.9.2 Troubleshooting SQL*Loader Sessions
Oracle SQL*Loader provides a method of loading data from different

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/110321/viewspace-611005/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/110321/viewspace-611005/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值