dbTalk Databases Forums  

SQL*Plus Parameters

comp.databases.oracle comp.databases.oracle


Discuss SQL*Plus Parameters in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter
 
Posts: n/a

Default SQL*Plus Parameters - 07-27-2004 , 01:30 AM






Has anyone seen this before?

I start SQL*Plus, and login by typing
sqlplus Quantum/Password@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?

Reply With Quote
  #2  
Old   
Mark D Powell
 
Posts: n/a

Default Re: SQL*Plus Parameters - 07-27-2004 , 10:35 AM






peterc (AT) mailinator (DOT) com (Peter) wrote in message news:<c5cf058e.0407262230.55392f65 (AT) posting (DOT) google.com>...
Quote:
Has anyone seen this before?

I start SQL*Plus, and login by typing
sqlplus Quantum/Password@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 --


Reply With Quote
  #3  
Old   
Peter
 
Posts: n/a

Default Re: SQL*Plus Parameters - 07-27-2004 , 11:10 PM



Quote:
Has anyone seen this before?

I start SQL*Plus, and login by typing
sqlplus Quantum/Password@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 --
(Thinks -- Hmmmm, I could have a money making opportunity here...)

How much would you be willing to bet?

Unfortunately it does it for parameters passed from the command line
too. The first command line parameter is ignored/oblitereated and
replaced by "Files\_Tools\ora816\sqlplus\admin\glogin.sql" .
Subsequent parameters (&2, &3, etc.) seem fine.

Work arounds are pretty obvious, but it pains me admit defeat to this
kind of trivial nonsense.

Thanx for your comments,

--Peter


Reply With Quote
  #4  
Old   
Mark D Powell
 
Posts: n/a

Default Re: SQL*Plus Parameters - 07-28-2004 , 08:26 AM



peterc (AT) mailinator (DOT) com (Peter) wrote in message news:<c5cf058e.0407272010.bc4fb58 (AT) posting (DOT) google.com>...
Quote:
Has anyone seen this before?

I start SQL*Plus, and login by typing
sqlplus Quantum/Password@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 --

(Thinks -- Hmmmm, I could have a money making opportunity here...)

How much would you be willing to bet?

Unfortunately it does it for parameters passed from the command line
too. The first command line parameter is ignored/oblitereated and
replaced by "Files\_Tools\ora816\sqlplus\admin\glogin.sql" .
Subsequent parameters (&2, &3, etc.) seem fine.

Work arounds are pretty obvious, but it pains me admit defeat to this
kind of trivial nonsense.

Thanx for your comments,

--Peter
Peter, you did not list your Oracle version. If you are on an older
version perhaps an upgrade will include a fix for this problem.

Have you searched metalink for the bug and possible patch?

HTH -- Mark D Powell --


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.