Вы находитесь на странице: 1из 3

PL/SQL 10 g

UTL_COMPRESS

UTL_COMPRESS package provides an API to allow compression and decompression of binary data (RAW, BLOB and BFILE). It uses the Lempel-Ziv compression algorithm which is equivalent to functionality of the gzip utility.
-- Initialize both BLOBs to something. l_original_blob:=
TO_BLOB(UTL_RAW.CAST_TO_RAW('1234567890123456789012345678901234567890'));

l_compressed_blob := TO_BLOB('1'); l_uncompressed_blob := TO_BLOB('1'); -- Compress the data. UTL_COMPRESS.lz_compress (src => l_original_blob, dst => l_compressed_blob); -- Uncompress the data. UTL_COMPRESS.lz_uncompress (src => l_compressed_blob, dst => l_uncompressed_blob);

UTL_Compress

13-Sep-13 8:44 PM

Copyright i-flex solutions Training Department, 2005. All rights reserved.

PL/SQL 10 g

UTL_MAIL

Provides a simple API to allow email to be sent from PL/SQL.


In prior versions this was possible using the UTL_SMTP package, but this required knowledge of the SMTP protocol. The package also supports sending mails with RAW and VARCHAR2 attachments. Run the following scripts:
CONN sys/password AS SYSDBA @$ORACLE_HOME/rdbms/admin/utlmail.sql @$ORACLE_HOME/rdbms/admin/prvtmail.plb

Set SMTP_OUT_SERVER parameter


ALTER SYSTEM SET smtp_out_server='smtp.domain.com SCOPE=SPFILE; UTL_MAIL.send( sender => 'me@domain.com', recipients => 'person1@domain.com,person2@domain.com', cc => 'person3@domain.com', bcc => 'myboss@domain.com', subject => 'UTL_MAIL Test', message => 'If you get this message it worked!');
13-Sep-13 8:44 PM 2

UTL_Mail

Copyright i-flex solutions Training Department, 2005. All rights reserved.

PL/SQL 10 g

Flashback Query Functions

Translate between a date and time, and the System Change Number. SCN provide a precise way to see the data as it was at that moment. TIMESTAMP_TO_SCN Returns the SCN associated with that timestamp. SCN_TO_TIMESTAMP Returns the timestamp associated with that SCN.

flashback_fun

13-Sep-13 8:44 PM

Copyright i-flex solutions Training Department, 2005. All rights reserved.

Вам также может понравиться