SQLplus Login Info display [message #233940] |
Sat, 28 April 2007 06:51 |
bbaz
Messages: 138 Registered: April 2007
|
Senior Member |
|
|
To show the user, we use the command:
SHOW USER
What is the command to display the session details/instance name?
If I use SHOW PARAMETERS, it displays all the DB instance Initialization parameters including the instance_name. Is there an easier way to get the Instance name when logged in other than from the initialization file?
|
|
|
|
|
Re: SQLplus Login Info display [message #233949 is a reply to message #233946] |
Sat, 28 April 2007 07:28 |
|
Mahesh Rajendran
Messages: 10707 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
dbadmin@republic_lawt1 > show parameter instance_name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string LAWT1
It is upto you.
You asked
>>Is there an easier way to get the Instance name when logged in other than from the initialization file?
Regards~
[Updated on: Sat, 28 April 2007 07:29] Report message to a moderator
|
|
|
|
|
|
Re: SQLplus Login Info display [message #234079 is a reply to message #233964] |
Sun, 29 April 2007 11:36 |
Mohammad Taj
Messages: 2412 Registered: September 2006 Location: Dubai, UAE
|
Senior Member |
|
|
Hi,
You can also check through below command when you don't have "select any dictionary" privs.
1.
SQL> conn scott/tiger
Connected.
SQL> show parameter instance_name
ORA-00942: table or view does not exist
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
ORCL
2.
SQL> select sys_context('USERENV','INSTANCE_NAME') from dual;
SYS_CONTEXT('USERENV','INSTANCE_NAME')
--------------------------------------------------------------------------------
orcl
Regards
Taj
|
|
|