How to find Unix Environment Variables from PL/SQL [message #46035] |
Tue, 04 May 2004 16:27 |
ajay
Messages: 45 Registered: December 2000
|
Member |
|
|
Hello,
I am trying to figure out a way to determine the unix environment variable's actual value from PL/SQL.
e.g. in the Unix the $XXDATA is setup as /usr/data
for creating a file via utl_file, you need to pass the actual value of $XXDATA and at runtime it should determine this path correctly.
I know that host command can be executed from sql script but from pl/sql how can I do that.
Thanks,
Ajay
|
|
|
Re: How to find Unix Environment Variables from PL/SQL [message #46042 is a reply to message #46035] |
Wed, 05 May 2004 04:32 |
Art Metzer
Messages: 2480 Registered: December 2002
|
Senior Member |
|
|
If you're truly only interested in UTL_FILE directories, you can issue the following SQL to get that list:SQL> SELECT vp.value FROM v$parameter vp WHERE vp.name = 'utl_file_dir';
VALUE
-----------------------------------------------------------------------------------
/usr/tmp, /usr/tmp/ora8i, /usr/tmp/ora8i/outbound
SQL> If you're absolutely keen on running shell commands from PL/SQL, then have a look at this Ask Tom discussion.
Hope this helps,
Art.
|
|
|