Consultor Eletrônico



Kbase 13995: ORACLE retrieving SID/Database Name from ORACLE Database
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
ORACLE retrieving SID/Database Name from ORACLE Database

The commands to retrieve the ORACLE SID from the ORACLE database
when you do not know the SID are shown below. This will help
those customers who have numerous databases and oracle instances
and do not know which one they are connected to:

The following describes 3 SQL statements to show you the database
you are connected to. This applies to an ORACLE 7 database using the
'sys' account. Some of the commands also apply to other ORACLE accou
nts and ORACLE V6 Databases as well.

SQL> SELECT KSQDNGDN FROM X$KSQDN;
SQL> SELECT VALUE FROM V$PARAMETER WHERE name='db_name';
SQL> SELECT * FROM V$DATABASE;

Note that the second SQL statement needs to specify the 'db_name' in l
ower case.

Progress Software Technical Support Note # 13995