| ref cursor [message #578205] |
Mon, 25 February 2013 10:32  |
 |
neetesh87
Messages: 262 Registered: September 2011 Location: bhopal
|
Senior Member |
|
|
hello experts,
i have a ref cursor and i have used 'open cursor for' statement:
CREATE OR REPLACE PACKAGE aepuser.pkg_test
AS
TYPE cur1 IS REF CURSOR;
PROCEDURE get_empdetails (p_empno NUMBER, io_cur OUT cur1);
END;
CREATE OR REPLACE PACKAGE BODY aepuser.pkg_test
AS
PROCEDURE get_empdetails (p_empno NUMBER, io_cur OUT cur1)
IS
v_cur cur1;
BEGIN
OPEN v_cur FOR
SELECT ename, deptno, sal, comm
FROM scott.emp;
io_cur := v_cur;
COMMIT;
END get_empdetails;
END;
then i want to know that- will oracle automatically deallocate the memory occupied by records in cursor area?
if yes, then when it will be free , in case of 'open cursor for' ?
thank in advance........
|
|
|
|
|
|
|
|
| Re: ref cursor [message #578239 is a reply to message #578233] |
Tue, 26 February 2013 00:49   |
 |
Michel Cadot
Messages: 54719 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
1) A few bytes
2) Some more bytes
The problem is not the memory, it is the number of open cursors which is limited and some security issues.
Regards
Michel
[Updated on: Tue, 26 February 2013 00:49] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|