Wednesday, 27 June 2007

Finding the Global Database Name

The full name of the database which uniquely identifies it from any other database. The global database name is of the

form "database_name.database_domain," for example, sales.us.acme.com.

The database name portion, sales, is a simple name you wish to call your database. The database domain portion,

us.acme.com, specifies the database domain in which the database is located, making the global database name unique. When

possible, Oracle Corporation recommends that your database domain mirror the network domain.

The global database name is the default service name of the database, as specified by the SERVICE_NAMES parameter in the

initialization parameter file.



SELECT NAME, value$
FROM SYS.props$
WHERE NAME = 'GLOBAL_DB_NAME';


or



SELECT *
FROM GLOBAL_NAME;

Tuesday, 26 June 2007

How do I find my SID?

The SID is the Oracle System ID. It is used to uniquely identify a database. In RAC, all instances belonging to the same database must have unique SID's.



In Windows:


set ORACLE_SID=orcl



Unix/ Linux:


export ORACLE_SID=orcl





SELECT enabled, open_time, status, INSTANCE
FROM v$thread;

Monday, 25 June 2007

Oracle Version Number?

You may need to find what version of database you are running. Not often I admit, but it can happen.



SELECT banner FROM V$VERSION;



Not difficult at all.