Home » SQL & PL/SQL » SQL & PL/SQL » Using HOST command inside PL/SQL
Using HOST command inside PL/SQL [message #16207] Wed, 17 November 2004 00:42 Go to next message
Jana
Messages: 4
Registered: July 1998
Junior Member
Hi to all

How to use HOST command inside PL/SQL.

I tried using EXECUTE IMMEDIATE but it is not working.

Help is required on how to use the HOST command inside a PL/sql or any command equal to HOST.

Thanks In Advance
Jana
Re: Using HOST command inside PL/SQL [message #16210 is a reply to message #16207] Wed, 17 November 2004 03:25 Go to previous messageGo to next message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
There is no PL/SQL command HOST. To call an OS function you will need Java, C or a hand-rolled system using DBMS_PIPE.

If you search asktom.orcle.com for "Java OS Host PL/SQL" you'll find some examples.
Re: Using HOST command inside PL/SQL [message #16212 is a reply to message #16207] Wed, 17 November 2004 05:20 Go to previous messageGo to next message
Edward Stoever
Messages: 58
Registered: August 2002
Member
The host command is used in SQLPlus to tell SQLPlus to do something on the OS of the client machine. The HOST command is not available in PL/SQL because the code of PL/SQL is run on the database. Nevertheless, there Oracle supplied packages that can do things on the OS that you can use in PL/SQL. Check out the UTL_FILE package, which you can describe just like a table. UTL_FILE can be used to read and write text files on the operating system of the machine that the oracle instance is on.

Good luck!

Edward -- www.database-expert.com
Re: Using HOST command inside PL/SQL [message #16432 is a reply to message #16212] Sun, 28 November 2004 16:19 Go to previous message
newdays
Messages: 1
Registered: November 2004
Junior Member
but the utl_file package can't create the folder.
how can I create the new folder?
Previous Topic: decode
Next Topic: static function and member function
Goto Forum:
  


Current Time: Wed Jun 03 01:48:54 CDT 2026