Solved

Oracle stored procedure write a file to a network drive

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

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 74

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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 copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

840 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