Again me and my bright ideas

You have already a way of making a connection color based on username@tnsname entry.

How about if we use database_name from v$instance (if available) or even better, any variable from the sys_context('USERENV',...) function, like DB_NAME or whatever.

That would be neat, that way we can clearly distinguish productions from developement databases.

I would like it to be possible for people to customise a generic way of identifying the database as dev/prod. For example, I could setup a logon trigger on all my production databases to set a customized context, say sys_context('plsqldev', 'database type') that would be set to PROD on all my production databases, thus I will have a red connection indicator.

How does that sound ?
 
It sounds like a nice idea. I assume you are aware that you can also specify wildcards for the connection indicator? For example: *@proddb, or sys@*. It's not a nice generic implementation as your suggestion, but it should work.
 
Back
Top