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.





Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

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

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today