Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Command line script to check Oracle login and logoff

Re: Command line script to check Oracle login and logoff

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 30 Nov 2004 16:20:23 -0800
Message-ID: <92eeeff0.0411301620.2f78c3a3@posting.google.com>


Jens Riedel <JensRie_at_gmx.de> wrote in message news:<312tniF34vgk8U1_at_uni-berlin.de>...
> Hello,
>
> I want to test in an application if an Oracle DB is available and a
> login is successfull.
> Now I'm looking for a batch script which I can run under WinNT. It
> should proceed a logon at the database (which is installed on the same
> system) and logoff again and then give back a return value which
> indicates if the process was successfull.
>
> I'm not very familiar with Oracle and its build-in tools so please
> excuse if this question seems stupid.
>
> Can anybody give me a hint how to realize this?
>
> Thanks,
> Jens

If you understand DOS then you can do this,

C:\> echo exit|sqlplus username/password_at_database|find /i "connected to:" >NUL If return errorlevel is 0 the logon OK else not.

You can easily incorporate this into a batch script.

Regards
/Rauf Received on Tue Nov 30 2004 - 18:20:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US