Sometimes there are requests that multiple databases running on the same RAC return different time values — so they must run in different time zones.
This goal cannot achieved by changing the server time zone because that would affect ALL databases.
The solution is fairly simple:
bash-4.2$ srvctl setenv database -db ORCL -env "TZ=CET-1" bash-4.2$ srvctl stop database -d ORCL bash-4.2$ srvctl start database -d ORCL
This effectively changes the environment variables in the clusterware for this particular database:
bash-4.2$ sqlplus c##ronny/ronny@ORCL SQL*Plus: Release 18.0.0.0.0 - Production on Wed Feb 6 09:29:03 2019 Version 18.3.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Connected to: Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Version 18.3.0.0.0 SQL> select to_char(sysdate, 'HH24:MI') from dual; TO_CH ----- 08:29 SQL> !date Wed Feb 6 09:29:16 CET 2019
Note that this only works if you connect via SQLNet. Local connetions are unaffected!