|
½ºÅä¾îµå ÇÁ·Î½ÃÀú, ÇÔ¼ö, ÆÐÅ°Áö, Æ®¸®°Å µî PL/SQL ºí·°µéÀÌ ³Ê¹« Ä¿¼ ½ÇÇàÇÒ ¶§ ¸¶´Ù ¶óÀ̺귯¸® ij½Ã ¿µ¿ª¿¡ ·Îµå µÇ¾ú´Ù°¡ ´Ù½Ã Á¦°ÅµÇ´Â Çö»óÀÇ ¹Ýº¹Àº ´ÜÆíÈ ¹× ¼º´É ÀúÇÏ À¯¹ßÇÑ´Ù.
ÇØ´ç PL/SQLÀ» ¶óÀ̺귯¸® ij½Ã ¿µ¿ª¿¡ »óÁÖ½ÃÅ°´Â ¹æ¹ýÀ» »ìÆ캸ÀÚ
1. ¶óÀ̺귯¸® ij½Ã ¿µ¿ª¿¡ ÀÖ´Â PL/SQL ºí·Ï Á¤º¸¸¦ ÂüÁ¶ÇÏ´Â ÀÚ·á»çÀüÀº v$db_object_cacheÀÌ´Ù.
SQL> select name, type, kept
from v$db_object_cache
where type in ( 'PACKAGE', 'PROCEDURE', 'TRIGGER', 'PACKAGEBODY' );
2. ½ºÅä¾îµå ÇÁ·Î½ÃÁ®¸¦ »ý¼º ÈÄ °øÀ¯ Ç® ¿µ¿ª¿¡ ·Îµå½ÃÄÑ º¸ÀÚ
SQL> conn scott/tiger
SQL> CREATE OR REPLACE PROCEDURE check_sawon
(v_emp_no IN emp.empno%TYPE)
IS
BEGIN
DELETE FROM emp WHERE empno = v_emp_no;
END check_sawon;
/
SQL> execute DBMS_SHARED_POOL.KEEP('SCOTT.CHECK_SAWON');
=> ÇÁ·Î½ÃÀú¸¦ °øÀ¯ Ç®¿¡ »óÁÖ½ÃÅ´
SQL> select name, type, kept
from v$db_object_cache
where type in ( 'PACKAGE', 'PROCEDURE', 'TRIGGER', 'PACKAGEBODY' )
and kept = 'YES';
NAME TYPE KEPT
----------------------------------------------------------
CHECK_SAWON PROCEDURE Y
|