Oracle NLS_SORT not working through ALTER SESSION?

Using 'alter session set nls_sort' doesn't seem to work for me. I use SQLPlus v11.2.0.3.0 x64 and try to apply simple steps to "Example 9-10. NLS_SORT affects the linguistic sort order" found in the Oracle documentation at http://docs.oracle.com/cd/E18283_01/appdev .112 / e10766 / tdddg_globalization.htm # CACJEJIB

CREATE TABLE temp (name VARCHAR2(15));

INSERT INTO temp (name) VALUES ('laguna');
INSERT INTO temp (name) VALUES ('llama');
INSERT INTO temp (name) VALUES ('loco');

SELECT * FROM nls_session_parameters WHERE parameter = 'NLS_SORT';
Result: BINARY

SELECT * FROM temp ORDER BY name;
Result:
NAME
---------------
laguna
llama
loco

ALTER SESSION SET NLS_SORT=SPANISH_M;
SELECT * FROM nls_session_parameters WHERE parameter = 'NLS_SORT';
Result: SPANISH_M

SELECT * FROM temp ORDER BY name;
Results are the same:
NAME
---------------
laguna
llama
loco

According to doco, the sort order above should have changed, but it is not. But, if I applied NLS_SORT as part of the request itself, I get the correct values:

SELECT * FROM temp ORDER BY NLSSORT(name, 'NLS_SORT=SPANISH_M');
Result:
NAME
---------------
laguna
loco
llama

What am I missing here? thanks in advance.

+4
source share
2

, Oracle v11.2.0.3.0 v12.1.0.1.0. , , , , / Oracle v11.2.0.3.0 Oracle. .

+1

:

1) Go to the REGISTRY (run regedit)
2) Find HKEY_LOCAL_MACHINE/Software/ORACLE
3) Change NLS_LANG

AMERICAN_AMERICA.AR8MSWIN1256

, NLS_LANG 2. .

0

All Articles