Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: NOWAIT exit from sqlplus when ORA-12545
Hi
j'd like to rectify:
sqlplus -L works only with oracle 9i
So the only solution for 8i is testing tnsping.
Le problem is that after the the sqlerror is 0 if the server is
connected even if the database is shutdown.
mso
mso a écrit :
> Hi
> thanks everybody for your participation.
> The solution given by someone is to use sqlplus with -L option.
> So it does only one connection.
> It's exactly what i need.
> Thanks a lot
>
> mso
>
>
> StefanKapitza a écrit :
>
> > mso wrote:
> > > Hi
> > > (it's for: Windows NT/XP and Oracle 8.1.7.4)
> > >
> > > J have a problem when J run test.bat such as :
> > > sqlplus infolig/edfinfo_at_POR1_SPARE @my_file.sql
> > > if %errorlevel% NEQ 0 echo KO: %ERRORLEVEL% else echo OK
> > > %ERRORLEVEL%
> > > --
> > > When my POR1_SPARE server is not accessible/not connected the test.bat
> > > is waiting with ORA-12545.
> > > --------------------------------------------------------------------------------------------------------------------------------
> > >
> > > D:\IL\BD_IL5\EvoPrisme\Upgrade>sqlplus infolig/edfinfo_at_POR1_SPARE
> > > @my_file.sql
> > >
> > > SQL*Plus: Release 8.1.7.0.0 - Production on Ve Aou 18 15:16:31 2006
> > >
> > > (c) Copyright 2000 Oracle Corporation. All rights reserved.
> > >
> > > ERROR:
> > > ORA-12545: Connexion impossible car l'h¶te ou l'objet cible n'existe
> > > pas
> > >
> > >
> > > Entrez le nom utilisateur :
> > > --------------------------------------------------------------------------------------------------------------------------------
> > > Would it be possible to avoid it and exit the sqlplus immediately (is
> > > it any SqlNet parameter) ?
> > >
> > > Thanks a lot
> > >
> > > mso
> >
> > You could use tnsping or ping for a servercheck and then evaluate
> > %errorlevel%.
> >
> > If you want to use SQLPLUS then you can use the /nolog switch and do
> > the connect in
> > the sql Script. Maybe you could build some error Handling with the
> > spool command
> > and a dos FIND.
> >
> > regards
> >
> > s.kapitza
Received on Thu Aug 24 2006 - 10:05:19 CDT