Search This Blog

Wednesday 21 September 2011

Oracle, get the current DB instance

--this is a useful query to get the DB instance on which the current session is running, useful especially in RAC mode
SELECT sys_context('USERENV', 'INSTANCE') AS instance#, sys_context('USERENV', 'INSTANCE_NAME') AS instance_name FROM dual

No comments:

Post a Comment