Search code examples
sqloracle-databaseoracle11g

How to identify(DEV,QA,PROD) environment in oracle


I just need the information how to identify whether is it DEV or QA or PROD environment.

I have tried by using Sys_context. But i did not get the exact information.

Please help me on this.


Solution

  • You can usually distinguish between different DBs by querying the service name of the DB...

    select global_name from global_name
    

    ... or from the userenv context...

    sys_context('userenv', 'db_name')