Wie der Befehl schon sagt, gilt die Änderung nur für die aktuelle Session. D.h. wenn die Verbindung beendet wird, endet auch die Session.
Es gibt mehrere Möglichkeiten die NLS Settings zu editieren:
- As initialization parameters on the server
You can include parameters in the initialization parameter file to specify a default session NLS environment. These settings have no effect on the client side; they control only the server's behavior. For example:
Code:
NLS_TERRITORY = "CZECH REPUBLIC"
- As environment variables on the client
You can use NLS environment variables, which may be platform-dependent, to specify locale-dependent behavior for the client and also to override the default values set for the session in the initialization parameter file. For example, on a UNIX system:
- With the ALTER SESSION statement
NLS parameters that are set in an ALTER SESSION statement can be used to override the default values that are set for the session in the initialization parameter file or set by the client with environment variables.
Code:
ALTER SESSION SET NLS_SORT = FRENCH;
- In SQL functions
NLS parameters can be used explicitly to hardcode NLS behavior within a SQL function. This practice overrides the default values that are set for the session in the initialization parameter file, set for the client with environment variables, or set for the session by the ALTER SESSION statement. For example:
Code:
TO_CHAR(hiredate, 'DD/MON/YYYY', 'nls_date_language = FRENCH')