directory created from plsql

All posts relating to Oracle database administration.

Moderator: Tim...

directory created from plsql

Postby Srivalli » Tue Apr 10, 2012 5:27 pm

Hi Tim,

When I execute below plsql block:

SQL>
declare
ln_bool_dir1 number;
begin
ln_bool_dir1 := file_api.mkdir(p_path => '/home/oracle/vipoltp123/files/Evidence_Pkg/vip');
end;

PL/SQL procedure successfully executed.


May I know will the above directory structure will be physically created on the server? If yes, will it be on the DB server or app servers or files/images server or web cache etc. I checked everywhere, but I could find where the directory got created. Will be thankful if you could please assist.

Thanks,
Sri
Thanks.
Srivalli
Member
 
Posts: 26
Joined: Fri Feb 11, 2011 10:35 pm

Re: directory created from plsql

Postby Tim... » Tue Apr 10, 2012 7:10 pm

Hi.

1) The file_api only interacts with the file system on the database server, so if the directory is created, it will be created on that server.

2) You need to output the return value of the function (ln_bool_dir1) to know if the call has been successful or not. If it returns "1" the operation was a success. If it returns "0" it was a failure.

3) You need to have the correct permissions on the file system to do this.

4) The JVM needs the correct permissions on the file system. See your thread about directory permissions here: viewtopic.php?f=1&t=13366

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17953
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: directory created from plsql

Postby Srivalli » Tue Apr 10, 2012 7:44 pm

HI Tim,

the directory structure got created on the db server when I used file_api.mkdirs() instead of file_api.mkdir().


Thanks,
Srivalli
Thanks.
Srivalli
Member
 
Posts: 26
Joined: Fri Feb 11, 2011 10:35 pm

Re: directory created from plsql

Postby Tim... » Tue Apr 10, 2012 9:42 pm

Hi.

OK. So it wasn't just the last directory that was new. :)

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17953
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 2 guests