"数据库异常:数据提供方内部错误(-3000) ",在线等 ,解决即结帐,决不食言!!!

时间:2022-09-29 17:49:58
在执行了一个oracle存储过程后所有与数据库的操作均报:

数据库异常:数据提供方内部错误(-3000) 

这个错误,请问是怎么回事,是不是有什么东西没释放。

procedure sp_T002_T028_SearchInsertW
                             (
                              P_OUTCURSOR         OUT    refCursorType, 
                              P_ORGANCODE         IN     VARCHAR2,
                              P_REPORTDATE        IN     VARCHAR2,         
                              P_CHECKTIME         IN     VARCHAR2,         
                              P_METHODCODE        IN     VARCHAR2,         
                              P_PREGSTATUSCODE    IN     VARCHAR2,         
                              P_FEEDBACKCODE      IN     VARCHAR2,        
                              P_CHECKDOCTORCODE   IN     VARCHAR2,         
                              P_CHECKDOCTORNAME   IN     VARCHAR2,        
                              P_BATCHMAN          IN     VARCHAR2,        
                              P_BATCHIP           IN     VARCHAR2        
                              )
                              
as
  --变量列表
V_ERRMESSAGE         VARCHAR2(1000);    --异常信息(用以接收 Oracle 抛出的异常信息)  
e exception;
begin

     insert into mistable028(   MisField028A00,
                                MisField028A01,
                                MisField028A02,
                                MisField028A03,
                                MisField028A04,
                                MisField028A05,
                                MisField028A06,
                                MisField028A07,
                                MisField028A08,
                                MisField028A09,
                                MisField028A10,
                                MisField028A11,
                                MisField028A12,
                                MisField028A13,
                                MisField028A14,
                                MisField028A15,
                                MisField028A19,
                                MisField028A20,
                                MisField028A21,
                                MisField028A24,
                                MisField028A25,
                                MisField028A27,
                                MisField028A28,
                                MisField028A29,
                                MisField028A30) 
          select 
                                substr(P_ORGANCODE,0,6)||'000000',
                                P_REPORTDATE as ReportDate, 
                                sysdate as StatsDate,
                                MISFIELD002A02,
                                MISFIELD002A03,
                                MISFIELD002A04,
                                MISFIELD002A05,
                                MISFIELD002A06,
                                MISTABLE002ID,
                                MISFIELD002A09,
                                '女' as sex,
                                TO_DATE(P_CHECKTIME,'YYYY-MM-DD HH24:MI:SS') as ExamTime,                                
                                P_METHODCODE as ExamMethod,
                                P_PREGSTATUSCODE as PREGSTATUS,
                                P_FEEDBACKCODE as  FEEDBACK,
                                P_CHECKDOCTORNAME as ExamDoctorName,
                                P_BATCHMAN as BatchMan,
                                P_BATCHIP as BatchIP,
                                Sysdate as BatchDate,
                                MISFIELD002A32,
                                '0' as DeleteFlag,
                                MISFIELD002A59,
                                MISFIELD002A60,
                                MISFIELD002A57,
                                P_CHECKDOCTORCODE as DoctorCode  
                                
     from mistable002
     where 
     MISFIELD002A02 = P_ORGANCODE
     and
     ceil(months_between(sysdate,MISFIELD002A10)/12) >=15
     and 
     ceil(months_between(sysdate,MISFIELD002A10)/12) <=49
     and 
     (MISFIELD002A15 = '21' or MISFIELD002A15  = '22' or MISFIELD002A15 = '23')
     and 
     (
         MISFIELD002A58 = '400' or MISFIELD002A58 = '300' or MISFIELD002A58 = '100' 
         or MISFIELD002A58 = '100' or MISFIELD002A58 = '110' or MISFIELD002A58 = '120'
         or MISFIELD002A58 = '130' or MISFIELD002A58 = '140' or MISFIELD002A58 = '190'
         or MISFIELD002A58 = '200' or MISFIELD002A58 = '500' or MISFIELD002A58 = '600'
         or MISFIELD002A58 = '610' or MISFIELD002A58 = '620' or MISFIELD002A58 = '630'
         or MISFIELD002A58 = '690' or MISFIELD002A58 = '900' 
         or (MISFIELD002A58 = '820'  and ceil(months_between(sysdate,MISFIELD002A60)/12) <=12) 
         or (MISFIELD002A58 = '810' and  ceil(months_between(sysdate,MISFIELD002A60)/12) <=12) 
     );
 --提交操作
 COMMIT;


 OPEN P_OUTCURSOR FOR
      SELECT '1','操作成功' FROM DUAL;
      
  --异常处理
 EXCEPTION
     WHEN E THEN
          OPEN P_OutCursor FOR
               SELECT '0','操作失败' FROM DUAL;
     WHEN OTHERS THEN
          V_ERRMESSAGE := SQLERRM;
          ROLLBACK;

          OPEN P_OutCursor FOR
               SELECT '0',V_ERRMESSAGE FROM DUAL;
               
end sp_T002_T028_SearchInsertW;      
存储过程调试正常,可以批量插入数据,但这个存储过程一执行,这台机器上所有的数据库操作均报上面的错误!

5 个解决方案

#1


但这个存储过程一执行,这台机器上所有的数据库操作均报上面的错误!
---------------------------------------------------
我在程序里执行才出现这种问题,调试时执行多少遍都没事。

#2


现在不报这个错了,我没有进行任何操作的,奇怪

#3


gz

#4


呵呵,同事帮我看了看,参数顺序搞错了,所以插不进去,不过“数据库异常:数据提供方内部错误(-3000)”这个错误是怎么出现的,还不明白

#5


bug

#1


但这个存储过程一执行,这台机器上所有的数据库操作均报上面的错误!
---------------------------------------------------
我在程序里执行才出现这种问题,调试时执行多少遍都没事。

#2


现在不报这个错了,我没有进行任何操作的,奇怪

#3


gz

#4


呵呵,同事帮我看了看,参数顺序搞错了,所以插不进去,不过“数据库异常:数据提供方内部错误(-3000)”这个错误是怎么出现的,还不明白

#5


bug