Re: Writing to a file from trigger

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 20 May 2003 13:16:53 -0700
Message-ID: <92eeeff0.0305201216.1fd392c6_at_posting.google.com>


fareeda_at_pspl.co.in (fareeda) wrote in message news:<c6d78d84.0305200531.3757d323_at_posting.google.com>...
> What are the possible ways and the best among them to write to a file
> thru a oracle trigger?
> UTL_FILE cannot be used in our case since it requires making changes
> in init.ora file and that would need a restart. This is not possible
> in our production environemnt.
> Any help appreciated
> thanks

  1. If you are on 8.0.x or lower, then uou have to use utl_file_dir or external procedure call. (Database must be bounced).
  2. If you are on 8.1.x, then you can use utl_file_dir (Database must be bounced) or java.io (JServer must be installed. Database does not need to be bounced. OS directory and Java.io permissions need to be granted).
  3. If you are on 9i then you can use utl_file_dir (Database does not need to be bounced... use scope=spfile), Directory object (Database does not need to be bounced. OS directory permissions required) or java.io (JServer must be installed. Database does not need to be bounced. OS directory and java.io permissions need to be granted).

In every case, you can write/append or read files. However, you can only scan/browse/create/remove a directory using java. Oracle does not provide that functionality.

Regards
/Rauf Sarwar Received on Tue May 20 2003 - 22:16:53 CEST

Original text of this message