Administer > Database administration > Case-sensitivity > Oracle case-sensitivity

Oracle case-sensitivity

You can set the Oracle database to the desired case-sensitivity when you create it. Refer to Service Manager Installation for instructions.

Refer to the Case-sensitivity section of the Service Manager Support Matrix for versions of Oracle for which Service Manager supports case-insensitive mode.

Requirements for using a case-insensitive Oracle database

If you want to use a case-insensitive Oracle database with Service Manager instead of using the sqlupper:1 solution, you must meet the following requirements:

    • NLS_SORT=BINARY_CI and NLS_COMP=LINGUISTIC must be set in the Oracle instance level.
      • If these values are set as given above, Service Manager will issue an ALTER SESSION statement to match the NLS_SORT and NLS_COMP session parameter with the NLS_SORT and NLS_COMP instance parameter.
      • If these values are not set or are different from the given values, Service Manager will treat it as case-sensitive Oracle and issue an ALTER SESSION statement to modify those parameters to be NLS_SORT=BINARY and NLS_COMP=BINARY.

      This ensures that all Service Manager server processes within a horizontal or vertical scaling group have consistent Oracle case-sensitivity settings.
    • All unique keys in Service Manager tables must have a matching case-insensitive unique index.

Limitations of case-insensitive Oracle

You will not be able to rename or change a column size of keyed fields from the Service Manager Dbdict Utility when using a case-insensitive Oracle instance. Instead, select generate DDL when modifying columns from Dbdict Utility. An Oracle database administrator can then drop affected function based index, apply the DDL, and recreate the function based index on the Oracle database.

Validate case-insensitive unique indexes

During the initial system load, Service Manager created a set of case-insensitive indexes for each table, based on the keys in that table. Service Manager logs these indexes first time reads a table when the sqldebug:1 parameter is in the sm.ini file. You can review the settings created for each table by viewing the sm.log file.

The case-insensitive unique indexes should be created as Oracle function based indexes where the Column Expression is NLSSORT("<field name>",'nls_sort=''BINARY_CI''').

To verify whether the case-insensitive unique indexes are being with the correct column expression:

  1. Set sqldebug:1 in the sm.inifile, located in the <SM_install_location>\Server\RUN directory.
  2. Start Service Manager.
  3. Check the sm.log file, located in the <SM_install_location>\Server\logs directory.

The following entry in the log file indicates that the Oracle instance is set to case insensitive, and that you were able to connect to it successfully.

RTE I Oracle server settings for language, territory and character set: AMERICAN_AMERICA.AL32UTF8 (AL16UTF16)
RTE I OCI Client settings for language, territory and character set: AMERICAN_AMERICA.AL32UTF8 (UTF16)
....
RTE I Oracle instance setting for NLS_SORT is set to BINARY_CI
RTE I Oracle instance setting for NLS_COMP is set to LINGUISTIC 
...
RTE I Oracle session is set up in CASE INSENSITIVE mode

The following information in the log file indicates that the Dbdict table has an index, DBDICTM1C989DE64, with a key called "NAME", which is case-insensitive.

RTE D Table Name: DBDICTM1                                                                                                                   
RTE D Schema Name                    Index Name                     Type Column Name                    Column Expression                                                                                                 
RTE D ------------------------------ ------------------------------ ---- ------------------------------ ----------------------------------------                                                                          
RTE D SMDB                           DBDICTM1C989DE64               U    SYS_NC00003$                   NLSSORT("NAME",'nls_sort=''BINARY_CI''')                                                                          
RTE D ------------------------------ ------------------------------ ---- ------------------------------ ----------------------------------------  

Related topics

Case-Sensitivity
JavaScript/RAD implications of a case-insensitive database environment
Load/unload implications of case-sensitivity