ORA-2391: exceeded simultaneous SESSIONS_PER_USER limit [message #297809] |
Sun, 03 February 2008 21:21 |
anbazrws
Messages: 2 Registered: February 2008 Location: singapore
|
Junior Member |
|
|
Hi All,
I am using Oracle 10.2.03 database with asp.net 1.1 web application,
My application deployed on the production, but I got the Oracle Error:
ORA-2391: exceeded simultaneous SESSIONS_PER_USER limit
Can I have suitable remedy for this error?
Thanks & regards,
Anbaz,
Singapore.
|
|
|
|
|
|
|
|
|
|
|
|
Re: ORA-2391: exceeded simultaneous SESSIONS_PER_USER limit [message #604674 is a reply to message #603418] |
Thu, 02 January 2014 10:40 |
|
sss111ind
Messages: 634 Registered: April 2012 Location: India
|
Senior Member |
|
|
The problem was like
CREATE OR REPLACE procedure p_link_test(p_deptno in number,c_emp_details out sys_refcursor) IS
begin
OPEN c_emp_details FOR SELECT * FROM emp@db_link;
end ;
variable c_emp_details refcursor;
set autoprint on;
BEGIN
p_link_test(10,:c_emp_details);
end;
The procedure p_link_test is called from a different application .And the session over the dblink was getting opened eachtime when the procedure is being called which can never be closed again in frontend because no commit issued anywhere either in frontend and backend. So after maximum session opened the above error was
throwing .In Oracle document mentions that the two phase commit must required in db link even in select statement.
So We have modified the procedure like and it started working perfectly.
CREATE global temporary TABLE eMP_temp
(
EMPNO NUMBER(4,0) ,
ENAME VARCHAR2(10 BYTE),
JOB VARCHAR2(9 BYTE),
MGR NUMBER(4,0),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2,0)
)
ON COMMIT preserve rows;
CREATE OR REPLACE procedure p_link_test(p_deptno in number,c_emp_details out sys_refcursor) IS
begin
delete from emp_temp;
commit;
insert into eMP_temp SELECT * FROM emp@db_link where deptno=p_deptno;
commit;--the problem solved here
OPEN c_emp_details FOR SELECT * FROM eMP_temp;
end ;
[Updated on: Thu, 02 January 2014 10:44] Report message to a moderator
|
|
|