cancel
Showing results for 
Search instead for 
Did you mean: 

sqlplus default values

SOLVED
Go to solution

sqlplus default values

I'm trying to set up the server sqlplus default values when each user logs into sqlplus. It was my understanding that the file $ORACLE_HOME/sqlplus/glogin.sql is used for this. But when I add the following line to the file
set LINESIZE 80
nothing happens when log into sqlplus. Am I using the wrong file? Is there another file in 9i to use?
5 REPLIES
James Specht
Trusted Contributor
Solution

Re: sqlplus default values

We use login.sql not glogin.sql. Plus we have it in a directory that is on the users path. It works fine. Here is our login.sql.

rem
rem customized login.sql for users
rem
SET ECHO OFF
DEF _editor = 'vi'
COLUMN COUNT(*) FORMAT 999999
SET NEWPAGE 1
SET PAGESIZE 24
SET TAB OFF
SET TIME OFF
SET TIMING OFF
SET ECHO OFF
SET SHOWMODE OFF
rem PROMPT end of LOGIN.SQL
"Everyone can be taught to sculpt: Michelangelo would have had to be taught how not to. So it is with the great programmers."
Volker Borowski
Honored Contributor

Re: sqlplus default values

Hi,

do you have a "login.sql" file in the directory where you call "sqlplus" ?
It might overrule settings from glogin.sql

Volker

Re: sqlplus default values

Yes it was the login.sql. After reading the oracle docs I now see that glogin is called before login.sql. And it was in a different directory even though oracle's docs said it is copied to $ORACLE_HOME/dbs/ on install. Thanks for your help.
Christian Gebhardt
Honored Contributor

Re: sqlplus default values

HI

It's not a 9i feature, but every user has it's own loginfile called login.sql in the start-dir of sqlplus.

This file overrides the general settings of glogin.sql

By the way, you mentioned "server sqlplus default".
glogin.sql and login.sql are client settings you have to set on each client.
If you change this files on the oracle server only sqlpus-connections from this server have the new settings.

Chris

Graham Cameron_1
Honored Contributor

Re: sqlplus default values

Be aware that if you have the environment variable $SQLPATH set, SQL*Plus will look there for login.sql. This can be useful for sharing settings between unix accounts, without everyone having to keep a local copy.
Like PATH, SQLPATH can contain a list of directories, separated by colons.
The search order is $PWD, $SQLPATH.
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.