Wednesday Jul 03, 2013

Windows: starting sqlplus in new window from cygwin bash

When I start sqlplus, more often than not, I want it to start in new window,
whether it be on Linux/Solaris GNOME or Windows.

I seldom use GNOME so I never bothered to figure out how.
On Windows, one can use Windows menu or Win+R "Run" dialog but I prefer using
bash. Because, this way, I can keep the history in ~/.bash_history file.

There are 2 ways. Using cmd.exe or cygstart.

For example, to start default sqlplus.exe to connect to default local instance.

$ cmd /c "start sqlplus sys/oracle as sysdba"

2nd example. To start sqlplus in 2nd Oracle home and to connect to non-default local instance.

$ ORACLE_SID=orcl cygstart /cygdrive/g/app/product/11.2.0.3/dbhome_1/BIN/sqlplus scott

I hope this tip helps reducing your DBA time.





About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« July 2013 »
SunMonTueWedThuFriSat
 
1
4
6
7
8
9
10
11
13
14
15
16
17
18
19
20
21
24
25
26
27
28
29
31
   
       
Today