Hi, I've downloaded and extracted instantclient and sqlplus for instant client. Added instantclient to libraries (through ldconf), added sqlplus.so to libraries also, added sqlplus executable to $PATH, installed rlwrap. I see that in sqlplus's directory there is glogin.sql. I've added "set linesize 100" there. Also I've created SQLPATH variable pointing to the directory where glogin.sql located. But it seems that when I connect to my database through 'rlwrap sqlplus name/pwd@url:port/sid' glogin.sql isn't applied. I execute 'show linesize' and it prints me default 80. Please advise.
As I found from intsant client sqlplus documentation, when using instant client there's no need to set ORACLE_HOME. http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ape.htm#CHDJCDFA Thus i didn't set ORACLE_HOME environment variable. glogin.sql resides in /usr/local/instantclient10_1 as well as sqlplus executable. Btw I tried to make there 'admin' directory and put glogin.sql there, but this didn't help.
have you had any success in resolving your glogin issue?
the recommended setting of ORACLE_HOME didn't help, neiother did ORACLE_PATH nor renaming glogin.sql to login.sql;
oracle instant client 18.104.22.168.0 on win 7 x64
pps: (partial solution)
executing sqlplus in the directory where a login.sql file is located did the trick for me
Edited by: user10304394 on 24.04.2012 22:35
I am running in a MAC OS X environment, but the following worked for me.
Added login.sql to the instantclient_10_2 directory (For Mac, had to install 32 bit)
modified .profile and added the following line (if .profile doesn't exist, create it)
alias sp='cd ~/instantclient_10_2;rlwrap sqlplus /nolog'
Restart iTerm or whichever terminal window you are using. Now works.
I found 2 ways of resolving this
1. as mentioned previously by klee: change to the directory of sqlplus before launching it
put this as an alias, or in a shell script.
2. use the SQLPATH variable
All the above assume that ORACLE_HOME=/path/to/instantclient where sqlplus and glogin.sql file reside