Skip to end of metadata
Go to start of metadata

Description of Database Parameters Concerning UNICODE


In this section you find information about database parameters which influence the UNICODE settings.


_UNICODE
DefaultCodePage / DEFAULT_CODE
UseUnicodeColumnCompression / USEUNICODECOLUMNCOMPRESSION


_UNICODE

Description:
YES: Identifiers of database objects are stored in UNICODE
NO : Identifiers of database objects are stored in ASCII
Storage of database object identifiers in UNICODE (YES/NO)

If the database parameter _UNICODE is set to YES the database catalog will be created in UNICODE format.

As of version 7.7 the database parameter _UNICODE is obsolete. All SAP MaxDB databases and liveCaches are expected to only use UNICODE catalog information.

When will the database parameter _UNICODE be set?
The parameter value is set during the database installation and cannot be changed subsequently.

Tool SAPINST:
As of SAP MaxDB version 7.4 the database parameter _UNICODE will always be set to YES during the database installation with SAPINST.

Tool SDBINST:
SDBINST solely executes the SAP MaxDB software installation and does not change any parameter values. Therefore the parameter _UNICODE will not be changed during a software upgrade using SDBINST.

Tool SDBUPD:
With every software upgrade to 7.4 and higher SDBUPD triggers a catalog migration to UNICODE.

Note: If an OLTP/OLAP or SAP content server database running with SAP MaxDB version 7.6 has a database parameter setting _UNICODE=NO SDBUPD will stop the upgrade to 7.7. Use note 744774 to migrate the catalog to UNICODE.

Impacts on the application:
When the database catalog is in UNICODE format the application must be able to communicate to UNICODE databases.
If the application does not support the communication to a UNICODE database you will get errors.

The database parameter _UNICODE has no impact on the storage of the application data. This will be determined by setting the database parameter DefaultCodePage / DEFAULT_CODE.

back to top

DefaultCodePage / DEFAULT_CODE

Description:
Default code taken as code attribute for CHAR columns, defined without code attribute, for open systems usually ASCII code
DefaultCodePage = ASCII | UNICODE (version >= 7.7)
DEFAULT CODE = INTERNAL | ASCII | EBCDIC | UNICODE

(UNICODE is only valid for a Unicode database)

If the database parameter DefaultCodePage / DEFAULT_CODE is set to ASCII, all objects of users, which have been created without a special DefaultCodePage / DEFAULT_CODE during CREATE USER statement, will be created in ASCII format.

When you change the database parameter value of DefaultCodePage / DEFAULT_CODE to UNICODE all newly created objects of users which have been created without a special DefaultCodePage / DEFAULT_CODE during CREATE USER statement, will be created from now on with code attribute UNICODE.

back to top

UseUnicodeColumnCompression / USEUNICODECOLUMNCOMPRESSION

Description:
If set to YES non-key columns of type (VAR)CHAR UNICODE and variable width will not be stored in UCS2 but in UTF8 format on disk for newly created tables. This will result in disk space savings at the cost of increased CPU consumption.Tables for which this optimization is enabled will show the value YES for column PACKEDUNICODECOLUMNS in the system table FILES.

Changing this database parameter will not affect existing tables.

SAP MaxDB generally stores UNICODE data in UCS2 format which is space consuming and thus results in higher I/O workload. Parts of the data can be transformed from UCS2 to UTF8. When the database parameter UseUnicodeColumnCompression is set to YES non-key columns of type (VAR)CHAR UNICODE can be stored with higher compression in UTF8. This saves disk space and results in a better utilization of the data cache. As upon each access the column values have to be converted back from UTF8 to UCS2 this might affect performance during access and results in higher CPU load.

Independent of the setting of the database parameter existing tables can be transformed with the following SQL statement:

ALTER TABLE <table_name> [NOT] PACKED

From version 7.6.06 Build 02, 7.7.07 Build 01 and 7.8.00 Build 05 the SQL command looks like this (to distinguish it from the integer-compression):

ALTER TABLE <tablename> [NOT] UNICODE PACKED

The ALTER command may last a while depending from the amount of unicode data which has to be transformed. In this time the table is exclusively locked. Therefore neither DML (INSERT/UPDATE/DELETE) nor DDL commands are possible in parallel.

The database parameters UseUnicodeColumnCompression / USEUNICODECOLUMNCOMPRESSION are supported as of versions  7.7 / 7.6.05. UseUnicodeColumnCompression: can be used now, but default is still NO (SAP notes 2090174, 2094570)

back to top

  • No labels