Solved

Oracle stored procedure write a file to a network drive

Posted on 2009-04-06
4
1,295 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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

803 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