Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Database Administration >> sql prompt

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: sql prompt
 shikhu  Posted: Dec 26, 2007 02:17:52 AM

 Total Post: 61
 Joined: Jul, 2006






 hi all,

I want that particular schema name to be displayed when I login to that schema , I have linux on my system.

can any1 tell me.

-shikha

 Murtuja
Posted: Dec 26, 2007 04:19:55 AM  

 Total Post: 814
 Joined: Jan, 2006






 
You need to append below lines in $ORACLE_HOME/sqlplus/admin/glogin.sql file.

This will work with 10g only.

-- SQL Prompt Customization
SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER > "


 Babu
Posted: Dec 26, 2007 05:11:32 AM  

 Total Post: 90
 Joined: Oct, 2007






 

Save the below file in your home directory (Oracle_home/bin) check and let me know

login.sql

COLUMN global_name NEW_VALUE gname
SET TERMOUT OFF
SELECT INITCAP(USER) || '@' || INITCAP(global_name) global_name
FROM global_name;
SET TERMOUT ON
SET TIMING ON
SET SQLPROMPT '&gname> '
SET LINESIZE 120



 vishal
Posted: Jan 04, 2008 02:09:27 AM  

 Total Post: 7
 Joined: Jan, 2008






 
On attempting the login.sql as discussed above,i am geting one problem.
If i am changing the schema ,then it is showing the same schema name on sql prompt by which i first login.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production

System@abc.Us.Oracle.Com>
System@abc.Us.Oracle.Com>
System@abc.Us.Oracle.Com> disc
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
System@abc.Us.Oracle.Com> conn scott
Enter password: *****
Connected.
System@abc.Us.Oracle.Com>

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi239
  neeraj sharma228
  Ramesh Jois226
  snehalatha p169






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software