process error


 
Thread Tools Search this Thread
Top Forums Programming process error
# 1  
Old 11-22-2007
process error

Hi all,Smilie
i need to exexute OS commands from oracle prompt.
For that i did the following steps
1) created a java source called "Host".
2)created a pl/sql procedure called'Host_Command '.
3)issued the following statements
EXEC dbms_java.grant_permission( 'TMS','SYS:java.io.FilePermission', '/bin/sh', 'execute' )

EXEC Dbms_Java.Grant_Permission('TMS', 'SYS:java.lang.RuntimePermission','writeFileDescriptor', '');

EXEC Dbms_Java.Grant_Permission('TMS', 'SYS:java.lang.RuntimePermission','readFileDescriptor', '');

Finally i executed the folllowing statements.
SET SERVEROUTPUT ON SIZE 1000000
CALL DBMS_JAVA.SET_OUTPUT(1000000);
BEGIN
Host_Command ('ls');
END;
/
But i ma getting the following process error;
Process err :/bin/sh: ls: No such file or directory

PL/SQL procedure successfully completed.

Any idea pls.

cheers
RRK
# 2  
Old 11-22-2007
What does the Host java code do exactly?

Try fully qualified path for "ls", eg "/usr/bin/ls" or whatever.
# 3  
Old 11-23-2007
Quote:
Originally Posted by ravi raj kumar
Hi all,Smilie
i need to exexute OS commands from oracle prompt.
Do you mean the SqlPlus shell?
if so you can execute OS commands with '!'.

for example:
SQL> !ls -l
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Redhat Virtualization EN error : InitLogger main process terminated with status 1

My server has /var/log/messages with 'init: initLogger main process (608798) terminated with status 1' errors. I researched about the error and also followed the steps from stackexchange : 157059/error-init-ttys0-dev-ttys0-main-process-1612-terminated-with-status-1]linux - ERROR: init: ttyS0... (0 Replies)
Discussion started by: Paras Pandey
0 Replies

2. Red Hat

Process with S state(Interruptable) in RHEL and gives Advertise error after restarting/Killing the p

Hello, In our Production system one process is in S state(interruptible)and after killing and restarting the process gives 'advertise error'. This error goes after rebooting the Server. I have RHEL 5.9 (tikanga) OS in our server. We tried debugging the issue with the help of 'strace' command... (9 Replies)
Discussion started by: Rohits
9 Replies

3. Shell Programming and Scripting

Read: no query process ERROR

Hi, With root user i set this in the .bashrc of user1 on machine 1 more .bashrc ./track.sh # .bashrc # Source global definitions if ; then . /etc/bashrc fi Content of track.sh are more track.sh read -p "Enter ID:" reason while ] # While string is different or empty...... (4 Replies)
Discussion started by: mohtashims
4 Replies

4. Shell Programming and Scripting

UNIX--Check Process not found error

hi guys can you please help me i have the following script to load to a database but when i execute it...its saying Check_Process: not found #!/bin/ksh ##-To load Oracle user profile ##./monitor_io.ksh ##./test.ksh SCP_DIR=/export/home/yani_m/scripts ... (9 Replies)
Discussion started by: LucyYani
9 Replies

5. UNIX and Linux Applications

Unix pkill error; does wily obstruct me killing the process?

have two scripts on Unix; one that starts some processes and the other one for killing a process. At first, I ran the .sh without WILY in it and it worked perfectly; in this way, I could also ran my stopper process. However I need WILY in this so I added it to my script but this time, a message... (1 Reply)
Discussion started by: nerdogan551
1 Replies

6. Shell Programming and Scripting

Redirect standard error to input of other process, 2| ?

Hello, I would like to know if there is a shell in which operations such as 2| (redirect standard error of one process to the standard input of another one) exist? I know it is possible to do it in bash with things like: (process 2>&1) | other_process but I find it a bit intricate when... (3 Replies)
Discussion started by: chlorine
3 Replies

7. Shell Programming and Scripting

Error in script to automate the daily monitoring process of UNIX server and it's proc

hi friends, I am trying to automate the daily monitoring process of UNIX server and it's processes. the script are below i executed the above script using ksh -x monitortest1.sh in root login . It shows error at some lines . 1. i logged in using root ,but it... (8 Replies)
Discussion started by: rdhaprakasam
8 Replies

8. HP-UX

error : can not fork new process

hi today we came across error "can not fork new process" when i checked there were 400 ksh processes were running for that particular user ( due to kernel parameter setting no of processes were restricted to 400 ) and the reason for this was somebody executed shell script which had "*" ( only *... (3 Replies)
Discussion started by: zedex
3 Replies

9. UNIX for Advanced & Expert Users

SIGTTOU Error in FTP process

Hi, I am getting the + Stopped (SIGTTOU) error while trying to FTP some files.Here is what am doing: I have database sitting on the UNIX box.I have a table where i stored the ipaddress,username and password.Now i have a script,when run,goes to the database,takes the ipaddress,username and... (1 Reply)
Discussion started by: Kumar71
1 Replies

10. UNIX for Advanced & Expert Users

login error(can not set process env.)

I have created user in AIX 4.3.3 which the member of staff group. but during login ( with su command) it gives the error "can not set process environment " but when it is member of another group -dba -which is the group for oracle database- it works properly. Pls let me know the solution. ... (5 Replies)
Discussion started by: amit
5 Replies
Login or Register to Ask a Question