linux - Upon logging into sqlplus why does it always print the username? -


upon logging sqlplus why print username in linux?

$ sqlplus  sql*plus: release 11.2.0.4.0 production on fri apr 7 06:32:57 2017  copyright (c) 1982, 2013, oracle.  rights reserved.  enter user-name: scott  enter password:  connected to: oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production partitioning, olap, data mining , real application testing options  user "scott" 

i don't want print "user "scott" ".

one clue message "user is", can see in

/software/oracle/cli-11.02.00.04/sqlplus/mesg/sp2us.msg   sqlplus/mesg/sp2us.msg:572:00291,0, "user \"%s\"\n" 

do need change settings somewhere?

that's not default sql*plus behavior. have show user command (which it) in personal login.sql or global glogin.sql files.

have in $oracle_home/sqlplus/admin sub-directory glogin.sql file.

login.sql can in directory in $sqlpath, sql*plus starts search in current directory. luck file in somewhere sensible such client $oracle_home.

sql*plus configuration covered in documentation. find out more.

"in /upapps/oracle/dba/tools/login.sql ... there show user command ... reason? "

yep. sql*plus runs login.sql every time connect, instance use set sqlprompt change prompt. having scott> prompt more useful showing user you've connected as.

" can override login.sql , glogin.sql everytime connect sqlplus execute login.sql , glogin.sql?"

you can't override glogin.sql because there 1 of them (g "global"). there can multiple versions of login.sql. said above, sql*plus starts search file in current directory. need create login.sql file in location have write privileges (e.g. $home/naren) , start sql*plus there.


" there way can acheive when run different folder? "

if can't write file start sql*plus , can't start sql*plus can write file becomes political problem not technical problem. need negotiate people administer oracle environment.

or learn live it. trivial thing; can't believe i've put time , energy topic :) if show user greatest annoyance in working day should count blessings.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -