Ways to Check oracle sid and database name
1. Get the name of the instance
select sys_context('userenv','instance_name') from dual;
2. global_name is granted to PUBLIC, so anybody can query it.
select * from global_name;
select global_name from global_name;
3. use ORA_DATABASE_NAME
select ora_database_name from dual;
4. user v$ views
select name from v$database;
select instance_name from v$instance;
No comments:
Post a Comment