Bisa lebih specific ke level directory atau file

SQL> EXEC DBMS_JAVA.GRANT_PERMISSION(
        'ORDSYS',
        'java.io.FilePermission',
        '/home/oracle/test.txt',
        'read,write,delete');

SQL> EXEC DBMS_JAVA.GRANT_PERMISSION(
        'ORDSYS',
        'java.io.FilePermission',
        '/home/oracle/test.zip',
        'read,write,delete');

--- In [email protected], Asep Inbisco IT <[EMAIL PROTECTED]> 
wrote:
>
> Nerus nih teman-teman, lalu bagaimana kalau parameter , '<<ALL 
FILES>>'
> ingin kita ganti dengan khusus Text File saja, bagaimana 
kalimatnya?
> 
>  
> 
>   _____  
> 
> From: [email protected] [mailto:indo-
[EMAIL PROTECTED] On
> Behalf Of Asep Inbisco IT
> Sent: 20 Maret 2007 8:35
> To: [email protected]
> Subject: RE: [indo-oracle] Re: Output PL-SQL ke zip
> 
>  
> 
> Wuiih.......hebat ....command tersebut sudah saya execute dan 
berhasil
> melakukan zip file dari file sebesar 1.260 KB jadi hanya sekecil 
57 KB saja.
> Thank's Mas Bowo, Mas Hernowo, Thank's teman-teman....
> 
> _____ 
> 
> From: indo-oracle@ <mailto:indo-oracle%40yahoogroups.com> 
yahoogroups.com
> [mailto:indo-oracle@ <mailto:indo-oracle%40yahoogroups.com> 
yahoogroups.com]
> On
> Behalf Of Yulius Wibowo
> Sent: 20 Maret 2007 7:12
> To: indo-oracle@ <mailto:indo-oracle%40yahoogroups.com> 
yahoogroups.com
> Subject: [indo-oracle] Re: Output PL-SQL ke zip
> 
> Yoi,... Sorry, kurang
> Jalankan perintah tsb sbg user SYS
> Asumsinya, yg melakukan zipping adalah SCOTT ...
> 
> SQL> EXEC DBMS_JAVA.grant_permission
> ('SCOTT', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write, 
> execute, delete');
> 
> CMIIW,
> 
> Bowo
> 
> --- In indo-oracle@ <mailto:indo-oracle%40yahoogroups.com> 
yahoogroups.com,
> Hernowo <myhernk@> wrote:
> >
> > Saya juga mencoba sudah mencoba solusi dari mas
> > bowo.Waktu itu saya pakai untuk nge-zip flat file.
> > 
> > Mungkin yang perlu diperhatikan adalah grant java-nya.
> > Coba deh di grant dulu pake
> > dbms_java.grant_permission.
> > 
> > CMIIW
> > 
> > 
> > --- Asep Inbisco IT <asep.it@> wrote:
> > 
> > > Maaf teman-teman saya buka lagi arsip lama dari mas
> > > Bowo, mas Bowo saya
> > > sudah coba solusi dari mas Bowo dibawah ini, dan
> > > ketika dijalankan keluar
> > > pesan 'PL/SQL procedure successfully completed' , 
> > > tapi kenapa hasilnya
> > > tidak ada? (Zip file tidak terbentuk). Apa saja yang
> > > harus saya perhatikan
> > > sebelum menjalankan procedure ini? Sebagai informasi
> > > saya punya text file
> > > yang akan saya compress di directory /u02/test.txt
> > > yang letaknya di database
> > > server yang menggunakan os RHEL ver 4 for OpenPower.
> > > 
> > > Demikian problem saya,mohon pencerahan dari mas Bowo
> > > dan teman-teman.
> > > 
> > > -----Original Message-----
> > > From: indo-oracle@ <mailto:indo-oracle%40yahoogroups.com>
> yahoogroups.com
> > > [mailto:indo-oracle@ <mailto:indo-oracle%40yahoogroups.com>
> yahoogroups.com] On
> > > Behalf Of Yulius Wibowo
> > > Sent: 05 Juli 2006 10:24
> > > To: indo-oracle@ <mailto:indo-oracle%40yahoogroups.com> 
yahoogroups.com
> > > Subject: [indo-oracle] Re: Output PL-SQL ke zip
> > > 
> > > UTL_COMPRESS hanya ada mulai database 10G.
> > > 
> > > Alternatif lain, anda bisa membuat program
> > > menggunakan Java di dalam 
> > > database. Berikut ini contoh program yg saya kutip
> > > dari sebuah 
> > > source.
> > > 
> > > 
> > > CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED
> > > "UTLZip" AS
> > > import java.util.zip.*;
> > > import java.io.*;
> > > public class UTLZip
> > > {
> > > public static void compressFile(String infilename,
> > > String 
> > > outfilename)
> > > {
> > > try
> > > {
> > > FileOutputStream fout = new
> > > FileOutputStream(outfilename);
> > > ZipOutputStream zout = new
> > > ZipOutputStream(fout);
> > > ZipEntry ze = new ZipEntry((new
> > > File(infilename)).getName());
> > > try 
> > > {
> > > FileInputStream fin = new
> > > FileInputStream(infilename);
> > > zout.putNextEntry(ze);
> > > copy(fin, zout);
> > > zout.closeEntry();
> > > fin.close();
> > > }
> > > catch (IOException ie)
> > > {
> > > System.out.println("IO Exception occurred: " +
> > > ie);
> > > }
> > > zout.close();
> > > }
> > > catch(Exception e)
> > > {
> > > System.out.println("Exception occurred: " + e);
> > > }
> > > }
> > > 
> > > public static void copy(InputStream in,
> > > OutputStream out) 
> > > throws IOException
> > > { 
> > > byte[] buffer = new byte[4096];
> > > while (true) {
> > > int bytesRead = in.read(buffer);
> > > if (bytesRead == -1) break;
> > > out.write(buffer, 0, bytesRead);
> > > }
> > > } 
> > > }
> > > /
> > > 
> > > CREATE OR REPLACE PACKAGE UTLZip
> > > IS
> > > PROCEDURE compressFile (p_in_file IN VARCHAR2,
> > > p_out_file IN 
> > > VARCHAR2)
> > > AS
> > > LANGUAGE JAVA
> > > NAME 'UTLZip.compressFile(java.lang.String,
> > > 
> > > java.lang.String)';
> > > END;
> > > /
> > > 
> > > Contoh penggunaannya:
> > > 
> > > SQL> exec UTLZip.compressFile 
> > > ('/home/oracle/test.txt','/home/oracle/test.zip')
> > > 
> > > 
> > > Bowo
> > > 
> > > 
> > > --- In indo-oracle@ <mailto:indo-oracle%40yahoogroups.com>
> yahoogroups.com, "Yulius Wibowo" 
> > > <yulius_wibowo@> wrote:
> > > >
> > > > Pakai UTL_COMPRESS
> > > > 
> > > > Bowo
> > > > 
> > > > --- In indo-oracle@ <mailto:indo-oracle%40yahoogroups.com>
> yahoogroups.com, Rahandra
> > > Pramono <RPramono@> 
> > > > wrote:
> > > > >
> > > > > Dear all,
> > > > > 
> > > > > 
> > > > > 
> > > > > Ada yang tau gak gimana melakukan kompresi
> > > langsung untuk output 
> > > > dari
> > > > > pl-sql?
> > > > > 
> > > > > Package yang dipakai apa ya?
> > > > > 
> > > > > Atau Cuma ada satu cara dengan menggunakan
> > > kompresi dari system?
> > > > > 
> > > > > 
> > > > > 
> > > > > Mohon pencerahannya ya
> > > > > 
> > > > > 
> > > > > 
> > > > > Terima kasih
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > [Non-text portions of this message have been
> > > removed]
> > > > >
> > > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --
> > > -----------I.N.D.O - O.R.A.C.L.E---------------
> > > Keluar: indo-oracle- <mailto:indo-oracle-unsubscribe%
40yahoogroups.com>
> unsubscribe@ <mailto:unsubscribe%40yahoogroups.com> yahoogroups.com
> > > Website: http://indo- <http://indo->  <http://indo-
> <http://indo-oracle.blogspot.com> oracle.blogspot.com>
> oracle.blogspot.com
> > > Mirror: http://indooracle. <http://indooracle.>  
<http://indooracle.
> <http://indooracle.wordpress.com> wordpress.com>
> wordpress.com
> > > -----------------------------------------------
> > > 
> > > Bergabung dengan Indonesia Thin Client User Groups, 
> > > Terminal Server, Citrix, New Moon Caneveral, di:
> > > http://indo- <http://indo->  <http://indo-
> <http://indo-thin.blogspot.com> thin.blogspot.com> 
thin.blogspot.com 
> > > Yahoo! Groups Links
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > ------------------------------
> > warm regards
> > ~hernk
> > 
> > 
> > 
> > 
> __________________________________________________________
> _______________
> > Now that's room service! Choose from over 150,000 hotels
> > in 45,000 destinations on Yahoo! Travel to find your fit.
> > http://farechase. <http://farechase.>  <http://farechase.
> <http://farechase.yahoo.com/promo-generic-14795097>
> yahoo.com/promo-generic-14795097>
> yahoo.com/promo-generic-14795097
> >
> 
> [Non-text portions of this message have been removed]
> 
>  
> 
> 
> 
> [Non-text portions of this message have been removed]
>


Kirim email ke