user3928739
user3928739

Reputation: 5

Which DB am i connected to currently?

I am working in a project which has huge amounts of DATA, hence we are using two DBs. Now my question is, how will i know to which DB my system is currently connected to?

Upvotes: 0

Views: 330

Answers (1)

Patrick Hofman
Patrick Hofman

Reputation: 156978

You can get the variable instance_name from the context:

select sys_context
       ( 'userenv'
       , 'instance_name'
       )
from   dual

Upvotes: 1

Related Questions