oracle 預存程序加密的方法

來源:互聯網
上載者:User

配置環境:
  1、數 據 庫:Oracle 8i R2 (8.1.7) for NT 企業版
  2、安裝路徑:C:ORACLE
  實現方法:
  1.D:>set NLS_LANG=AMERICAN_AMERICA.USACII7
   或
   D:>set NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
D:>set
  直接打set命令可以查看環境變數
  2.在D:下建立a.sql檔案,內容如下:
Java代碼
  create or replace procedure test1(i in number) as
   begin
   dbms_output.put_line('輸入參數是'||to_char(i));
   end;
  create or replace procedure test1(i in number) as
   begin
   dbms_output.put_line('輸入參數是'||to_char(i));
   end;
  3.D:>wrap iname=a.sql
  PL/SQL Wrapper: Release 8.1.7.0.0 - Production on Tue Nov 27 22:26:48 2001
  Copyright (c) Oracle Corporation 1993, 2000. All Rights Reserved.
  Processing a.sql to a.plb
  4.開啟a.plb,現在它的內容如下:
 Java代碼
 create or replace procedure test1 wrapped
   0
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   3
   7
   8106000
   1
   4
   0
   8
   2 :e:
   1TEST1:
   1I:
   1NUMBER:
   1DBMS_OUTPUT:
   1PUT_LINE:
   1輸入參數是:
   1||:
   1TO_CHAR:
   0
  
   0
   0
   1f
   2
   0 1d 9a 8f a0 b0 3d b4
   55 6a :2 a0 6b 6e 7e :2 a0 a5
   b b4 2e a5 57 b7 a4 b1
   11 68 4f 17 b5
   1f
   2
   0 3 4 1d 19 18 25 15
   2a 2e 32 36 3a 3d 42 45
   49 4d 4e 50 51 56 57 5c
   5e 62 64 70 74 76 7f
   1f
   2
   0 1 b 11 16 :2 11 10 :3 1
   :2 d 16 22 24 2c :2 24 :2 16 :a 1
  
   1f
   2
   0 :9 1 :d 3 :2 2 :3 1 4 :2 1
   81
   4
   :4 0 1 :a 0 1b
   1 :4 0 5 :2 0
   :2 3 :3 0 2 :7 0
   5 4 :3 0 7
   :2 0 1b 2 8
   :2 0 4 :3 0 5
   :3 0 a b 0
   6 :4 0 7 :2 0
   8 :3 0 2 :3 0
   7 f 11 9
   e 13 :3 0 :2 c
   15 :2 0 17 10
   1a :3 0 1a 0
   1a 19 17 18
   :6 0 1b :2 0 2
   8 1a 1d :2 0
   1 1b 1e :8 0
  
   13
   4
   :3 0 1 3 1
   6 1 10 2
   d 12 1 14
   1 16 2 16
   1c
   1
   4
   0
   1d
   0
   1
   14
   1
   2
   0 0 0 0 0 0 0 0
   0 0 0 0 0 0 0 0
   0 0 0 0
   2 0 1
   3 1 0
   0
 create or replace procedure test1 wrapped
   0
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   abcd
   3
   7
   8106000
   1
   4
   0
   8
   2 :e:
   1TEST1:
   1I:
   1NUMBER:
   1DBMS_OUTPUT:
   1PUT_LINE:
   1輸入參數是:
   1||:
   1TO_CHAR:
   0
  
   0
   0
   1f
   2
   0 1d 9a 8f a0 b0 3d b4
   55 6a :2 a0 6b 6e 7e :2 a0 a5
   b b4 2e a5 57 b7 a4 b1
   11 68 4f 17 b5
   1f
   2
   0 3 4 1d 19 18 25 15
   2a 2e 32 36 3a 3d 42 45
   49 4d 4e 50 51 56 57 5c
   5e 62 64 70 74 76 7f
   1f
   2
   0 1 b 11 16 :2 11 10 :3 1
   :2 d 16 22 24 2c :2 24 :2 16 :a 1
  
   1f
   2
   0 :9 1 :d 3 :2 2 :3 1 4 :2 1
   81
   4
   :4 0 1 :a 0 1b
   1 :4 0 5 :2 0
   :2 3 :3 0 2 :7 0
   5 4 :3 0 7
   :2 0 1b 2 8
   :2 0 4 :3 0 5
   :3 0 a b 0
   6 :4 0 7 :2 0
   8 :3 0 2 :3 0
   7 f 11 9
   e 13 :3 0 :2 c
   15 :2 0 17 10
   1a :3 0 1a 0
   1a 19 17 18
   :6 0 1b :2 0 2
   8 1a 1d :2 0
   1 1b 1e :8 0
  
   13
   4
   :3 0 1 3 1
   6 1 10 2
   d 12 1 14
   1 16 2 16
   1c
   1
   4
   0
   1d
   0
   1
   14
   1
   2
   0 0 0 0 0 0 0 0
   0 0 0 0 0 0 0 0
   0 0 0 0
   2 0 1
   3 1 0
   0  
  5.運行a.plb
  Java代碼
SQL> @d:a.plb
SQL> @d:a.plb
  過程已建立。
  6、運行預存程序
  Java代碼
SQL> set serveroutput on
   SQL> execute test1(1);
SQL> set serveroutput on
   SQL> execute test1(1);
  輸入參數是1
  PL/SQL 過程已成功完成。
  7、查看預存程序的代碼
  Java代碼
SQL> select name,text from all_source where type='PROCEDURE' and name='TEST1';
SQL> select name,text from all_source where type='PROCEDURE' and name='TEST1';
  結果:看不到其源碼
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.