Q

Pointing to local directory in PL/SQL procedure

Can I point to a local directory for the UTL_FILE_DIR in a PL/SQL procedure?

Can I point to a local directory for the UTL_FILE_DIR in the PL/SQL procedure as follows?
UTL_FILE_DIR = c:/temp
Thanks in advance!
You can point to the file system in a procedure by using dynamic SQL. Also the UTL_FILE_DIR init.ora parameter cannot be changed for a session. It can only be changed for the system. Below is an example of a procedure used to change the value of the UTL_FILE_DIR init.ora parameter:
          declare

          begin

                 execute immediate ('alter system 
set utl_file_dir=''d:oracleadmintest1udump'' 
scope = spfile');

          end;
This was first published in July 2006

Dig deeper on Using Oracle PL-SQL

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close