Re: Cygwin for use on Oracle Servers
- From: "J. Laurindo Chiappa" <jlchiappa1967@xxxxxxxxx>
- To: jkstill@xxxxxxxxx
- Date: Mon, 19 Oct 2009 20:32:40 -0300
Jared , I use cygwin for simple tasks only (ie, check the last first
lines on log files, count lines, find patterns/files, etc), this kind of
task is so much easier with the unix commands/tools, I think...
Regarding variables, the ORACLE variables (ie, like ORACLE_SID,
ORACLE_HOME, etc) will be used by windows executables, so must follow
Windows conventions, and system variables (like PATH) must follow cygwin
ones, as :
chiappa@user-b468644a75 ~
$ export ORACLE_SID=O10GR2
chiappa@user-b468644a75 ~
$ export ORACLE_HOME="C:\O10GR2"
chiappa@user-b468644a75 ~
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Arquivos de
programas/PC
Connectivity
Solution/:/cygdrive/c/O9IR2/jre/1.4.2/bin/client:/cygdrive/c/O9IR2
/jre/1.4.2/bin:/cygdrive/c/O9IR2/bin:/cygdrive/c/O9IR2/bin:/cygdrive/c/Arquivos
de programas/Oracle/jre/1.3.1/bin:/cygdrive/c/Arquivos de
programas/Oracle/jre/1
.1.8/bin:/cygdrive/c/O10GR2/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Arquivos de
programas/QuickTime/Q
TSystem/:/cygdrive/c/Arquivos de
programas/UltraEdit14/:/cygdrive/c/Arquivos de
programas/IDM Computer Solutions:/usr/lib/lapack
chiappa@user-b468644a75 ~
$ export PATH=/cygdrive/c/O10GR2/bin:$PATH
chiappa@user-b468644a75 ~
$ echo $ORACLE_HOME
C:\O10GR2
chiappa@user-b468644a75 ~
$ echo $ORACLE_SID
O10GR2
chiappa@user-b468644a75 ~
$ echo $PATH
/cygdrive/c/O10GR2/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/A
rquivos de programas/PC Connectivity
Solution/:/cygdrive/c/O9IR2/jre/1.4.2/bin/c
lient:/cygdrive/c/O9IR2/jre/1.4.2/bin:/cygdrive/c/O9IR2/bin:/cygdrive/c/O9IR2/bi
n:/cygdrive/c/Arquivos de
programas/Oracle/jre/1.3.1/bin:/cygdrive/c/Arquivos de
programas/Oracle/jre/1.1.8/bin:/cygdrive/c/O10GR2/bin:/cygdrive/c/WINDOWS/syste
m32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Arquivos
d
e programas/QuickTime/QTSystem/:/cygdrive/c/Arquivos de
programas/UltraEdit14/:/
cygdrive/c/Arquivos de programas/IDM Computer Solutions:/usr/lib/lapack
chiappa@user-b468644a75 ~
$ sqlplus system/oracle
SQL*Plus: Release 10.2.0.4.0 - Production on Seg Out 19 20:20:43 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Conectado a:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring
Engine
and Real Application Testing options
SYSTEM@O10GR2:SQL>
SYSTEM@O10GR2:SQL>exit
Desconectado de Oracle Database 10g Enterprise Edition Release
10.2.0.4.0 - Prod
uction
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring
Engine
and Real Application Testing options
chiappa@user-b468644a75 ~
$ lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.4.0 - Production on
19-OUT-2009 20:21
:25
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Estabelecendo conexÒo com
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=LOCALHOST)(P
ORT=1521)))
STATUS do LISTENER
------------------------
Apelido LISTENER
VersÒo TNSLSNR for 32-bit Windows: Version 10.2.0.4.0
- Produ
ction
Data Inicial 19-OUT-2009 20:17:05
Funcionamento 0 dias 0 hr. 4 min. 20 seg
NÝvel de Anßlise off
Seguranþa ON: Local OS Authentication
SNMP OFF
Arq. ParÔm. Listn. C:\O10GR2\network\admin\listener.ora
Arq. Log Listener C:\O10GR2\network\log\listener.log
Resumo de Atendimento...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=user-b468644a75)(PORT=8080))(Present
ation=HTTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=user-b468644a75)(PORT=2100))(Present
ation=FTP)(Session=RAW))
Resumo de Serviþos...
O serviþo "O9IR2" tem 1 instÔncia(s).
InstÔncia "O9IR2", status UNKNOWN, tem 1 handler(s) para este serviþo...
O serviþo "o10gr2" tem 1 instÔncia(s).
InstÔncia "o10gr2", status READY, tem 1 handler(s) para este serviþo...
O serviþo "o10gr2XDB" tem 1 instÔncia(s).
InstÔncia "o10gr2", status READY, tem 1 handler(s) para este serviþo...
O serviþo "o10gr2_XPT" tem 1 instÔncia(s).
InstÔncia "o10gr2", status READY, tem 1 handler(s) para este serviþo...
O comando foi executado com Ûxito
chiappa@user-b468644a75 ~
$ pwd
/home/chiappa
chiappa@user-b468644a75 ~
Regards,
Chiappa
Jared Still escreveu:
Why use Cygwin?
Because I can then easily make use of a large body
of scripts that are already written.
Bash/ksh are much better scripting environments IMO
than what is natively offered on Windows.
You are free to disagree of course. I have spent a fair
amount of time in both environments, and much prefer
bash/ksh, thank you.
Let's however try to keep this thread on track, I'm not
interested in debates on the best environment.
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com
On Mon, Oct 19, 2009 at 12:21 PM, Christopher Boyle
<cboyle@xxxxxxxxxxxxxxxxxxxxxx <mailto:cboyle@xxxxxxxxxxxxxxxxxxxxxx>>
wrote:
This is going to sound like a stupid question but why are you
going to use Cygwin at all? I understand that ‘nix scripts are
already written/debugged and that’s the environment that most
oracle people are used to but why place another layer of software
in the stack as opposed to taking the opportunity to assimilate
how to do things in the windows environment into your
development/DBA lexicon? Does using Cygwin provide something
besides ease of using the existing tools?
(to paraphrase Robert Freeman from earlier today “Please $diety,
don’t let this make me look too stupid and clueless”)
*From:* oracle-l-bounce@xxxxxxxxxxxxx
<mailto:oracle-l-bounce@xxxxxxxxxxxxx>
[mailto:oracle-l-bounce@xxxxxxxxxxxxx
<mailto:oracle-l-bounce@xxxxxxxxxxxxx>] *On Behalf Of *Jared Still
*Sent:* Monday, October 19, 2009 1:27 PM
*To:* Oracle-L Freelists
*Subject:* Cygwin for use on Oracle Servers
It seems the windows servers are going to proliferate here. (sigh)
There are a number of you that are regularly using Cygwin on windows
servers so as to have a decent scripting and cmd line environment.
While I have used Cygwin casually on my own laptop for use with
Oracle, I have never made serious use of it.
If you have any tips to offer (ie. hard learned lessons) for using
Cygwin
it would be appreciated. If I learn enough I can consolidate it into
a blog entry.
Some examples of what I am looking for:
How do you set up the PATH? (linux style or DOS style directories
in PATH?)
Any tricks to setting up the Oracle ENV variables?
etc...
Thanks,
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com
--
http://www.freelists.org/webpage/oracle-l
Other related posts: