How to change the V$NLS_PARAMETERS permanently?

I need to change V$NLS_PARAMETER . currently default NLS_LANGUAGE is American, I want to change it ENGLISH. Alter session modifies only the current session.

How to modify it permanently.

Upvotes: 1

Views: 6255

Answers (1)

Rob van Laarhoven
Rob van Laarhoven

Reputation: 8905

You can set NLS parameters at different levels

  1. As initialization parameters on the instance/server.

    SQL>alter system set V$NLS_PARAMETER = 'XXX' scope = both;

  2. As environment variables on the client.

    % setenv NLS_SORT FRENCH

  3. As ALTER SESSION parameters.

    SQL> ALTER SESSION SET V$NLS_PARAMETER = = 'XXX'

Any setting overrides the setting on a higher level. So setting it server side does not guarantee that the setting is used by all clients connecting.

If you want to make sure it is set for every client connecting use a logon trigger. Even then a user can explicitly override the 'default' setting

Upvotes: 3

Related Questions