Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: PL/SQL, UTL FILE dynamic read v$parameter

RE: PL/SQL, UTL FILE dynamic read v$parameter

From: Vergara, Michael (TEM) <mvergara_at_guidant.com>
Date: Mon, 19 Nov 2001 12:09:10 -0800
Message-ID: <F001.003C8CA5.20011119115522@fatcity.com>

<SPAN

class=061544919-19112001>Linda:
<SPAN

class=061544919-19112001> 
<SPAN

class=061544919-19112001>Try this:
<SPAN

class=061544919-19112001> 
<SPAN

class=061544919-19112001>Enclose the string in single quotes, as:
<SPAN

class=061544919-19112001>     fileid0 := UTL_FILE.FOPEN(''''||v_utl_file_dir_name||'''',
<SPAN

class=061544919-19112001>         

                     'sequence_data','W') 
;  
<SPAN

class=061544919-19112001> 
<SPAN
class=061544919-19112001>And consider that <FONT 
color=#0000ff face="Courier New" size=2><SPAN 
class=061544919-19112001>utl_file_dir can have multiple paths, separated 
as
<SPAN

class=061544919-19112001>     utl_file_dir = '/path1,/path2,/path3'
<SPAN

class=061544919-19112001>...or even...
<SPAN

class=061544919-19112001>     utl_file_dir = *
<SPAN

class=061544919-19112001>...(even though Oracle recommends against this), and your script
<SPAN

class=061544919-19112001>would not handle either of these.
<SPAN

class=061544919-19112001> 
 
---

<FONT color=#0000ff face="Courier New"
size=2>=========================================================================== Michael P. Vergara Oracle DBA Guidant Corporation (909) 914-2304 <FONT face=Tahoma size=2>-----Original Message-----From: Hagedorn, Linda [mailto:lindah_at_epocrates.com]Sent: Monday, November 19, 2001 11:20 AMTo: Multiple recipients of list ORACLE-LSubject: PL/SQL, UTL FILE dynamic read v$parameter Hello, Is it possible in PL/SQL to read v$parameter and pass the value for utl_file_dir to the UTL_FILE.FOPEN statement?  This is my current attempt, and it's failing with the error, below.       select value into v_utl_file_dir_name from v$parameter where name = 'utl_file_dir' ;   <FONT size=2>   fileid0 := UTL_FILE.FOPEN(v_utl_file_dir_name,'sequence_data','W') ;    
Received on Mon Nov 19 2001 - 14:09:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US