Home » Infrastructure » Windows » how to run dos command from sqlplus window (ORACLE 9i -- winXP)
how to run dos command from sqlplus window [message #301049] Tue, 19 February 2008 01:22 Go to next message
pankajkmeena
Messages: 46
Registered: September 2007
Member
can anybody know how to run dos command from sql prompt.
i.e.
SQL>!DIR

Same can be done in unix using ! character.
SQL>!ls -lrt

thankx




Re: how to run dos command from sqlplus window [message #301050 is a reply to message #301049] Tue, 19 February 2008 01:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
host dir
Re: how to run dos command from sqlplus window [message #301052 is a reply to message #301050] Tue, 19 February 2008 01:28 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Or even
SQL> $dir
(which might work as you're on XP)
icon6.gif  Re: how to run dos command from sqlplus window [message #301276 is a reply to message #301052] Tue, 19 February 2008 23:24 Go to previous messageGo to next message
pankajkmeena
Messages: 46
Registered: September 2007
Member
thankx it works Razz
Re: how to run dos command from sqlplus window [message #515300 is a reply to message #301049] Sun, 10 July 2011 06:13 Go to previous messageGo to next message
kiraanr
Messages: 2
Registered: July 2011
Location: Trivandrum
Junior Member
Hi ,

What about windows 7.

SQL> $Dir
The above command is working

But other commands like cd is not working,

SQL> $cd C:\Release



regards
Re: how to run dos command from sqlplus window [message #515303 is a reply to message #515300] Sun, 10 July 2011 06:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
But other commands like cd is not working,

SQL> $cd C:\Release

This command is meaningless inside SQL*.

The standard way to execute a command in SQL*Plus is using the "host" command.
This is the ONLY one that works for ANY OS.

Regards
Michel

[Updated on: Sun, 10 July 2011 06:39]

Report message to a moderator

Re: how to run dos command from sqlplus window [message #515307 is a reply to message #515303] Sun, 10 July 2011 07:35 Go to previous message
kiraanr
Messages: 2
Registered: July 2011
Location: Trivandrum
Junior Member
Thx..it works.
Previous Topic: Data from Oracle to Microsoft Word
Next Topic: Ora 10g Client Question on W2k8
Goto Forum:
  


Current Time: Thu Mar 28 18:54:11 CDT 2024