EVRENSEL AYARLAR (Oracle)


Her ülkenin kullancısı kendi ülkesinin ayarları ile Oracle veritabanını kullanmaktadır.Bu ararlar işletim sistemin bölgesel ayarları ile ilintilidir.

Bu ayarlar Windows işletim sisteminde “REGEDIT” içinde Unix sistemlerde ise Oracle kullancısının profilindedir.

W8ISO8859P9

TR8MSWIN1254

 SQL > ALTER SESSION SET NLS_DATE_FORMAT=‘DD.MM.YYYY’;

SQL >execute DBMS_SESSION.SET_NLS(‘NLS_DATE_FORMAT’,
’’’DD.MM.YYYY’’’) ;

NLS sort yapılan sıralamanın hangi karakter setine göre yapılacağını belirlemektedir.
SQL> CREATE TABLE list ( num NUMBER(1),
word VARCHAR2(5),
def VARCHAR2(7)
);

SQL> INSERT INTO list VALUES (1, 'gelée', 'frost');
SQL> INSERT INTO list VALUES (2, 'gelé', 'frozen');
SQL> INSERT INTO list VALUES (3, 'gèle', 'freezes');
SQL> INSERT INTO list VALUES (4, 'gelez', 'freeze');

SQL> ALTER SESSION SET NLS_SORT = BINARY;

SQL> SELECT num, word, def
FROM list
ORDER BY word;
NUM WORD DEF
--- ----- -------
4 gelez freeze
2 gelé frozen
1 gelée frost
3 gèle freezes

SQL> ALTER SESSION SET NLS_SORT = FRENCH;

SQL> SELECT num, word, def
FROM list
ORDER BY word;
NUM WORD DEF
--- ----- -------
2 gelé frozen
3 gèle freezes
1 gelée frost
4 gelez freeze

SQL> ALTER SESSION SET NLS_SORT = FRENCH_M;

SQL> SELECT num, word, def
FROM list
ORDER BY word;
NUM WORD DEF
--- ----- -------
3 gèle freezes
2 gelé frozen
1 gelée frost
4 gelez freeze

SQL> ALTER SESSION SET NLS_SORT=BINARY;

SQL> SELECT num, word, def
FROM list
ORDER BY NLSSORT(word,'NLS_SORT=FRENCH_M');
NUM WORD DEF
--- ----- -------
3 gèle freezes
2 gelé frozen
1 gelée frost
4 gelez freeze

SQL > SELECT TO_CHAR(hire_date,’DD.Mon.YYYY’,
‘NLS_DATE_LANGUAGE=FRENCH’)
FROM employees;

SQL > SELECT ename, TO_CHAR(sal,’9G999D99’,
‘NLS_NUMERIC_CHARACTERS=‘‘,.’’’)
FROM emp;
 
SQL > SELECT last_name,
TO_CHAR(salary,'99G999D99','NLS_NUMERIC_CHARACTERS='',.''')
FROM employees;

SQL> SELECT parameter, value
FROM nls_database_parameters
WHERE parameter LIKE '%CHARACTERSET%';
PARAMETER VALUE
----------------------- ------------------------------
NLS_CHARACTERSET WE8ISO8859P1
NLS_NCHAR_CHARACTERSET AL16UTF16
 
SQL> SELECT parameter, value FROM nls_instance_parameters
WHERE parameter LIKE '%CHARACTERSET%';

PARAMETER VALUE
------------------------------ ----------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_SORT
NLS_DATE_LANGUAGE
NLS_DATE_FORMAT
NLS_CURRENCY
NLS_NUMERIC_CHARACTERS
NLS_ISO_CURRENCYNLS_CALENDAR
NLS_TIME_FORMAT
NLS_TIMESTAMP_FORMAT
NLS_TIME_TZ_FORMAT
NLS_TIMESTAMP_TZ_FORMAT
NLS_DUAL_CURRENCY
NLS_COMP
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

17 rows selected.
 
 
 
SQL > SELECT * FROM nls_session_parameters;
PARAMETER VALUE
------------------------------ ----------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

17 rows selected.

SQL> SELECT * FROM v$nls_valid_values
2 WHERE parameter='LANGUAGE';
PARAMETER VALUE
--------- --------------
LANGUAGE AMERICAN
LANGUAGE GERMAN
LANGUAGE FRENCH
LANGUAGE CANADIAN FRENCH
LANGUAGE SPANISH
LANGUAGE ITALIAN
LANGUAGE DUTCH
LANGUAGE SWEDISH
LANGUAGE NORWEGIAN
...

SQL> SELECT * FROM v$nls_parameters;
PARAMETER VALUE
------------------------------ ----------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET WE8ISO8859P1
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

19 rows selected.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: