Configuring Oracle for single or multiple byte characters
About this task
To set up Oracle for use with single or multiple byte characters:
Procedure
- Run the Oracle create instance procedure. Use a character set appropriate for your desired language. For example:
CHARACTER SET "UTF8"
- Configure the
INIT<INSTANCE_NAME>.ORA
file for Oracle as follows:open_cursors= <set to appropriate value>
For example, the minimum value for WebLogic equals number of threads (across all application servers) + (connection pool size X prepared statement pool size)
cursor_sharing=FORCE compatible=<set to appropriate value, or remove to default to current release> timed_statistics=true db_block_size=8192 optimizer_mode=ALL_ROWS
If you are using multi-byte character set, set the following and restart Oracle:
nls_length_semantics=CHAR
Alternatively you can run the following prior to running any create table scripts:
alter session set nls_length_semantics = CHAR
Setting this attribute ensures that the field sizes are not impacted by the number of bytes a data type can store. For example, Varchar(40) would now be able to store 40 Japanese characters instead of 40/3 bytes in the UTF-8 character set.
For the Japanese locale, the AL32UTF-8 character set or the UTF-16 character set must be used.
When you change the multi-byte character set to CHAR by setting nls_length_semantics = CHAR, Oracle reserves space equivalent to 'n' chars, which is more than 'n' bytes. Therefore, when you run the
dbverify.cmd
command, the reduced entries in table columns are printed in theEFrame_Drops.lst
file. - Download the Oracle JDBC driver for the version of Oracle you are using from the Oracle Web site and copy it to a well known location for reference during installation.
The Oracle JDBC driver can be found in the JDBC Driver Downloads section at:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
For Oracle database supported version information, go to the IBM® Support Portal at http://www.ibm.com/support/entry/portal/Planning
Results
To create the Oracle database to handle multiple byte characters, do not modify the DDL.