Question: What does
the nls_length_semantics parameter do? Can you show an
example using nls_length_semantics?
Answer: The nls_length_semantics
parameter enables you to create CHAR and VARCHAR2 columns,
using either byte or character length semantics. The default
for nls_length_semantics is "byte". You MUST create a new
database with nls_length_semantics=byte because scripts such
as catalog.sql must use the byte setting.
Oracle notes this about the nls_length_semantics
"The session-level value of
nls_length_semantics specifies the default length
semantics to use for VARCHAR2 and CHAR table columns . . .
This default may be overridden by the
explicit length semantics qualifiers BYTE and CHAR in
column, attribute, and variable definitions.
The instance-level value of
nls_length_semantics provides a default for the
session-level value if
nls_length_semantics it is not set explicitly by the
database client through the
nls_length_semantics client environment variable
(does not apply to JDBC Thin clients, or the ALTER SESSION
WARNING: Oracle strongly
recommends that you NOT set NLS_LENGTH_SEMANTICS=CHAR in the
init.ora or spfile. Doing this may cause many existing
installation scripts to unexpectedly create columns with
character length semantics, resulting in runtime errors,
including buffer overflows.
Oracle Training from Don Burleson
The best on site
training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!
Burleson is the American Team
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
and include the URL for the page.
Copyright © 1996 - 2020
All rights reserved by
is the registered trademark of Oracle Corporation.