0

I have a problem in oracle database. I am having a database on which a service is hosted and hence I am not able to see the drives or folders of oracle database. Hence, the procedures using utl_file have stopped working as directory path is invalid now.

How will I read and write on OS file system ? I need to pull out reports from joining 2-3 tables of oracle and pull data out in flat file. where as external tables, and utl_file cannot work as directory path cannot be defined due to hosting layer the oracle OS layer is invisible.

Also, mounting of database is also not permitted and privileges to create directory is also not given.

Could you pleas , please help me. Thanks.

  • I don't understand the question. What does "a service is hosted" mean in this context and how does that relate to whether or not you are able to "see the drives or folders of Oracle database". What changed between the time that the procedures were working and today. My guess is that you are saying that you developed an application locally that relies on `utl_file` but your application is now being hosted by a third party that disallows access to the host file system. Is that close? If that is the case, you'd need to rethink the design of the application or your choice of hosting company. – Justin Cave Nov 08 '13 at 00:02

1 Answers1

0

If you have sysdba privileges on the box, do something along the following lines:

SQL> CREATE DIRECTORY log_dir AS '/appl/gl/log'; 
SQL> GRANT READ ON DIRECTORY log_dir TO DBA; 
SQL> GRANT WRITE ON DIRECTORY log_dir TO DBA; 

If you do not have these privileges, then ask the hosting company to do it. In addition you can always write a report file with sqlplus on your local drive.

steve
  • 5,870
  • 1
  • 21
  • 22