RE: Protecting production from "us"

  • From: "Harville, Steve" <Steve.Harville@xxxxxxx>
  • To: Oracle-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 3 Dec 2015 21:57:35 +0000

I have this in my login.sql file on my PC. It switches DOS colors in the
sqlplus window according to the database name.

set termout off
set timing off
COLUMN host_cmd_col NEW_VALUE host_cmd

SELECT ( CASE
when sys_context('USERENV', 'DB_NAME')
in ( 'PROD', 'IPROD', 'KPROD', -- rac instances
'PA', 'PALP', 'PP2', 'BPROD', -- db server 1
'ERP', 'QPROD', 'PR4', -- db2 server
'HR', 'HTA' -- db3 server
)
THEN 'COLOR 0E'
else 'COLOR 70'
END) host_cmd_col
FROM dual;

HOST &host_cmd

/*
COLOR [attr]

attr Specifies color attribute of console output

Color attributes are specified by TWO hex digits -- the first corresponds to the
background; the second the foreground. Each digit can be any of the below
values.

0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
*/

set termout on
set timing on


From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On
Behalf Of Jeff Smith
Sent: Thursday, December 03, 2015 4:48 PM
To: sbecker6925@xxxxxxxxx; alfredo.abate@xxxxxxxxx
Cc: Jeremy Schneider <jeremy.schneider@xxxxxxxxxxxxxx>; HerringD@xxxxxxx;
Oracle-L <oracle-l@xxxxxxxxxxxxx>
Subject: RE: Protecting production from "us"

That’s why the SQLDev/SQLcl team recommends emoji-based prompts ☺



From: Sandra Becker [mailto:sbecker6925@xxxxxxxxx]
Sent: Thursday, December 03, 2015 4:36 PM
To: alfredo.abate@xxxxxxxxx<mailto:alfredo.abate@xxxxxxxxx>
Cc: Jeremy Schneider; HerringD@xxxxxxx<mailto:HerringD@xxxxxxx>; Oracle-L
Subject: Re: Protecting production from "us"

Something I came across years ago when we were establishing color coded putty
sessions -- color blindness. Had a DBA who could not distinguish between
prod/lower environments with the chosen color scheme. Worked it out
eventually, but it wasn't something the team thought of initially.
Sandy



Confidentiality Notice:
This message may contain confidential or privileged information, or information
that is otherwise exempt from disclosure. If you are not the intended
recipient, you should promptly delete it and should not disclose, copy or
distribute it to others.


Other related posts: