From oracle-l-bounce@freelists.org Fri Aug 12 07:26:26 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j7CCQQd8018504 for ; Fri, 12 Aug 2005 07:26:26 -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 j7CCQ4IP018475 for ; Fri, 12 Aug 2005 07:26:09 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 547F01DCDBE; Fri, 12 Aug 2005 07:16:19 -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 32573-06; Fri, 12 Aug 2005 07:16:19 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id CEE9B1DCD5F; Fri, 12 Aug 2005 07:16:18 -0500 (EST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=AxykqfrRYLEW/EM37WLUO/TG4HoCn8IDkU/n1aJlhAle2Wu4zvYs7hv/fR9qt2SQU3YML8F4vvpRbcok9AgScfip94Pwqvz9Gh4AbgkYEqES/3B8bwShhGAT5SaJER7ZctmsL8VX0AXXzkFbNjYCPoZZC4dneNah+zasb12g7BY= Message-ID: <9177895d05081205147430e6c@mail.gmail.com> Date: Fri, 12 Aug 2005 08:14:23 -0400 From: rjamya To: oracle-l@freelists.org Subject: Re: su - oracle -c "script" Cc: Magnus Andersen , joe_dba@hotmail.com In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1632_3458943.1123848863006" References: <5ea1658405081118562e947f8c@mail.gmail.com> X-archive-position: 23807 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: rjamya@gmail.com Precedence: normal Reply-To: rjamya@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=-3.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE autolearn=ham version=2.63 ------=_Part_1632_3458943.1123848863006 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline perhaps you might want to consider sourcing .profile before running sqlplus= . Raj On 8/11/05, Jared Still wrote: >=20 > Even better! >=20 > On 8/11/05, Magnus Andersen wrote: > >=20 > > I use the -s in my scripts in combo with a here doc. > >=20 > > su - oracle -c $ORACLE_HOME/bin/sqlplus -s < > / as sysdba > > @/apps/oracle/select_user.sql > > disconnect > > ! > >=20 > > --=20 > Jared Still=20 > Certifiable Oracle DBA and Part Time Perl Evangelist >=20 >=20 --=20 ------------------------------ select standard_disclaimer from company_requirements where category =3D=20 'MANDATORY'; ------=_Part_1632_3458943.1123848863006 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline perhaps you might want to consider sourcing .profile before running sqlplus= .

Raj

On 8/11/05, Jared Still <jkstill= @gmail.com> wrote:
Even better!

On 8= /11/05, Magnus Andersen < mag.andersen@gmail.com> wrote:
I use the -s in my scripts in combo with a here doc.

su - oracle -c = $ORACLE_HOME/bin/sqlplus -s <<!
/ as sysdba
@/apps/oracle/selec= t_user.sql
disconnect
!

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist




--
----------= --------------------
select standard_disclaimer from company_requirement= s where category =3D 'MANDATORY';
------=_Part_1632_3458943.1123848863006-- -- http://www.freelists.org/webpage/oracle-l