时间:2021-07-01 10:21:17 帮助过:30人阅读
无详细内容 无 create or replace procedure proc_encrypt_procOrFun(obj_name in varchar2, out_text out varchar2) as --===================================================== --功能:加密存储过程或函数 --参数:obj_name 要加密的过程或函数 -- out_t
<无详细内容> <无>create or replace procedure proc_encrypt_procOrFun(obj_name in varchar2, out_text out varchar2) as --===================================================== --功能:加密存储过程或函数 --参数:obj_name 要加密的过程或函数 -- out_text 加密后的密文 --===================================================== v_text varchar2(32767) default 'create or replace '; begin for c in (select text from user_source t where name=upper(obj_name)) loop v_text := v_text||c.text; end loop; v_text := dbms_ddl.wrap(v_text); out_text := v_text; --execute immediate v_text; --dbms_output.put_line(v_text); exception when others then dbms_output.put_line(sqlerrm); end proc_encrypt_procOrFun; create or replace function fun_encrypt_procOrFun(obj_name varchar2) return varchar2 as --===================================================== --功能:加密存储过程或函数 --参数:obj_name 要加密的过程或函数 --===================================================== v_text varchar2(32767) default 'create or replace '; begin for c in (select text from user_source t where name=upper(obj_name)) loop v_text := v_text||c.text; end loop; v_text := dbms_ddl.wrap(v_text); --execute immediate v_text; --dbms_output.put_line(v_text); return (v_text); exception when others then dbms_output.put_line(sqlerrm); return (sqlerrm); end fun_encrypt_procOrFun;