SQL code:
create or replace procedure tally_log_oper(updatetimes out number,inserttimes out number,deletetimes out number)
is
--建议在声明变量的时候应初始化变量
v_na number:=0;
v_nb number:=0;
v_nc number:=0;
begin
select count(*) into v_na from log_file where operater='insert';
select count(*) into v_nb from log_file where operater='update';
select count(*) into v_nc from log_file where operater='delete';
inserttimes:=v_na;
updatetimes:=v_nb;
deletetimes:=v_nc;
commit;
end tally_log_oper;
存储过程执行成功,下面是测试代码:
SQL code:
declare
aba number:=0;
abb number:=0;
abc number:=0;
begin
exec tally_log_oper(aba,abb,abc);
print to_char(aba);
print to_char(abb);
print to_char(abc);
end;
最后错误如下:
exec tally_log_oper(aba,abb,abc);
*
ERROR 位于第 6 行:
ORA-06550: 第 6 行, 第 7 列:
PLS-00103: 出现符号 "TALLY_LOG_OPER"在需要下列之一时:
:= . ( @ % ;
符号 ":=" 被替换为 "TALLY_LOG_OPER" 后继续。
ORA-06550: 第 7 行, 第 8 列:
PLS-00103: 出现符号 "TO_CHAR"在需要下列之一时:
:= . ( @ % ;
符号 ":=" 被替换为 "TO_CHAR" 后继续。
ORA-06550: 第 8 行, 第 8 列:
java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186646784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBErro ......
服务器后台的数据库是oracle,在今天系统登录的时候报“登录不了数据库,IO异常”,结果是全公司都登不上去,我重启了一下服务器才好了,我想可能是用户并发量太大的缘故,不知道各位大虾认同不?有什么解决办法没? ......