๐ก ์ค๋ผํด์์ ์๋ฐ ์ฝ๋๋ฅผ ์ปดํ์ผ ํ ์ ์๋๋ฐ
--> ์ด๋ ์ฌ์ฉํ๋ ๋ฉ๋ชจ๋ฆฌ ์์ญ์ด ์๋ฐ ํ์
๋๋ค.
๐ก ๋ฆฌ๋ ๋ก๊ทธ ๋ฒํผ
PROMPT *** CURRENT parameter settings ***
col name format a12
col VALUE format a8
SHOW parameter sga_
PROMPT
PROMPT *** SGA Dynamic Component SIZE Information***
col component format a22
col current_size format a15
col min_size format a15
SELECT component,current_size/1048576||'M' current_size,
min_size/1048576||'M' min_size
FROM v$sga_dynamic_components
WHERE component IN ('shared pool','large pool',
'java pool','DEFAULT buffer cache');
col name format a20
col VALUE format a20
PROMPT *** CURRENT parameter settings IN V$PARAMETER ***
SELECT name, VALUE, isdefault
FROM v$parameter
WHERE name IN ('shared_pool_size','large_pool_size',
'java_pool_size', 'db_cache_size');
set echo on
DECLARE
i NUMBER;
v_sql VARCHAR2(200);
BEGIN
FOR i IN 1..200 LOOP
-- Build up a dynamic statement to create a uniquely named java stored proc.
-- The "chr(10)" is there to put a CR/LF in the source code.
v_sql := 'create or replace and compile' || chr(10) ||
'java source named "SmallJavaProc' || i || '"' || chr(10) ||
'as' || chr(10) ||
'import java.lang.*;' || chr(10) ||
'public class Util' || i || ' extends Object' || chr(10) ||
'{ int v1=1;int v2=2;int v3=3;int v4=4;int v5=5;int v6=6;int v7=7; }';
EXECUTE IMMEDIATE v_sql;
END LOOP;
END;
/
SQL> @sga
*** CURRENT parameter settings ***
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 1888M
sga_min_size big integer 0
sga_target big integer 1888M
unified_audit_sga_queue_size integer 1048576
*** SGA Dynamic Component SIZE Information***
COMPONENT CURRENT_SIZE MIN_SIZE
---------------------- --------------- ---------------
shared pool 416M 416M
large pool 16M 16M
java pool 0M 0M
DEFAULT buffer cache 1328M 1328M
*** CURRENT parameter settings IN V$PARAMETER ***
NAME VALUE ISDEFAULT
-------------------- -------------------- ---------
shared_pool_size 0 TRUE
large_pool_size 16777216 FALSE
java_pool_size 0 TRUE
db_cache_size 0 TRUE
SQL> ed java.sql
SQL> @java
SQL>
SQL> DECLARE
2 i NUMBER;
3 v_sql VARCHAR2(200);
4 BEGIN
5 FOR i IN 1..200 LOOP
6 -- Build up a dynamic statement to create a uniquely named java stored proc.
7 -- The "chr(10)" is there to put a CR/LF in the source code.
8 v_sql := 'create or replace and compile' || chr(10) ||
9 'java source named "SmallJavaProc' || i || '"' || chr(10) ||
10 'as' || chr(10) ||
11 'import java.lang.*;' || chr(10) ||
12 'public class Util' || i || ' extends Object' || chr(10) ||
13 '{ int v1=1;int v2=2;int v3=3;int v4=4;int v5=5;int v6=6;int v7=7; }';
14 EXECUTE IMMEDIATE v_sql;
15 END LOOP;
16 END;
17 /
PL/SQL ์ฒ๋ฆฌ๊ฐ ์ ์์ ์ผ๋ก ์๋ฃ๋์์ต๋๋ค.
SQL>
SQL> @sga
SQL>
SQL> PROMPT *** CURRENT parameter settings ***
*** CURRENT parameter settings ***
SQL> col name format a12
SQL> col VALUE format a8
SQL> SHOW parameter sga_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 1888M
sga_min_size big integer 0
sga_target big integer 1888M
unified_audit_sga_queue_size integer 1048576
SQL> PROMPT
SQL> PROMPT *** SGA Dynamic Component SIZE Information***
*** SGA Dynamic Component SIZE Information***
SQL> col component format a22
SQL> col current_size format a15
SQL> col min_size format a15
SQL>
SQL> SELECT component,current_size/1048576||'M' current_size,
2 min_size/1048576||'M' min_size
3 FROM v$sga_dynamic_components
4 WHERE component IN ('shared pool','large pool',
5 'java pool','DEFAULT buffer cache');
COMPONENT CURRENT_SIZE MIN_SIZE
---------------------- --------------- ---------------
shared pool 416M 416M
large pool 16M 16M
java pool 64M 0M
DEFAULT buffer cache 1264M 1264M
SQL>
SQL> col name format a20
SQL> col VALUE format a20
SQL> PROMPT *** CURRENT parameter settings IN V$PARAMETER ***
*** CURRENT parameter settings IN V$PARAMETER ***
SQL>
SQL> SELECT name, VALUE, isdefault
2 FROM v$parameter
3 WHERE name IN ('shared_pool_size','large_pool_size',
4 'java_pool_size', 'db_cache_size');
NAME VALUE ISDEFAULT
-------------------- -------------------- ---------
shared_pool_size 0 TRUE
large_pool_size 16777216 FALSE
java_pool_size 0 TRUE
db_cache_size 0 TRUE