Re: SQL*Plus Parameters

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 27 Jul 2004 08:35:48 -0700
Message-ID: <2687bb95.0407270735.24ed5f01_at_posting.google.com>


peterc_at_mailinator.com (Peter) wrote in message news:<c5cf058e.0407262230.55392f65_at_posting.google.com>...
> Has anyone seen this before?
>
> I start SQL*Plus, and login by typing
> sqlplus Quantum/Password_at_BPrd
>
> I type:
>
> select '&1' from dual;
>
> it responds
> old 1: select '&1' from dual
> new 1: select 'Files\_Tools\ora816\sqlplus\admin\glogin.sql' from
> dual
>
> Where on earth did "Files\_Tools\ora816\sqlplus\admin\glogin.sql" come
> from?!?!?!
>
> This does not happen if I copy SQL*Plus to the root folder and execute
> it from there.
>
> Can anyone cast some light on this?

I attempted to duplicate your post but I am on AIX 5.2 running Oracle 9.2.0.4 and SQLPlus queried me for the value of the label, which is probably what you expected.

However, I would point out that &1, &2 are for positional parameters passed on a start line as in "start my_script 110 Tuesday". In a script that you expect to execute from the SQLPlus command line without passed parameters you should just use a name instead of a number for the label variables: &limit or something.

You appear to be on Windows so perhaps the global login file is passed to sqlplus as its first parameter and the value is not cleared. I am willing to bet the parameter would work fine if the script was execute via a start with parameters.

HTH -- Mark D Powell -- Received on Tue Jul 27 2004 - 17:35:48 CEST

Original text of this message