Updating stored procedure online biker dating sites
Oracle provides a binary wrapper utility that can be used to scramble PL/SQL source code.
This utility was introduced in Oracle7.2 (PL/SQL V2.2) and is located in the ORACLE_HOME/bin directory.
PL/SQL's language syntax, structure and data types are similar to that of Ada.
Some of the statements provided by PL/SQL: Conditional Control Statements: The PL/SQL language includes object oriented programming techniques such as encapsulation, function overloading, information hiding (all but inheritance).
SCHEMA -- Change SCOTT to your schema name DECLARE BEGIN IF ORA_DICT_OBJ_TYPE in ('PROCEDURE', 'FUNCTION', 'PACKAGE', 'PACKAGE BODY', 'TYPE', 'TYPE BODY') THEN -- Store old code in SOURCE_HIST table INSERT INTO SOURCE_HIST SELECT sysdate, all_source.* FROM ALL_SOURCE WHERE TYPE = ORA_DICT_OBJ_TYPE -- DICTIONARY_OBJ_TYPE IN 8i AND NAME = ORA_DICT_OBJ_NAME; -- DICTIONARY_OBJ_NAME IN 8i END IF; EXCEPTION WHEN OTHERS THEN raise_application_error(-20000, SQLERRM); END; / show errors A better approach is to create an external CVS or SVN repository for the scripts that install the PL/SQL code.
As such, SQL cannot be used to execute procedural code with conditional, iterative and sequential statements. PL/SQL is Oracle's Procedural Language extension to SQL.
This will allow you to easily revert to previous code should someone make any catastrophic changes.
Look at this example: CREATE TABLE SOURCE_HIST -- Create history table AS SELECT SYSDATE CHANGE_DATE, ALL_SOURCE.* FROM ALL_SOURCE WHERE 1=2; CREATE OR REPLACE TRIGGER change_hist -- Store code in hist table AFTER CREATE ON SCOTT.
You are supposed to backup and keep your *source files after wrapping them.
However it is possible for skilled hackers to unwrap your wrapped Oracle PL/SQL code.