Solved

Oracle stored procedure write a file to a network drive

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

Join & Write a Comment

Suggested Solutions

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…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

747 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

11 Experts available now in Live!

Get 1:1 Help Now