Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

84

积分

1

好友

27

主题
1#
发表于 2012-12-26 10:17:15 | 查看: 5100| 回复: 3
我们系统通过DBLINK的方式从XX银行数据中心取数,DBLINK.DATACENT是在系统(我公司的报表平台)创建的一个DBLINK连接。系统定时在每天早上进行数据抽取,使用上述提到的DBLINK。
从11月02日上线后至今,抽数过程中共发生过两次错误,错误如下,在网上搜了一下,多数是说网络不稳定。我们也问了其他从数据中心取数的系统,人家的数据都没啥问题。
希望点儿建议:
2012.12.25 06:00:00 WARN DefaultQuartzScheduler_Worker-6 org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob - Invocation of method 'firstAllScore' on target class [class $Proxy5] failed
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from jihe_end@DBLINK.DATACENT where acctdt=to_date(?,'yyyyMMdd') and status='1']; nested exception is java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
ORA-03113: end-of-file on communication channel

at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:108)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:582)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:616)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:653)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.sjzxDateIsReady(ScoreServiceImpl.java:812)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.impSJZXdata(ScoreServiceImpl.java:864)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.riskScore(ScoreServiceImpl.java:1001)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.score(ScoreServiceImpl.java:735)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.firstAllScore(ScoreServiceImpl.java:894)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy5.firstAllScore(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:272)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
ORA-03113: end-of-file on communication channel
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:623)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:566)
2012.12.25 06:00:00 INFO DefaultQuartzScheduler_Worker-6 org.quartz.core.JobRunShell - Job DEFAULT.firstAllScoreJobDetail threw a JobExecutionException:
org.quartz.JobExecutionException: Invocation of method 'firstAllScore' on target class [class $Proxy5] failed [See nested exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from jihe_end@DBLINK.DATACENT where acctdt=to_date(?,'yyyyMMdd') and status='1']; nested exception is java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
ORA-03113: end-of-file on communication channel
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:287)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from jihe_end@DBLINK.DATACENT where acctdt=to_date(?,'yyyyMMdd') and status='1']; nested exception is java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
ORA-03113: end-of-file on communication channel
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:108)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:582)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:616)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:653)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.sjzxDateIsReady(ScoreServiceImpl.java:812)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.impSJZXdata(ScoreServiceImpl.java:864)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.riskScore(ScoreServiceImpl.java:1001)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.score(ScoreServiceImpl.java:735)
at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.firstAllScore(ScoreServiceImpl.java:894)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy5.firstAllScore(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:272)
... 3 more
Caused by: java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
ORA-03113: end-of-file on communication channel
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:623)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:566)
2#
发表于 2012-12-26 10:54:16
ORA-02068: following severe error from DBLINK.DATACENT
ORA-03113: end-of-file on communication channel

一般而论 3113  是 客户端对应的Server Process异常终止,为什么会异常终止可能与 远程数据库有关

首先确认 你的本地数据库 以及 远程数据库的版本号 各是多少

回复 只看该作者 道具 举报

3#
发表于 2012-12-27 10:20:57
回老大,本地数据库版本:10.2.0.1.0  远程数据库版本:11.1.0.6  ,不知道是不是有相关的BUG啊?

回复 只看该作者 道具 举报

4#
发表于 2012-12-27 13:42:02
本地数据库版本:10.2.0.1.0  远程数据库版本:11.1.0.6

这2个版本间的 DBLINK应当是兼容可用的,目前找不到相关BUG。 如需深入分析,需要具体在远程端对应进程的TRACE

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-26 02:19 , Processed in 0.047697 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569