RE: Protecting production from "us"

From: Harville, Steve <Steve.Harville_at_adm.com>
Date: Thu, 3 Dec 2015 21:57:35 +0000
Message-ID: <F4770D564667164499D653CA02B21CBD1A3492_at_ADMEX2K10.na.admworld.com>



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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jeff Smith Sent: Thursday, December 03, 2015 4:48 PM To: sbecker6925_at_gmail.com; alfredo.abate_at_gmail.com Cc: Jeremy Schneider <jeremy.schneider_at_ardentperf.com>; HerringD_at_dnb.com; Oracle-L <oracle-l_at_freelists.org> Subject: RE: Protecting production from "us"

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

From: Sandra Becker [mailto:sbecker6925_at_gmail.com] Sent: Thursday, December 03, 2015 4:36 PM To: alfredo.abate_at_gmail.com<mailto:alfredo.abate_at_gmail.com> Cc: Jeremy Schneider; HerringD_at_dnb.com<mailto:HerringD_at_dnb.com>; 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.

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Dec 03 2015 - 22:57:35 CET

Original text of this message