Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting values into SQLPLUS from Unix
amerar_at_iwc.net wrote:
> sqlplus /nolog <<EOF
> connect / as sysdba
> ALTER SESSION SET CURRENT_SCHEMA=&1
> exec dbms_snapshot.refresh(UPPER('&1.&2'));
> exit
> EOF
>
> I want to pass in the values for &1 and &2........I am calling this
> from a Unix shell script. Any ideas?
You may want to use shell script parameters, not SQL*Plus ones.
sqlplus /nolog << EOF
connect / as sysdba
ALTER SESSION SET CURRENT_SCHEMA=$1; /* semicolon here! */
exec dbms_snapshot.refresh(UPPER('$1.$2'));
exit
EOF
HTH. Kind regards,
-- Seven-hundred tons of metal a day Now sir you tell me the world's changed Once I made you rich enough Rich enough to forget my nameReceived on Thu Dec 15 2005 - 10:01:32 CST
![]() |
![]() |