Oracle Directories

很多事情很多心情写了也就记下了; 不写,以后可能就忘了.
打印 被阅读次数

In oracle, we can define object 'Directory', so in PL/SQL, we can refer the directory object.

For example, directory object 'XX_EXPORT_TO_BAAN' is defined.

Then in PL/SQL block, we can refer it like below.

l_out_dir varchar2(50) := 'XX_EXPORT_TO_BAAN';
l_out_file varchar2(50) := 'o'||fnd_profile.value('CONC_REQUEST_ID')||'.out';
l_out_file varchar2(50) := 'ACT_LINE_TO_BAAN.txt';
l_conn UTL_TCP.connection;
v_file UTL_FILE.FILE_TYPE;

v_file := UTL_FILE.FOPEN(location => l_out_dir,
                                             filename => l_out_file,
                                             open_mode => 'w',
                                             max_linesize => 32767);

登录后才可评论.