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

Home -> Community -> Usenet -> c.d.o.server -> Re: What happens when I log on to SQLPlus

Re: What happens when I log on to SQLPlus

From: Anton Buijs <aammbuijs_at_xs4all.nl>
Date: Sun, 21 Apr 2002 21:04:41 +0200
Message-ID: <a9v2f7$9ta$1@news1.xs4all.nl>


Ofcourse you can! There it's for.
Do global settings that you want to apply for everybody in glogin.sql (the global login)
Do you personal settings in a login.sql in a well choosen directory.

Be carefull when doing selects in glogin.sql. Remember that glogin.sql runs for every user that uses the sqlplus executable in that Oracle home. Don't do a select from views like v$database because only dba's have access. Do a select from global_name if you want the database name in the prompt.

Mostly people include "set" commands in the (g)login.sql like "set linesize 132" or something like that.

Pinaki <bpinaki123_at_indiatimes.com> schreef in berichtnieuws 96eccafc.0204211020.3799ad14_at_posting.google.com...
> Hi,
> Thanks for the replies...But can I edit the glogin.sql
> file.Suppose I want to change the sql prompt(SQL>) to something
> else.Not for the particular session(this I can can change from the
> enviornment settings) but whenever I login through SQLPLus.
>
> Pinaki
>
>
>
>
> "Anton Buijs" <aammbuijs_at_xs4all.nl> wrote in message
news:<a9tu1k$eht$1_at_news1.xs4all.nl>...
> > Indead, first $ORACLE_HOME/sqlplus/admin/glogin.sql is run.
> > Then sqlplus looks for a file named login.sql in the current directory.
> > If it's not there it searches all directories listed in $ORACLE_PATH
> > variable.
> > The first login.sql file found is run.
> >
> > Same applies for Oracle on Windows NT: glogin.sql in the Oracle home
> > sqlplus\admin dir
> > Then the first login.sql file found in:
> > a. the current dir (when you used the installed shortcut: the oracle
home
> > \bin subdirectory)
> > b. if set the directories listed in the variable %SQLPATH%.
> > c. the directories listed in registry key
> > \\HKLM\Software\Oracle\HOME<n>\SQLPATH
> >
> > Use this variable or registry key to include the directories where you
store
> > your sql scripts in. Sqlplus will find them then regardless the current
> > directory from where it started.
> >
> >
> > Pinaki <bpinaki123_at_indiatimes.com> schreef in berichtnieuws
> > 96eccafc.0204201017.70a659a1_at_posting.google.com...
> > > Hi,
> > > I have a simple question to ask.Which script does Oracle execute
> > > when I click on the sqlplus icon(enter the username,password and
> > > hoststring) and create a session with Oracle...
> > >
> > > Thanks,
> > > Pinaki
Received on Sun Apr 21 2002 - 14:04:41 CDT

Original text of this message

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