Oracle 10g可以線上加密過程

來源:互聯網
上載者:User

Oracle提供了WRAP工具,可以對預存程序進行加密,而在10g中,這個操作已經可以在資料庫中完成。

Oracle的DBMS_DDL增加了一個WRAP函數,通過這個函數,就可以返回加密後的過程:

SQL> select dbms_ddl.wrap('create procedure p_wrap as begin null; end;') from dual;

DBMS_DDL.WRAP('CREATEPROCEDUREP_WRAPASBEGINNULL;END;')

--------------------------------------------------------------------------------------

create procedure p_wrap wrapped

a000000

354

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

7

25 59

fpR2Lh8mLtoZnFowf5kMdCUxdiYwg5nnm7+fMr2ywFwW45aW8lZpuHQruMAy/tJepZmBCC0r

uIHHLcmmprNznsM=

有了這個功能,使用者就不需要單獨執行命令列的wrap工具了,預存程序的加密工作在資料庫中就可以完成。

Oracle還有更加方便的功能,根據未加密的預存程序直接建立加密後的過程:

SQL> exec dbms_ddl.create_wrapped('create procedure p_wrap as begin null; end;')

PL/SQL procedure successfully completed.

SQL> select text from user_source where name = 'P_WRAP' order by 1;

TEXT

------------------------------------------------------------------------------------

procedure p_wrap wrapped

a000000

354

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

abcd

7

25 59

fpR2Lh8mLtoZnFowf5kMdCUxdiYwg5nnm7+fMr2ywFwW45aW8lZpuHQruMAy/tJepZmBCC0r

uIHHLcmmprNznsM=

對於長度超過32767的預存程序,CREATE_WRAPPED過程還重載了其他兩個方法,使用者可以將預存程序切割成256或32767的字串,儲存到一個索引表中,介面是DBMS_SQL.VARCHAR2S和DBMS_SQL.VARCHAR2A。

使用CREATE_WRAPPED使得建立機密的預存程序變得更加的簡單。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.