Wednesday, December 13, 2017

ORACLE - How get name of connected DB instance

select sys_context( 'USERENV','DB_NAME' ) as instance from dual;
Output (for example):
INSTANCE                                                                        
--------------------------------------------------------------------------------
ORCL                                                                            
1 row selected.

No comments:

Post a Comment