start $ORACLE_HOME/sqlplus/admin/$ORACLE_SID.sql
in $ORACLE_HOME/sqlplus/admin/glogin.sql
where, for example, the file $ORACLE_HOME/sqlplus/admin/live.sql contains
set SQLPROMPT Live-SQL>
Obviously, we have one such file for each $ORACLE_SID ( live.sql, test.sql )
Dave.
Finn
Actually, yes and no. There are two dictionary views: v$database and
global_name that provide you with this info. The latter one is probably
available to everyone.
You could think of the following code in login.sql
column global new_value dbname
select substr(global_name, 1, instr(global_name,'.') - 1) global --
to parse of
the db_domain
from global_name;
set sqlp '&dbname'
I agree this still doesn't address the user switching databases within
sqlplus...
Best Regards,
Sybrand Bakker, Oracle DBA
For NT environments, just change
'/tmp/' into '\temp\',
'!' into 'ho',
'rm' into 'del',
'clear' into 'cls' and
'vi' into 'notepad'.
Cheers
Kaboel Karso