13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2: Initial Programming Considerations<br />

• Use appropriate startup parameters — To process Unicode data in your client<br />

application, set your cpinternal client code page to utf-8. If you are executing<br />

file I/O against your Unicode data, set your client’s cpstream code page to utf-8.<br />

You also may consider several other available client code page settings <strong>for</strong><br />

Unicode. For more in<strong>for</strong>mation, see <strong>OpenEdge</strong> Development: Internationalizing<br />

Applications.<br />

• Prepare <strong>OpenEdge</strong> databases <strong>for</strong> Unicode — Your <strong>OpenEdge</strong> database does<br />

not need to be Unicode-enabled in order to be migrated to an ORACLE<br />

<strong>Data</strong><strong>Server</strong>. The migration process will convert data from any ANSI code page to<br />

Unicode as part of the migration if you chose to move data during a migration and<br />

have specified a Unicode destination. If you have existing data in an <strong>OpenEdge</strong><br />

database that you wish to convert to Unicode prior to migration, you can convert<br />

your non-Unicode data using one of two conversion utilities:<br />

– <strong>Data</strong> Administration dump and load utility<br />

– PROUTIL CONVCHAR character conversion utility<br />

For more in<strong>for</strong>mation on these utilities, see <strong>OpenEdge</strong> Development:<br />

Internationalizing Applications.<br />

<strong>Data</strong> type support<br />

Unicode data and data types can be migrated to a MS <strong>SQL</strong> <strong>Server</strong> data source and<br />

pulled into a MS <strong>SQL</strong> <strong>Server</strong> <strong>Data</strong><strong>Server</strong> schema holder. Table 8 defines the supported<br />

MS <strong>SQL</strong> <strong>Server</strong> data types and their maximum sizes.<br />

Table 8: Supported Unicode data types in MS <strong>SQL</strong> <strong>Server</strong><br />

<strong>Data</strong> type Maximum size<br />

NCHAR 4000 characters<br />

NVARCHAR 4000 characters<br />

NVARCHAR(MAX) 2 30-1 characters<br />

NTEXT 2 30-1 characters<br />

MS <strong>SQL</strong> <strong>Server</strong> limits the size of CHAR and VARCHAR data types to 8000 bytes. When<br />

server data is represented by a single-byte ANSI code page, CHAR and VARCHAR data<br />

types can store 8000 characters. When <strong>SQL</strong> <strong>Server</strong> stores UCS-2 data in double-byte<br />

<strong>for</strong>mat, it restricts CHAR and VARCHAR data types to only 4000 characters. There<strong>for</strong>e,<br />

when a non-Unicode <strong>OpenEdge</strong> database is migrated to MS <strong>SQL</strong> <strong>Server</strong> 2005 (or<br />

greater), the Maximum Varchar Length threshold is set to 8000 by default. Character<br />

data sized smaller than this threshold (which the user can configure lower) is converted<br />

to the VARCHAR native type. Character columns with widths greater than 8000<br />

characters continue to be converted to the TEXT data type, MS <strong>SQL</strong> <strong>Server</strong>'s legacy<br />

CLOB equivalent data type. However, when a Unicode <strong>OpenEdge</strong> database is migrated<br />

to MS <strong>SQL</strong> <strong>Server</strong> 2005 (or greater), the Maximum Varchar Length threshold is set<br />

to 4000 by default and cannot be set any higher. Character columns with widths greater<br />

than 4000 characters are converted to the NVARCHAR(max) data type (MS <strong>SQL</strong> <strong>Server</strong>'s<br />

Unicode CLOB-equivalent data type).<br />

64 <strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!