Created
March 22, 2021 12:37
-
-
Save libotti/98ee5a0250cae7e7da689e45ad92b6f7 to your computer and use it in GitHub Desktop.
How to set Oracle NLS_SESSION_SETTINGS WITH A TRIGGER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE TRIGGER sys.schema_nls_session_settings AFTER LOGON ON BOB.SCHEMA | |
BEGIN | |
execute immediate 'alter session SET NLS_TERRITORY="BRAZIL"'; | |
execute immediate 'alter session SET NLS_LANGUAGE="BRAZILIAN PORTUGUESE"'; | |
execute immediate 'alter session SET NLS_ISO_CURRENCY="BRAZIL"'; | |
execute immediate 'alter session SET NLS_CURRENCY="R$"'; | |
execute immediate 'alter session SET NLS_DATE_FORMAT="DD/MM/RR"'; | |
execute immediate 'alter session SET NLS_DATE_LANGUAGE="BRAZILIAN PORTUGUESE"'; | |
execute immediate 'alter session SET NLS_SORT="BINARY"'; | |
execute immediate 'alter session SET NLS_TIME_FORMAT="HH24:MI:SSXFF"'; | |
execute immediate 'alter session SET NLS_TIMESTAMP_FORMAT="DD/MM/RR HH24:MI:SSXFF"'; | |
execute immediate 'alter session SET NLS_TIME_TZ_FORMAT="HH24:MI:SSXFF TZR"'; | |
execute immediate 'alter session SET NLS_TIMESTAMP_TZ_FORMAT="DD/MM/RR HH24:MI:SSXFF TZR"'; | |
execute immediate 'alter session SET NLS_DUAL_CURRENCY="Cr$"'; | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment