Where can I request credentials in oracle database?

Where can I request the current oracle database case sensitivity setting?

I tried searching in v$database, nls_database_parametersand looking at system packages, but none of them seem to provide the information I need ...

+3
source share
3 answers

In Oracle 10gR2:

SELECT  *
FROM    NLS_SESSION_PARAMETERS
WHERE   parameter IN ('NLS_COMP', 'NLS_SORT')

SQL> ALTER SESSION SET NLS_COMP = 'LINGUISTIC'
  2  /

Session altered
SQL> SELECT  COUNT(*)
  2  FROM    dual
  3  WHERE   'a' = 'A'
  4  /

  COUNT(*)
----------
         1

SQL> ALTER SESSION SET NLS_COMP = 'BINARY'
  2  /

Session altered
SQL> SELECT  COUNT(*)
  2  FROM    dual
  3  WHERE   'a' = 'A'
  4  /

  COUNT(*)
----------
         0

From the documentation :

NLS_COMP indicates the sorting behavior of the database session.

values:

  • BINARY

    Typically, comparisons in a section WHEREand in blocks PL/SQLare binary unless you specify a function NLSSORT.

  • LINGUISTIC

    SQL WHERE PL/SQL , NLS_SORT. , , .

  • ANSI

    ANSI ; NLS_COMP LINGUISTIC

+5

, 11 - , . 11g.

+1

Oracle 10gR2 ( ) NLS_COMP NLS_SORT.

select * from v$nls_parameters where parameter in ('NLS_COMP','NLS_SORT');

( . , ALTER SESSION.)

, :

alter session set NLS_SORT=BINARY_CI;
alter session set NLS_COMP=LINGUISTIC;

Of course, these are not the only parameter settings. Oracle 10gR2 Documentation:

10gR2 Linguistic sorting and string search

0
source

Source: https://habr.com/ru/post/1714612/


All Articles