Solved

Oracle stored procedure write a file to a network drive

Posted on 2009-04-06
4
1,294 Views
Last Modified: 2013-12-18
I have a stored procedure in Oracle 10G.  This procedure will read from a table and create a fixed width flat file by using the: UTL_File.put_line command.

The DBA set up entries in init.ora file to
Include a parameter for utl_file_dir for each directory we want to make accessible for UTL_FILE operations.  

This all works in the test environment.  When we went to production no file is ever created.  I believe that the init.ora file is set up correctly in production.  The DIFFERENCE between test and production environment is the test database is within the domain and the production database is within it's own workgroup outside the domain.  Therefore, thinking that the server that the file is to be written to, does not know who Oracle is, if that makes sense, and won't allow the file to be written.

If anyone has any ideas as to a fix or workaround, that would be great!
0
Comment
Question by:mdcadu
  • 2
  • 2
4 Comments
 
LVL 73

Expert Comment

by:sdstuber
ID: 24081862
either add the Oracle user and production domain to the file share's list of acceptable users

or map the directory on the db server using a user/domain that is allowed.


I think the first option would be preferable
0
 

Author Comment

by:mdcadu
ID: 24081927
Our Network person would not allow the mapping of the directory on the db server.

Could you please further explain what you mean on your first option?  Where do I add the Oracle user (and how do I know what the Oracle user is?)?
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 24082311
check the services and see what user runs the service.

If it's the local system account, you probably won't be able to do it.
Another user that is on the domain but is also an administrator would have to run your db.

If your network person is blocking this, have him/her suggest an alternative that would satisfy your company's security requirements
0
 

Author Closing Comment

by:mdcadu
ID: 31567247
The solution is based on the feedback that there is no resolution based on my environment for what I need to do.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now