Home » SQL & PL/SQL » SQL & PL/SQL » Login to UNIX from Oracle stored procedure
Login to UNIX from Oracle stored procedure [message #353771] Wed, 15 October 2008 01:25 Go to next message
amalesh2008
Messages: 7
Registered: September 2008
Location: New York
Junior Member
Hi,

Can anyone help me in the following problem?

I have created a file in a UNIX box using the UTL_FILE package using a PL/SQL procedure. Now from that same procedure I need to login to the UNIX box and run some UNIX commands there like "compress" or "mkdir" etc.?

How do I login to the UNIX box from Oracle stored procedure and execute UNIX commands?

My Oracle version is Oracle 8i.

Thanks
Re: Login to UNIX from Oracle stored procedure [message #353773 is a reply to message #353771] Wed, 15 October 2008 01:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68704
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can't "log" to Unix, you already are on the server when you execute PL/SQL.
AskTom: Java procedure for host calls on Unix environment

Regards
Michel
Re: Login to UNIX from Oracle stored procedure [message #353774 is a reply to message #353773] Wed, 15 October 2008 01:32 Go to previous messageGo to next message
amalesh2008
Messages: 7
Registered: September 2008
Location: New York
Junior Member
Thanks for such quick response.
My main query is :
How can I execute UNIX commands in PL/SQL procedure?

Thanks
Re: Login to UNIX from Oracle stored procedure [message #353785 is a reply to message #353771] Wed, 15 October 2008 02:01 Go to previous messageGo to next message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
On 10g you can use DBMS_SCHEDULER.

On older versions I'm afraid Java or C external procedures are the only choices.
Re: Login to UNIX from Oracle stored procedure [message #353794 is a reply to message #353774] Wed, 15 October 2008 02:46 Go to previous message
Michel Cadot
Messages: 68704
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You OBVIOUSLY didn't read the link above.
READ it, understand it, and then come back.

Regards
Michel
Previous Topic: while executing procedure : Savepoint never established
Next Topic: Definition in Synonym
Goto Forum:
  


Current Time: Tue Nov 05 13:03:07 CST 2024