Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: sqlplus from Unix prompt

Re: sqlplus from Unix prompt

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Thu, 11 Jan 2001 13:56:27 GMT
Message-ID: <3A5DBB8B.BD9B39CA@edcmail.cr.usgs.gov>

Yes, GLOGIN.SQL always gets executed. And if memory serves me correctly, it will get executed right before the LOGIN.SQL files gets executed. I verified this with the following:

   My GLOGIN.SQL file contains a line that says SET PAGESIZE 14    My LOGIN.SQL file contains a line that says SET PAGESIZE 40 After starting SQL*Plus, I did a SHOW PAGESIZE and I got '40' back. So any similar settings in the two files are overridden by the ones in the LOGIN.SQL file (since it gets executed *after* the GLOGIN.SQL file).

Your ORACLE_PATH may be AIX specific. On my Solaris and SG IRIX servers, I don't even set this variable. I use SQLPATH instead.

HTH,
Brian

vk02720_at_my-deja.com wrote:
>
> Does GLOGIN.SQL gets executed even if LOGIN.SQL is found ?
> In my environment ( AIX 4.3, Oracle 7.3.4 ) env var ORACLE_PATH is used
> for searching for login.sql and not SQLPATH.
>
> In article <3A5C68DD.6190CAE6_at_edcmail.cr.usgs.gov>,
> Brian Peasland <peasland_at_edcmail.cr.usgs.gov> wrote:
> > > Script done, file is sqlogin.log
> > > SUPERUSER_at_tantalus:/tmp> grep log sqlogin.log
> > > stat64("/dev/conslog", 0xEFFFC358) = 0
> > > stat64("/dev/conslog", 0xEFFFC938) = 0
> > > access("/home/charliem/osm/dyna/login.sql", 0) = 0
> > > open("/home/charliem/osm/dyna/login.sql", O_RDONLY) = 9
> > > open("/u01/app/oracle/product/8.1.6.2/sqlplus/admin/glogin.sql",
 O_RDONLY)
> > > = 12
> > >
> > > Only TWO directories/files were checked, even though my SQLPATH
 contains
> > > many more directories as shown below.
> >
> > Are you sure that only two directories were checked? It looks to me
 like
> > only two directories contained either the LOGIN.SQL file or the
> > GLOGIN.SQL file. It found the LOGIN.SQL file that is in the
> > /home/charliem/osm/dyna directory. While I can't see everything that
> > you've done, I can only guess that you envoked SQL*Plus from this
> > directory. I'm guessing this based on the fact that this directory is
> > not listed in your SQLPATH below. I'm not 100% sure on this, but I
> > believe that SQL*Plus quits looking after it has found a LOGIN.SQL
 file.
> > It does not do any further checking for this file in your SQLPATH.
> >
> > The second directory that was checked is $ORACLE_HOME/sqlplus/admin.
> > SQL*Plus will search here last after an exhaustive search of your
> > current directory and your SQLPATH. It will also load the contents of
> > the GLOGIN.SQL file (which is the "G"lobal LOGIN.SQL file).
> >
> > > charliem_at_tantalus(EDWDEV):/home/charliem> echo $SQLPATH
> >
> > /usr/local/sql:/home/charliem/sql:/usr/local/oracle/sql:/u01/app/oracl
 e/loc
> > > al/sql:/home/charliem/sql:/home/oracle/sql
> > >
> > > HTH & YMMV!
> >
> > I use SQL*Plus on Solaris (among other platforms) and it's always
 worked
> > exactly as described for me.
> >
> > HTH,
> > Brian
> >
> > --
> > ========================================
> > Brian Peasland
> > Raytheons Systems at
> > USGS EROS Data Center
> > These opinions are my own and do not
> > necessarily reflect the opinions of my
> > company!
> > ========================================
> >
>
> Sent via Deja.com
> http://www.deja.com/
 

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Thu Jan 11 2001 - 07:56:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US