From oracle-l-bounce@freelists.org  Thu Jul  7 15:29:44 2005
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air891.startdedicated.com (root@localhost)
 by orafaq.com (8.12.10/8.12.10) with ESMTP id j67KTica020930
 for <oracle-l@orafaq.com>; Thu, 7 Jul 2005 15:29:44 -0500
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j67KTdIP020904
 for <oracle-l@orafaq.com>; Thu, 7 Jul 2005 15:29:41 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 8EB071CB010;
 Thu,  7 Jul 2005 15:26:32 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 26423-03; Thu, 7 Jul 2005 15:26:32 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 15DD11CAF38;
 Thu,  7 Jul 2005 15:26:32 -0500 (EST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=qAoF7J+8FrBST1IZirVM5FRTVmba7mF5ZPBChm89GEXvSYUCrgvxMETGdyLz8XsKHTTxMhOujBEnLZt64rpcNLMwMluC1HfiGettOGTBNgEYXAGC4tTWi+e9x0DY1LXWxhXt0U88i/YUfNrD+W7uhh1b/ucIf/IZc79F8c3Ew3I=
Message-ID: <f8c47710507071324709d57fa@mail.gmail.com>
Date: Thu, 7 Jul 2005 16:24:35 -0400
From: Paul Baumgartel <paul.baumgartel@gmail.com>
To: Oracle-L@freelists.org
Subject: Re: SQl Help - use of special characters in a script when sending a password
In-Reply-To: <3F02DCE8969E484482022C07D8CD6D9BE73170@waumail02.wausau.int>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by Ecartis
Content-Disposition: inline
References: <3F02DCE8969E484482022C07D8CD6D9BE73170@waumail02.wausau.int>
X-archive-position: 22216
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: paul.baumgartel@gmail.com
Precedence: normal
Reply-To: paul.baumgartel@gmail.com
X-list: oracle-l
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net
X-mailscan-MailScanner-Information: Please contact the ISP for more information
X-mailscan-MailScanner: Found to be clean
X-MailScanner-From: oracle-l-bounce@freelists.org
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on 
 air891.startdedicated.com
X-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
 version=2.63

in the login.sql, bracket the connect line with

set scan off

and

set scan on

The sqlplus command "set scan" controls whether sqlplus looks for the
defined substitution character.



On 7/7/05, Henslee, Jeff <jhenslee@wausauwindow.com> wrote:
> Apologies for the simple question - but I'm having a total brain fart.
> ======
> Oracle 8.1.74 and Solaris 8
> I have a file which I use in scripts to connect as a certain user.  They are set to be available to only the oracle user and members of the dba group.
> 
> basically, they are hidden files and called:
>         .<username>.login.sql
> and contain:
>         connect username/password
> 
> when I execute sqlplus I use:
> $ sqlplus -s /nolog @.<username>login.sql
> 
> My problem is that I have a user password that contains a '&' character.
> 
> (Example:)
> connect username/Blob21&vb02
> 
> How can I code in the '&' character into my script and NOT have sqlplus think it is a variable? Anybody ever run into this?
> 
> I know that in SQL you can use something like:
> 
> select field1, field2
> from foo
> where code like '%\_%' escape '\'
> 
> How can I do it in a password (file) in my example?
> 
> Please advise.
> 
> Many Thanks!
> 
> Jeffrey C. Henslee
> mailto:jhenslee@wausauwindow.com
> 
> --
> http://www.freelists.org/webpage/oracle-l
> 


-- 
Paul Baumgartel
paul.baumgartel@aya.yale.edu
--
http://www.freelists.org/webpage/oracle-l

