This content has been marked as final. Show 9 replies
Seems variable 1 gets another value.
The 'select' is not recognized as an internal or external command failure is caused by entering select on de c:\ prompt after the 'exit' of your script
To test :
1) remove the exit from the script
2) run the script
you wil get the same failure but probably stay within sqplus
3) enter the command DEFINE
you wil probably see
DEFINE 1 = "Files\oracle\product\10.2.0\client_1\sqlplus\admin\glogin.sql"
DEFINE 2 = "2"
SQL> DEFINE 1=my1
you should see
DEFINE 1 = "my1"
DEFINE 2 = "2"
enter connect scott/tiger
if the "Files... value is back
there is a DEFINE command in your login.sql or glogin.sql file on this PC
The login.sql and glogin.sql scripts are executed each time you connect in sqlplus in this release : in prior release they were only executed at starting SQLPLUS
Thank you. I removed the exit and did as you suggested and yes define 1 flipped back to Files\...
I searched the HD of this computer for login.sql and glogin.sql and only found the glogin.sql and did not find a DEFINE statement within. Is there someother .profile or similar on a windows based OS that could be changing this?
Is there away to set something in a login.sql script that would run and override what is happening to the first parameter passed? Or to put something within the test.sql script to change this?
I thought of the dummy parm, but that would cause a quite a bit of re-write. It is very strange that it is acting this way. Below is the glogin.sql. Also I did a login of sqlplus user/pass@db and just did a define and saw 1 is being set. I am not sure if the login.sql is in a location that I cant find?
I dont believe the glogin.sql is different than the packaged version.
-- Copyright (c) 1988, 2004, Oracle Corporation. All Rights Reserved.
-- SQL*Plus global login "site profile" file
-- Add any SQL*Plus commands here that are to be executed when a
-- user starts SQL*Plus, or uses the SQL*Plus CONNECT command
-- This script is automatically run
-- Used by Trusted Oracle
COLUMN ROWLABEL FORMAT A15
-- Used for the SHOW ERRORS command
COLUMN LINE/COL FORMAT A8
COLUMN ERROR FORMAT A65 WORD_WRAPPED
-- Used for the SHOW SGA command
COLUMN name_col_plus_show_sga FORMAT a24
COLUMN units_col_plus_show_sga FORMAT a15
-- Defaults for SHOW PARAMETERS
COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE
-- Defaults for SHOW RECYCLEBIN
COLUMN origname_plus_show_recyc FORMAT a16 HEADING 'ORIGINAL NAME'
COLUMN objectname_plus_show_recyc FORMAT a30 HEADING 'RECYCLEBIN NAME'
COLUMN objtype_plus_show_recyc FORMAT a12 HEADING 'OBJECT TYPE'
COLUMN droptime_plus_show_recyc FORMAT a19 HEADING 'DROP TIME'
-- Defaults for SET AUTOTRACE EXPLAIN report
-- These column definitions are only used when SQL*Plus
-- is connected to Oracle 9.2 or earlier.
COLUMN id_plus_exp FORMAT 990 HEADING i
COLUMN parent_id_plus_exp FORMAT 990 HEADING p
COLUMN plan_plus_exp FORMAT a60
COLUMN object_node_plus_exp FORMAT a8
COLUMN other_tag_plus_exp FORMAT a29
COLUMN other_plus_exp FORMAT a44
-- Default for XQUERY
COLUMN result_plus_xquery HEADING 'Result Sequence'
We were able to get past this by running an install product for oracle that brings up the GUI that has list of installed products, unistall the client and then we performed an install of the client after this was performed the issue was resolved. We do not know how the DEFINE 1 was getting set but thankful we got passed it.
I was able to resolve this by changing my ORACLE_HOME variable to use shorten path.
Old Home: Q:\Program Files\Oracle
New Home: Q:\PROGRA~1\Oracle
There are several PATHs in the regustry (Windows 2003 Server) with the path define with "Program Files" in the path. I would think the best option would be to re-install Oracle client and use shorten path or just install to a path without a space.
and that is your answer ... don't install into a folder with spaces anywhere in the (full) pathname.
It's been a problem in some older versions which has been fixed at some point (not quite sure when)i.
Then we get 64 bit windows which introduces Program Files (x64) as a name, which breaks all this stuff again.
So, avoid the pain and stick with simple file and folder names.