The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-06-2006
renichols renichols is offline
Registered User
 

Join Date: Mar 2006
Posts: 3
SQLPLUS in script

I have a script that passes a parameter to the sqlplus command that looks like the following:


#!/bin/sh

TARGET_SID=$1
AUXILIARY_SID=$2
sqlplus 'sys@$AUXILIARY_SID as sysdba' @shutdown.sql

I keep getting the following error:
ERROR:
ORA-12154: TNS:could not resolve service name
HOWEVER, I have my sid defined in the tnsnames.ora AND if I take out the parameter $AUXILIARY_SID and put in the actual sid name (PPRD) it works fine. Any Ideas?

Thanks!
Rhonda Nichols
Reply With Quote
Remove advertisements
!!
Forum Sponsor