I have some doubt on PL/SQL Package. Please explain me, need your help for the below.
Please check the below program:
CREATE OR REPLACE PACKAGE valerr
IS
FUNCTION private_variable RETURN VARCHAR2;
END valerr;
/
CREATE OR REPLACE PACKAGE BODY valerr
IS
g_private VARCHAR2 (1);
FUNCTION private_variable
RETURN VARCHAR2
IS
BEGIN
RETURN g_private;
END private_variable;
PROCEDURE initialize
IS
BEGIN
DBMS_OUTPUT.put_line ('Before I show you v...');
g_private := 'abc';
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Trapped the error!');
END initialize;
BEGIN
initialize;
END valerr;
/
Now Please explain me on my below points:
1. When i am login through a new session, only specification will be loaded in SGA or both body or specification or specification and Declarative part of body.
2. When the body will be loaded.
3. What is the internal process of Oracle when we are executing a procedure of a package.
Thanks in advance
http://docs.oracle.com/cd/E11882_01/server.112/e40540/memory.htm#sthref1763