----------------------------------------------------------------------------
-----------------ORA错误处理系列 By Cryking---------------------
------------------------转载请注明出处,谢谢!-------------------------

原始SQL:

执行出现ORA-03113错误,网络正常,执行其他SQL也正常.

13:04:26 CRY@CRY> select operatetime,billtypename,billid,shopcode,shopname,goodscode,goodsn
ame,' ' 期初数量,sum(irealnumber) irealnumber,DECODE(sum(irealnumber),0,0,round(sum(imoney)/sum(irea
lnumber),2)) iprice,sum(imoney) imoney,sum(orealnumber) orealnumber,DECODE(sum(orealnumber),0,0,roun
d(sum(omoney)/sum(orealnumber),2)) oprice,sum(omoney) omoney,' ' 结存数量 from( select to_char(x.ope
ratetime, 'YYYY-MM-DD') operatetime,x.billtype,
13:04:28 2 fun_getname('BILLTYPEALL',x.billtype) billtypename,
13:04:28 3 x.billid,x.remark,x.originbillid,
13:04:28 4 fun_getname('OPERATIONTYPE',x.otherinouttype) otherinouttypename,
13:04:28 5 x.shopcode,
13:04:28 6 f_getOrganiseName(x.shopcode) shopname,
13:04:28 7 x.storecode,
13:04:28 8 f_getStoreName(x.storecode) storename,
13:04:28 9 FUN_GETTOUNIT(x.billtype,x.billid) unitname,
13:04:28 10 x.goodscode,
13:04:28 11 X.goodsname,
13:04:28 12 x.ShortCode,x.brandcode,x.model,
13:04:28 13 x.irealnumber,
13:04:28 14 abs(DECODE(x.irealnumber,0,0,round(x.imoney/x.irealnumber,4))) iprice,
13:04:28 15 x.imoney,x.orealnumber,
13:04:28 16 abs(DECODE(x.orealnumber,0,0,round(x.omoney/x.orealnumber,4))) oprice,
13:04:28 17 x.omoney
13:04:28 18 from (
13:04:28 19 select a.operatetime,
13:04:28 20 a.billtype,
13:04:28 21 a.billid,fun_getbillremark(a.billid) remark,fun_getbilloriginbillid(a.b
illid) originbillid,
13:04:28 22 a.otherinouttype,
13:04:28 23 a.shopcode,
13:04:28 24 a.storecode,
13:04:28 25 a.goodscode,
13:04:28 26 c.shortcode,c.brandcode,c.model,
13:04:28 27 c.goodsname,
13:04:28 28 sum(DECODE(b.ruleid,1,a.realnumber,2,-a.realnumber,0)) irealnumber,
13:04:28 29 sum(DECODE(b.ruleid,1,
13:04:28 30 round(a.realnumber * a.price,2),
13:04:28 31 2,
13:04:28 32 round(-1 * a.realnumber *a.price,2),
13:04:28 33 0)) imoney,
13:04:28 34 sum(DECODE(b.ruleid,2,a.realnumber,1,-a.realnumber,0)) orealnumber,
13:04:28 35 sum(decode(b.ruleid,2,
13:04:28 36 round(a.realnumber * a.price,2),
13:04:28 37 1,
13:04:28 38 round(-1 * a.realnumber * a.price,2),
13:04:28 39 0)) omoney
13:04:28 40 from TAB_A a, TAB_B b,TAB_C c
13:04:28 41 where a.billtype = b.billtype
13:04:28 42 and a.goodscode=c.goodscode and (a.shopcode = '0603')
13:04:28 43 group by a.operatetime,
13:04:28 44 a.billtype,
13:04:28 45 a.billid,
13:04:28 46 remark,
13:04:28 47 a.otherinouttype,
13:04:28 48 a.shopcode,
13:04:28 49 a.storecode,
13:04:28 50 a.goodscode,
13:04:28 51 c.shortcode,
13:04:28 52 c.goodsname,c.brandcode,c.model
13:04:28 53 ) x
13:04:28 54 where x.billtype in (select billtype from t_billlist where ruleid>0) and
13:04:28 55 x.operatetime >= to_date('2013-6-17','YYYY-MM-DD')
13:04:28 56 and x.operatetime < to_date('2013-6-18','YYYY-MM-DD')
13:04:28 57 ) a group by operatetime,billtypename,billid,shopcode,shopname,goodscode,goodsname or
der by operatetime,billtypename,billid,shopcode,shopname,goodscode,goodsname;
select operatetime,billtypename,billid,shopcode,shopname,goodscode,goodsname,' ' 期初数量,sum(irealn
umber) irealnumber,DECODE(sum(irealnumber),0,0,round(sum(imoney)/sum(irealnumber),2)) iprice,sum(imo
ney) imoney,sum(orealnumber) orealnumber,DECODE(sum(orealnumber),0,0,round(sum(omoney)/sum(orealnumb
er),2)) oprice,sum(omoney) omoney,' ' 结存数量 from( select to_char(x.operatetime, 'YYYY-MM-DD') ope
ratetime,x.billtype,
*
第 1 行出现错误:
ORA-03113: 通信通道的文件结尾
进程 ID: 20027
会话 ID: 201 序列号: 149 ERROR:
ORA-03114: 未连接到 ORACLE 已用时间: 00: 00: 02.01

精简改SQL如下后报ORA-600错误:

13:07:18 CRY@CRY> SELECT operatetime
13:07:19 2 FROM (SELECT to_char(x.operatetime, 'YYYY-MM-DD') operatetime
13:07:19 3 FROM (SELECT operatetime FROM t_storeout GROUP BY operatetime) x
13:07:19 4 WHERE x.operatetime > to_date('2012-01-01', 'YYYY-MM-DD')) a
13:07:19 5 GROUP BY operatetime;
FROM (SELECT operatetime FROM t_storeout GROUP BY operatetime) x
*
第 3 行出现错误:
ORA-00600: 内部错误代码, 参数: [rwoirw: check ret val], [], [], [], [], [], [], [], [], [], [], [] 已用时间: 00: 00: 01.68

分析此ORA-00600错误,发现是参数"_complex_view_merging"的影响,将此参数值设为FALSE后正常.

如是解决此ORA-00600错误后,此ORA-03113错误也就解决了,如下:

13:07:23 CRY@CRY> ALTER SESSION SET "_complex_view_merging"=false;

会话已更改。

已用时间:  00: 00: 00.01
13:08:43 CRY@CRY> select operatetime,billtypename,billid,shopcode,shopname,goodscode,goodsn
ame,' ' 期初数量,sum(irealnumber) irealnumber,DECODE(sum(irealnumber),0,0,round(sum(imoney)/sum(irea
lnumber),2)) iprice,sum(imoney) imoney,sum(orealnumber) orealnumber,DECODE(sum(orealnumber),0,0,roun
d(sum(omoney)/sum(orealnumber),2)) oprice,sum(omoney) omoney,' ' 结存数量 from( select to_char(x.ope
ratetime, 'YYYY-MM-DD') operatetime,x.billtype,
13:08:55 2 fun_getname('BILLTYPEALL',x.billtype) billtypename,
13:08:55 3 x.billid,x.remark,x.originbillid,
13:08:55 4 fun_getname('OPERATIONTYPE',x.otherinouttype) otherinouttypename,
13:08:55 5 x.shopcode,
13:08:55 6 f_getOrganiseName(x.shopcode) shopname,
13:08:55 7 x.storecode,
13:08:55 8 f_getStoreName(x.storecode) storename,
13:08:55 9 FUN_GETTOUNIT(x.billtype,x.billid) unitname,
13:08:55 10 x.goodscode,
13:08:55 11 X.goodsname,
13:08:55 12 x.ShortCode,x.brandcode,x.model,
13:08:55 13 x.irealnumber,
13:08:55 14 abs(DECODE(x.irealnumber,0,0,round(x.imoney/x.irealnumber,4))) iprice,
13:08:55 15 x.imoney,x.orealnumber,
13:08:55 16 abs(DECODE(x.orealnumber,0,0,round(x.omoney/x.orealnumber,4))) oprice,
13:08:55 17 x.omoney
13:08:55 18 from (
13:08:55 19 select a.operatetime,
13:08:55 20 a.billtype,
13:08:55 21 a.billid,fun_getbillremark(a.billid) remark,fun_getbilloriginbillid(a.b
illid) originbillid,
13:08:55 22 a.otherinouttype,
13:08:55 23 a.shopcode,
13:08:55 24 a.storecode,
13:08:55 25 a.goodscode,
13:08:55 26 c.shortcode,c.brandcode,c.model,
13:08:55 27 c.goodsname,
13:08:55 28 sum(DECODE(b.ruleid,1,a.realnumber,2,-a.realnumber,0)) irealnumber,
13:08:55 29 sum(DECODE(b.ruleid,1,
13:08:55 30 round(a.realnumber * a.price,2),
13:08:55 31 2,
13:08:55 32 round(-1 * a.realnumber *a.price,2),
13:08:55 33 0)) imoney,
13:08:55 34 sum(DECODE(b.ruleid,2,a.realnumber,1,-a.realnumber,0)) orealnumber,
13:08:55 35 sum(decode(b.ruleid,2,
13:08:55 36 round(a.realnumber * a.price,2),
13:08:55 37 1,
13:08:55 38 round(-1 * a.realnumber * a.price,2),
13:08:55 39 0)) omoney
13:08:55 40 from t_storeout a, t_billlist b,t_goods c
13:08:55 41 where a.billtype = b.billtype
13:08:55 42 and a.goodscode=c.goodscode and (a.shopcode = '0603')
13:08:55 43 group by a.operatetime,
13:08:55 44 a.billtype,
13:08:55 45 a.billid,
13:08:55 46 remark,
13:08:55 47 a.otherinouttype,
13:08:55 48 a.shopcode,
13:08:55 49 a.storecode,
13:08:55 50 a.goodscode,
13:08:55 51 c.shortcode,
13:08:55 52 c.goodsname,c.brandcode,c.model
13:08:55 53 ) x
13:08:55 54 where x.billtype in (select billtype from t_billlist where ruleid>0) and
13:08:55 55 x.operatetime >= to_date('2013-6-17','YYYY-MM-DD')
13:08:55 56 and x.operatetime < to_date('2013-6-18','YYYY-MM-DD')
13:08:55 57 ) a group by operatetime,billtypename,billid,shopcode,shopname,goodscode,goodsname or
der by operatetime,billtypename,billid,shopcode,shopname,goodscode,goodsname; 未选定行 已用时间: 00: 00: 00.04

一次ORA-03113错误解决的更多相关文章

  1. Oracle ORA-01033: ORACLE initialization or shutdown in progress 错误解决办法

    Oracle ORA-01033: ORACLE initialization or shutdown in progress 错误解决办法 登陆数据库时提示 “ORA-01033”错误在命令窗口以s ...

  2. Oracle 数据库 Database Express Edition 11g Release 2 (11.2) 错误解决集锦(安装方面)

    前言:第一次接触数据库,想下载个oracle试玩下(虽然听说一般大企业才用),到 官网下载 了个简易版 XE 版本,安装时要注意记住自己输入的数据库密码(口令)  还有安装路径不能含有空格(Do no ...

  3. Oracle 11g R2(11.2.0.4) RAC 数据文件路径错误解决--ORA-01157 ORA-01110: 数据文件

    Oracle 11g R2(11.2.0.1) RAC  数据文件路径错误解决--ORA-01157 ORA-01110: 数据文件 oracle 11g R2(11.2.0.4) rac--scan ...

  4. 【故障处理】分布式事务ORA-01591错误解决

    [故障处理]分布式事务ORA-01591错误解决 1  BLOG文档结构图       2  前言部分 2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你 ...

  5. SQL SERVER 9003错误解决方法 只适用于SQL2000

    SQLSERVER 9003错误解决方法 只适用于SQL2000 (只适用于SQL2000) "无法打开新数据库 'POS'.CREATE DATABASE 中止. (Microsoft S ...

  6. linux下遇见mysql启动报2002错误解决办法

    前言:目前问题解决了,但是仍不知道是什么原因造成的,在出现问题前安装uWSGI后,mysql就出现这个问题的,哪位大侠说说这是怎么回事? 正文:Linux 下 Mysql error 2002 错误解 ...

  7. Ubuntu 汉化时ubuntu software database is broken错误解决

    关于Ubuntu 汉化时的错误解决:按照网上的方法没有解决 最后 删掉thunderbird mail .这个软件,顺利解决!! 错误:thunderbird-locale-en: Depends: ...

  8. 记录centos6.8安装Oracle10.2.0.1过程中的错误解决

    [root@hadoop01 database]# ./runInstaller ./runInstaller: /opt/database/install/.oui: /lib/ld-linux.s ...

  9. New XAMPP security concept:错误解决方法

    New XAMPP security concept:错误解决方法 (2014-03-06 16:07:46) 转载▼   分类: php 在Linux上配置xampp后远程访问域名报错: New X ...

  10. 真机测试-Please enter a different string错误解决

    错误原因是这个bundle ID已经被占用了,这是想到的是要重置测试证书,那么则需要去修改Bundle identifier,因为测试证书是以Bundle identifier为基准的,修改后运行,重 ...

随机推荐

  1. CAN总线基础

    can总线协议: 涵盖了OSI规定的传输层.数据链路层.物理层 物理层: 决定了位编码方式(NRZ编码,6个位插入填充位),位时序(位时序.位的采样).同步方式(根据同步段ss实现同步,并具有再同步功 ...

  2. PHP - FTP上传文件类

    /** * 作用:FTP操作类( 拷贝.移动.删除文件/创建目录 ) * 时间:2006/5/9 * 作者:欣然随风 * QQ:276624915 */ class class_ftp { publi ...

  3. ACM第三次比赛 Big Chocolate

    Problem G Big Chocolate Mohammad has recently visited Switzerland . As he loves his friends very muc ...

  4. typeof 使用介绍

    JS中的变量是松散类型(即弱类型)的,可以用来保存任何类型的数据. typeof 可以用来检测给定变量的数据类型,可能的返回值:1. 'undefined' --- 这个值未定义: 2. 'boole ...

  5. IOS SWIFT 网络请求JSON解析 基础一

    前言:移动互联网时代,网络通信已经是手机端必不可少的功能.应用中也必不可少地使用了网络通信,增强客户端与服务器交互.使用NSURLConnection实现HTTP的通信.NSURLConnection ...

  6. 我的Python成长之路---第二天---Python基础(8)---2016年1月9日(晴)

    数据类型之字典 一.字典简介 字典dict(dictionary),在其他语言中也成为map,使用键-值(key-value)的形式存储和展现,具有极快的查找速度. 字典的定义 d = {'key': ...

  7. Ubuntu下安装和配置mysql

    一.检查 1.检查是否已经安装mysql whereis mysql 2.检查mysql服务是否已经启动 sudo netstat -tap | grep mysql 如果没有安装,下面就进行安装. ...

  8. 在开发 ExtJS 应用程序常犯的 10 个错误

    这是 CNX 公司在开发 ExtJS 项目中总结的需要特别注意的 10 个地方.有时候,我们完全是自己使用 ExtJS 从零开始构建的新的应用程序,但有时候我们的客户会要求我们使用他们自己的代码,并且 ...

  9. TCP连接状态具体解释

    tcp状态: LISTEN:侦听来自远方的TCPport的连接请求 SYN-SENT:再发送连接请求后等待匹配的连接请求 SYN-RECEIVED:再收到和发送一个连接请求后等待对方对连接请求的确认 ...

  10. WCF技术剖析之十二:数据契约(Data Contract)和数据契约序列化器(DataContractSerializer)

    原文:WCF技术剖析之十二:数据契约(Data Contract)和数据契约序列化器(DataContractSerializer) [爱心链接:拯救一个25岁身患急性白血病的女孩[内有苏州电视台经济 ...