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

Home -> Community -> Usenet -> c.d.o.server -> Re: window solution :-)

Re: window solution :-)

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 22 Feb 2005 07:26:37 -0800
Message-ID: <1109085997.171812.164010@f14g2000cwb.googlegroups.com>

Mark C. Stock wrote:
> "Rauf Sarwar" <rs_arwar_at_hotmail.com> wrote in message
> news:1109080132.816614.276640_at_c13g2000cwb.googlegroups.com...
> > Good try. See comments embedded.
> >
> > jazzz_ wrote:
> >> OK, thanks for your help
> >> I found solution.
> >>
> >> here is Windows version:
> >>
> >> 1. Make batch file 1.sql which include:
> >>
> >> sqlplus @c:\username.sql
> >>
> >> 2. Make file username.sql and inside put:
> >>
> >> us/pass_at_db
> >
> > Put connect keyword in the beginning i.e. connect us/pass_at_db
> >
>
> good catch... but then the batch file must include the /NOLOG
command line
> option
>
> the OP might want to consider just using CONNECT without hard-coding
the db
> credentials, letting SQL*Plus prompt for the credentials
>
> or, pass the credentials via the command line (just deferring the
issue, but
> perhaps deferring it to a more centralized and controllable
location):
>
> sqlplus -s /nolog @usernames.sql scott/tiger_at_orcl

Another variation is to pass the password from the batch script which does not show as part of the command line. e.g.

script.sql
connect user_at_db
select .....
exit
C:\> echo password|sqlplus -s /nolog @script.sql OR
script.sql
select ....
exit
C:\> echo password|sqlplus -s user_at_db @script.sql

Regards
/Rauf Received on Tue Feb 22 2005 - 09:26:37 CST

Original text of this message

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