Home » SQL & PL/SQL » SQL & PL/SQL » Shell and PLSQL
Shell and PLSQL [message #191512] Wed, 06 September 2006 17:20 Go to next message
Upperm
Messages: 95
Registered: July 2003
Member
Hello folks,

I have a SHELL script ( contains only the OS commands) nammed "script_1".
Is there any technic (or statement) to let me be able to call "script_1" from a PLQSL script ?

..Thankful for any help Smile

Re: Shell and PLSQL [message #191513 is a reply to message #191512] Wed, 06 September 2006 17:31 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
by using Java or External Procedures; but not easily
Re: Shell and PLSQL [message #191515 is a reply to message #191513] Wed, 06 September 2006 18:00 Go to previous messageGo to next message
Upperm
Messages: 95
Registered: July 2003
Member
.. External procedures like what ?

Re: Shell and PLSQL [message #191516 is a reply to message #191512] Wed, 06 September 2006 18:08 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
It appears you are either incapable or unwilling to use Google!
Results 1 - 10 of about 4,960,000 for Oracle external Procedure.
In any case I refuse to spoon feed you further.
You're On Your Own (YOYO)!
Re: Shell and PLSQL [message #192552 is a reply to message #191512] Tue, 12 September 2006 18:42 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
You don't need to anything fancy to call an OS script or command from within a SQL or PL/SQL script (when you call the script from sqlplus). This is from HP Unix:

>sqlplus scott/tiger@dev

SQL*Plus: Release 9.2.0.6.0 - Production on Tue Sep 12 16:38:37 2006

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.7.0 - Production

SQL> @t.sql
SQL> set echo on
SQL> set serveroutput on
SQL> --SQL
SQL> select sysdate from dual;

SYSDATE
------------------
12-SEP-06

SQL> -- Use ! or host for OS commands
SQL> ! ps -ef | grep PMON
  scott 13712 13702  0 16:40:33 ttyp9     0:00 grep PMON

SQL> --PL/SQL
SQL> exec dbms_output.put_line('hello');
hello

PL/SQL procedure successfully completed.

SQL>


Previous Topic: passing parameters to pl/sql tables
Next Topic: ORA-ORA-00604 and ORA-01400 problem while executing stored procedure
Goto Forum:
  


Current Time: Sun Dec 11 02:27:39 CST 2016

Total time taken to generate the page: 0.08145 seconds