Informix Guide to GLS Functionality
Chapter 6: INFORMIX-SE Features
Home
Contents
Index
Master Index
New Book
Naming a Database
The SE database server limits the name of a database to 10 bytes. When you use multibyte characters in database names, you must ensure that the database name meets this size requirement. The following
CREATE DATABASE
statement creates a database name of five multibyte characters:
CREATE DATABASE A1A2B1B2C1C2D1D2E1E2
The database name that is shown in the preceding representation is 10 bytes long (five 2-byte multibyte characters), so it does not exceed the maximum length for SE database names. However, the following
CREATE DATABASE
statement generates an error because the total number of bytes in this database name is 12:
CREATE DATABASE A1A2A3A4B1B2B3B4C1C2C3C4
This statement specifies three 4-byte characters for the name of an SE database. In this case, the total number of bytes in the database name would be 12 bytes, and this length exceeds the maximum length for a database name in SE. The database server rejects the statement with the following error message:
-354: Incorrect database or cursor name format
To recover from this error, you must reenter the
CREATE DATABASE
statement and specify a name whose total length in the buffer is not more than 10 bytes.
Tip:
You specify the database name in the code set of the client locale (the client code set). When your client application performs code-set conversion on a database name, it might expand this name beyond the 10-character limit. Make sure that the database name is 10 or fewer characters that the database code set defines, not just that the client code set defines.
Informix Guide to GLS Functionality
, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.