oracle guide

Page 301

Database Character Set Scanner CSALTER Script

degradation. Oracle Corporation recommends setting a limit on the number of exception rows to be recorded using the SUPPRESS parameter.

Recommendations and Restrictions for the Database Character Set Scanner All the character-based data in CHAR, VARCHAR2, LONG, CLOB, and VARRAY columns are stored in the database character set, which is specified with the CREATE DATABASE statement when the database is first created. However, in some configurations, it is possible to store data in a different character set from the database character set either intentionally or unintentionally. This happens most often when the NLS_LANG character set is the same as the database character set, because in such cases Oracle sends and receives data as is, without conversion or validation being guaranteed. It can also happen if one of the two character sets is a superset of the other, in which case many of the code points appear as if they were not converted. For example, if NLS_LANG is set to WE8ISO8859P1 and the database character set is WE8MSWIN1252, then all code points except the range 128-159 are preserved through the client/server conversion. The same binary code point value can be used to represent different characters between the different character sets. Most European character sets share liberal use of the 8-bit range to encode native characters, so it is very possible for a cell to be reported as convertible but for the wrong reasons. When you set the FROMCHAR parameter, the assumption is that all character data is encoded in that character set, but the Database Character Set Scanner may not be able to accurately determine its validity. For example, this can occur when the Database Character Set Scanner is used with the FROMCHAR parameter set to WE8MSWIN1252. This single-byte character set encodes a character in every available code point so that no matter what data is being scanned, the scanner always identifies a data cell as being available in the source character set.

Scanning Database Containing Data Not in the Database Character Set If a database contains data that is not in the database character set, but it is encoded in another character set, then the Database Character Set Scanner can perform a scan if the FROMCHAR parameter specifies the encoded character set.

Scanning Database Containing Data from Two or More Character Sets If a database contains data from more than one character set, then the Database Character Set Scanner cannot accurately test the effects of changing the database character set by a single scan. If the data can be divided into separate tables, one for each character set, then the Database Character Set Scanner can perform multiple table scans to verify the validity of the data. For each scan, use a different value of the FROMCHAR parameter to tell the Database Character Set Scanner to treat all target columns in the table as if they were in the specified character set.

Database Character Set Scanner CSALTER Script The CSALTER script is a DBA tool for special character set migration. Similar to the obsolete ALTER DATABASE CHARACTER SET SQL statement, CSALTER should be used only by the system administrator. System administrators must run the Database Character Set Scanner first to confirm that the proper conditions exist for running CSALTER. Also, the database must be backed up before running CSALTER.

Character Set Scanner Utilities 12-33


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.