Operating system command from PL/SQL Windows

Hi all

I develop an app of proto. I have Oracle 11 GR 2 standard edition 1 on Windows 8.1.

My requirement is OS of PL/SQL command execution. The PLSQLOSCOMMAND.zip meets all the requirements as file ZIP and LOB.

http://www.Oracle.com/technetwork/database/Enterprise-Edition/calling-shell-commands-from-PLSQL-1-1-129519.PDF

Oracle PL/SQL, OS command execution. SourceForge.net

(1) first, I run the install.sql script against my user (STK_BIN). It is to have role DBA. No errors.

2) connect as SYS and running the following commands:

Start

dbms_java.grant_permission ('STK_BIN', 'SYS:java.io.FilePermission', "< < all FILES > >", "read, write, execute, delete");

commit;

dbms_java.grant_permission ("STK_BIN", "SYS:java.lang.RuntimePermission", "readFileDescriptor", ");

commit;

dbms_java.grant_permission ("STK_BIN", "SYS:java.lang.RuntimePermission", "writeFileDescriptor", ");

commit;

end;

(3) select * from dba_java_policy watch

GRANTSTK_BINSYSjava.io.FilePermission< < all FILES > >read, write, execute, deleteACTIVE151
GRANTSTK_BINSYSjava.lang.RuntimePermissionreadFileDescriptorACTIVE152
GRANTSTK_BINSYSjava.lang.RuntimePermissionwriteFileDescriptorACTIVE153

((4) select * from table(file_pkg.get_file_list(file_pkg.get_file('\')));

Shows the correct file and directory details

(5) but when I run the command

Select os_command.exec double '(mkdir STK_BIN_DIR');

It gives me error

ERROR on line 1:

ORA-29532: Java completed by eception Java exception appeal:

java.io.IOException: Exception when creating the process:

java.io.IOException: the handle is invalid.

ORA-06512: at "STK_BIN. OS_COMMAND', line 68

What I did wrong. Why any windows OS running order giving the error?

3DS wrote:

(5) but when I run the command

Select os_command.exec double '(mkdir STK_BIN_DIR');

It gives me error

ERROR on line 1:

ORA-29532: Java completed by eception Java exception appeal:

java.io.IOException: Exception when creating the process:

java.io.IOException: the handle is invalid.

ORA-06512: at "STK_BIN. OS_COMMAND', line 68

I guess that the stored proc Java is designed to run external programs? In this case, there is no mkdir.exe program to load and run. Instead, he entered CLI to the cmd.exe program.

Under the hood, probably the CreateProcess() kernel is called. Have a look to understand the statement of core works to create a process.

Tags: Database

Similar Questions

Maybe you are looking for

  • HP ENVY 17-j013cl... passed to Windows 7 64-bit, HDMI driver needed

    I switched to Windows 7 64 bit, because I just couldn't take Windows 8 more!  Unfortunately, I had some problems, which have fortunately been resolved through this forum.  I'm new here need a HDMI driver so that I can plug this thing to my TV again.

  • New T5i w / 18mm to 135mm lens Pop Up flash question?

    Hi all: I just got my new T5i rebel with the 18mm to 135 mm lens. I use a filter UV Polaroid and lens hood EW-73 b. I take excellent photos, but I wonder if it is having a problem. My problem is the sometimes the flash will pop up and flash in full s

  • HP Mini 1000 Bio lost password

    Hello all first time poster. I recently found an old hp mini 1000 running windows xp in my garage that I want to use for navigation for my daughter of web-based, but I forgot the bio password I put on. After 3 attempts to password I get an error stri

  • HP Deskjet 2540: sweep!

    I have my printer related to eprint through the 'classic printer' set up, but how to scan so that it goes to the computer? I tried to understand this here and there for a few months, nothing done. Any help is greatly appreciated.

  • 4 problems simultaneously on an operating system of Windows 7 need help with this now!

    (1) problem when I try to open a picture using Windows Photo Viewer I get the following Message: Windows Photo Viewer cannot open this picture because you don't have permission to access the location of the file. Problem (2) when I open Microsoft Lif