Q
Problem solve Get help with specific problems with your technologies, process and projects.

What instance am I running on?

Without querying the v$ tables is there a way I can tell what instance I am running on?

Without querying the v$ tables is there a way I can tell what instance I am running on? I am running something in a production database that changes every few days. I need to set some variables different between production and development because I am currently going between Oracle 9i and Oracle 10g. I need to know the HOST or the SID or anything that will differentiate between the two systems.
The following query is an alternative to querying V$DATABASE or V$INSTANCE:
SELECT property_value FROM database_properties
WHERE property_name='GLOBAL_DB_NAME';
But probably a better way would be to query your session's properties with the following:
select sys_context('userenv','db_name') from dual;

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close