Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: su - oracle -c "script"
I typically wrap all sql scripts in a ksh script when su'ing to oracle.
>>> rjamya <rjamya_at_gmail.com> 08/12/05 8:14 AM >>>
perhaps you might want to consider sourcing .profile before running sqlplus.
Raj
On 8/11/05, Jared Still <jkstill_at_gmail.com> wrote:Even better!
On 8/11/05, Magnus Andersen < mag.andersen_at_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/select_user.sql
disconnect
!
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- ------------------------------ select standard_disclaimer from company_requirements where category = 'MANDATORY'; -- http://www.freelists.org/webpage/oracle-lReceived on Fri Aug 12 2005 - 07:41:32 CDT
![]() |
![]() |