Re: Question: Connect on NT - one line command.

From: Ken Johnson <ken.johnson_at_mail.tapestry.com>
Date: 1996/05/31
Message-ID: <31AFCA0B.145_at_mail.tapestry.com>#1/1


mahaly wrote:
>
> Dear all,
>
> I used to use Oracle 7 on Solaris. I was then able
> to issue a command like:
> >sqlplus {user}/{password} "_at_{file}"
> to connect {user} and to execute {file} before the DB
> gives the control to me.
>
> Now, I am using Oracle 7.1.3 on WNT 3.51. and I want to
> issue the same type of one-line command.
>
> When I issue the command:
> >sqldba mode=line {user}/{password}, any
> character after mode=line is ignored by the DB and I have
> to type the command
> >connect {user}/{password} under the sqlplus prompt to
> be connected.
>
> Now, if I create a file connect.sql with only the line
> connect {user}/{password} in it [with no exit], if I execute
> the command
> >sqldba mode=line < connect.sql,
> the connection is executed but the sqlplus control is not
> given to me. The control comes back to DOS.
>
> Can someone give me a solution?
>
> I hope, my explanation is clear enough.
>
> Thanks in advance.
>
> -Mahaly.
> Schlumberger Riboud Product Centre
> Clamart-France.Idea 1:

        Try Using lmode=y instead of mode=line

Idea 2:

        You can create a SQL file that SQL*DBA will run whenever it starts. I think its Login.SQL, but you should check your Oracle Installation Manual to find out for sure. You could then put whatever text was in connect.sql in that file.

-- 
-------------------------------------------------
Ken Johnson -  Technical Consultant
Tapestry Computing, Inc. http://www.tapestry.com
Received on Fri May 31 1996 - 00:00:00 CEST

Original text of this message