Windows: starting sqlplus in new window from cygwin bash

Posted by katsumii on Oracle Blogs See other posts from Oracle Blogs or by katsumii
Published on Tue, 2 Jul 2013 23:58:30 +0000 Indexed on 2013/07/03 5:12 UTC
Read the original article Hit count: 233

Filed under:

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.





© Oracle Blogs or respective owner

Related posts about /web