Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 sqlplus logon question

Author  Topic 

dps
Starting Member

2 Posts

Posted - 2002-07-25 : 10:08:13
when I connect to a different instance ( say for example there are two instances - DPS database_cc (employee system) and DPSdatabase_nms (departments system). These can be either in Test database or the Live database - ie. dpsTest or dpsLive) ....

I logon - via Icon sitting on desktop - which points to the script which logs me in to the DPS database_cc, so the prompt in sqlplus session will be say DPSdatabase_cc@Test>

Now I connect as DPSdatabase_nms/passwd@dpsTest..

.....I want the sql prompt to show this and perhaps even throw in a message saying : "you are now connected to DPSdatabase_nms"

I actually am using the following script - so disregard the above

column global_name new_value gname
set termout off


select lower(user) || '@' ||
decode(global_name, 'dpsTest.WORLD', 'DPSdatabase_cc', 'dpsLive.WORLD',
'DPSdatabase_cc', global_name) global_name
from global_name;
set sqlprompt '&gname> '
set termout on

set underline off

What can you or anyone suggest please

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-07-25 : 10:11:45
Unfortunately we're a SQL Server site, not really up on Oracle. You might want to try an Oracle forum, there's one here:

http://dbforums.com/

Go to Top of Page

dps
Starting Member

2 Posts

Posted - 2002-07-25 : 10:55:55
Ahhh - right.........

Go to Top of Page
   

- Advertisement -