전체 글 (658) 썸네일형 리스트형 106 - [Oracle PL/SQL] Managing Code - Wrapper Utility 아래 스크립트를 서버에 저장한다 - test.sqlcreate table table_1( id number, name varchar2(100));insert into table_1 values (1,'nader ali');insert into table_1 values (2,'khaled rami');insert into table_1 values (3,'naser hassan');insert into table_1 values (4,'ameen hadi');create or replace procedure insert_table_1(p_id number, p_name varchar2)isbegininsert into table_1 values (p_id,p_name);commit;end; 유틸리티.. 105 - [Oracle PL/SQL] Managing Code - dbms_ddl 일반적인 컴파일 방법create or replace function get_sum_sal_dept( dept_id number ) return numberis v_sal number;begin select sum(salary) into v_sal from employees where department_id =dept_id; return v_sal; exception when others then return null;end; 함수 테스트 및 소스 보기select get_sum_sal_dept(90) from dual;/*GET_SUM_SAL_DEPT(90)-------------------- 58160*/--.. 104 - [Oracle PL/SQL] Managing Code - Obfuscation 103 - [Oracle PL/SQL] Managing Code - plsql_ccflags 예시 -- 세션을 처음 연결하면 plsql_ccflags 값은 항상 널이다SELECT name, valueFROM v$parameterWHERE name ='plsql_ccflags' ;/*NAME VALUE ------------------- ------------------------------plsql_ccflags*/alter session set plsql_ccflags='trace_time:true,maxsizev:2000';SELECT name, valueFROM v$parameterWHERE name ='plsql_ccflags' ;/*NAME VALUE -.. 102 - [Oracle PL/SQL] Managing Code - plsql_ccflags plsql_ccflags 값 설정 및 조회SELECT name, valueFROM v$parameterWHERE name ='plsql_ccflags' ;/*NAME VALUE ------------------- ------------------------------plsql_ccflags */alter session set plsql_ccflags='language:1';SELECT name, valueFROM v$parameterWHERE name ='plsql_ccflags' ;/*NAME VALUE ------------------- --------------.. 101 - [Oracle PL/SQL] Managing Code - Introduction 버전이 다른 오라클 서버들에 모두 적용가능한 하나의 코드를 만들어야 할 경우가 있습니다.특정옵션들은 하위버전에서 동작하지 않게 때문에 컴파일 옵션을 다르게 적용할 필요가 있습니다. 아래 그림처럼 특정옵션은 버전마다 지원 여부가 다릅니다. $ 기호를 이용해서 조건문을 만들수 있고 $$ 기호 2개를 이용하면 해당 정보에 직접 접근이 가능합니다. Conditional Completion 장점은 아래와 같습니다.- Support for multiple versions of the same program in one source code- Easy maintenance and debugging of code.- Easy Migration of code to a different release of the.. 100 - [Oracle PL/SQL] Compiler - package dbms_warning ALTER SESSION SET PLSQL_WARNINGS='DISABLE:ALL';col name for a30col value for a30select name,value from v$parameterwhere name='plsql_warnings';---------------------------------------------NAME VALUE ------------------------------ ------------------------------plsql_warnings DISABLE:ALL 경고 메시지 표시형식 설정--1----Modify the current sessi.. 099 - [Oracle PL/SQL] Compiler - Warnings SEVERE: Messages for conditions that may cause unexpected behavior or wrong results, such as aliasing problemswith parametersPERFORMANCE: Messages for conditions that may cause performance problems, such as passing a VARCHAR2 value to a NUMBER column in an INSERT statementINFORMATIONAL: Messages for conditions that do not have an effect on performance or correctness, but that youmay want to chan.. 이전 1 2 3 4 5 6 ··· 83 다음