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: Getting values into SQLPLUS from Unix

Re: Getting values into SQLPLUS from Unix

From: gazzag <gareth_at_jamms.org>
Date: 15 Dec 2005 08:12:15 -0800
Message-ID: <1134663135.036707.201450@o13g2000cwo.googlegroups.com>


You don't need to. Unix will replace the variables when you run the script.

e.g.

Say you call the script with parameters X and Y, what will be passed to SQL*Plus is:

sqlplus /nolog << EOF

    connect / as sysdba
    ALTER SESSION SET CURRENT_SCHEMA=$1; /* semicolon here! */     exec dbms_snapshot.refresh(UPPER('X.Y'));     exit
EOF HTH --j Received on Thu Dec 15 2005 - 10:12:15 CST

Original text of this message

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