Below is my environment variable setting.Ĭ:\Program Files\Business Objects\common\3.5\bin\NOTES\ Ĭ:\Program Files\Business Objects\common\3.5\bin\NOTES\DATA\ ĭ:\oracle\product\10.2.0\BIN>dir login.sqlĭirectory of D:\oracle\product\10.2.0\BINīut, If i navigate to BIN folder and connect through sqlplus the login.sql script executes sucessfully.ĭ:\oracle\product\10.2.0\BIN>sqlplus Release 11.1.0.6.0 - Production on Sun Jun 27 16:09:27 2010 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Productionĭisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production Please help me to setup this login.sql correctly.ĭ:\>sqlplus Release 11.1.0.6.0 - Production on Sun Jun 27 16:06:59 2010Ĭopyright (c) 1982, 2007, Oracle. I created a login.sql file and placed that in BIN folder and it seems not working properly.
On limited-authority accounts, it defaults to the connect identifier, otherwise I get the server:database name, as below. My glogin.sql includes:Ĭolumn COUNT(*) format 999,999,999,999,999 Īs sqlprompt - default to TNS connectString+userĪlter session set nls_date_format='yyyy-mm-dd HH24:MI:SS' Now I can default to the _CONNECT_IDENTIFIER. However, some accounts don't have access to V$INSTANCE SQL*PLUS used to prompt me for the SQLPrompt when V$INSTANCE wasn't accessible. Sweet! I like showing server:database\user in my SQLprompt. I also tried it while adding a "set define off" command to the glogin.sql script, which gave me this: With the Partitioning, OLAP and Data Mining options Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production Select lower(user) || || global_name into gname from global_name I added this to glogin.sql on my Oracle 10gR2 client:
Ok, I give my colorfull login.sql for unix terminals in 10g, largely inspired from this thread ! Please note that _USER is not equivalent to &_USER because &_USER is executed only during the "set sqlp" and _USER is executed for each prompt. However, the prompt buffer is limited to 50 characters, so if you have _PRIVILEGE" in your prompt, you have only 12 character left. SQL> set sqlp _PRIVILEGE> AS SYSDBA> conn > quit