Secondary connection to Oracle DB w/ different character set

[] [] [] [] []

Related:

  1. Secondary connection to Oracle DB w/ different character setSymptom A secondary connection to the Oracle database has a...
  2. iSeries: Known problems with secondary languagesSymptom If the objects for the secondary language do not...

Symptom
A secondary connection to the Oracle database has a different character set.
Other terms
Multiple NLS environment, character set, national character set, Instant Client, Instant Client Light, Unicode
Reason and Prerequisites
This note concerns different (national) character sets in non-SAP databases.
Solution
The database character set for a non-Unicode SAP system is always WE8DEC.
(Exceptions: Up to SAP 3.x, US7ASCII was also a possibility. As of SAP 4.x, new installations are always performed with WE8DEC. However, due to upgrades, some systems that use 4.x to 6.x still have US7ASCII. We recommend that you convert the database to WE8DEC immediately. In SAP systems with Oracle 10g and higher, the SAP system generally no longer allows the character set US7ASCII.)
Unicode SAP systems (available as of 6.x) always have the UTF8 character set.
However, these database character sets have nothing to do with the country-specific character set used internally in SAP. For non-Unicode databases (WE8DEC database character set), many SAP-internal character sets are available that correspond to the local language. With Unicode databases (UTF8 database character set), UTF16 is always used internally by SAP systems.
You often need to exchange data between the SAP database and an external non-SAP database using a secondary connection, where this external database has a character set other than WE8DEC, (generally the character set that corresponds to the language of the country), which is also the SAP-internal character set.
When doing this, you must distinguish between Unicode and non-Unicode:
(1)
SAP database is UTF8 (Unicode):
If the SAP database is Unicode, the SAP-internal data does not appear in different national character sets, but there is a unique Unicode source code. The data of the external database (Unicode or non-Unicode) is converted to the correct Unicode format using Oracle’s automatic internal conversion. The prerequisite for this is that the data in the external database matches the character set and that only characters that are valid in the external character set are used when writing to the external database.
(2)
SAP database is WE8DEC (non-Unicode):
You must set the NLS environment of the SAP connection to the external database to this SAP-internal character set to ensure that the data is not converted when it is transported between the external database and the SAP database, but instead remains in the country-specific character set that is also the SAP-internal character set.
Again, the prerequisite for this is that the external data (Unicode or non-Unicode) in the character set of the external database matches the character set, and that only characters that are valid in the external characters set are used when writing to the external database.
As of SAP R/3 Kernel Release 6.40 Patch 55, it is possible to use an external database that differs from WE8DEC if you define a secondary connection in transaction DBCO.
The secondary connection is defined in transaction DBCO (table DBCON). The syntax in the “Connection Information” field is as follows:
tnsname:charset:ncharset
tnsname: TNS alias of the secondary database (no default).
charset: Character set of the secondary database (default WE8DEC).
ncharset: National character set of the secondary database (default OCI_UTF16ID).
(All parameters with the exception of tnsname can be omitted and
the ‘:’ separator must be retained, except at the end of the string).
Examples:
C11.
C11:EL8ISO8859P7
C11::UTF16

Note:
———-
As of SAP Release 7.00 (Oracle 10g or higher), “Oracle Instant Client” is used and is available as both a full version and an “Instant Client Light (English)” version. The following error
ORA-12737: “Instant Client Light: unsupported server character set %s”
may occur in the Instant Client Light version if the remote database uses a character set other than
Single-Byte: US7ASCII, WE8DEC, WE8MSWIN1252, WE8ISO8859P1
Unicode: UTF8, AL16UTF16, AL32UTF8.
(SAP only permits the use of WE8DEC or UTF8 for the SAP database.)
To correct this error, you must either set the character set of the remote database of one of the seven permitted character sets mentioned above or you must install the full version of the Instant Client. (See Note 819829 in regard to the last point).
Corrections:
————
The described procedure with transaction DBCO did not previously function if the SAP System, from which the connection to a secondary Oracle database should be created, was on a non-Oracle database. The relevant corrections are contained in the lib_dbsl package or in the SAP kernel in Release 6.40 as of Patch level 166 or higher and in Release 7.00 as of Patchlevel 93 or higher.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment