Character Sets and SPfiles
Character Sets and SPfiles By Tony JambuIf you have a database with a 7 bit character set, for example US7ASCII, this
would imply that your database was probably created in Oracle 7 or 8 when
the default character set was US7ASCII.
Background information: A particular 10g database I was working on uses the
US7ASCII character set. Now this is a 7 bit character set that represents the
universal 128 characters with which we are familiar ( www.asciitable.com).
select value from NLS_DATABASE_PARAMETERS where parameter=’NLS_CHARACTERSET’;
US7ASCII
Its data needed to be migrated to an 8 bit character set, WE8ISO8859P1.
Beginning with Oracle 10g, there is a utility called CSSCAN that does a
pre-migration check to see if the current data in the database can be migrated
to the new character set.
csscan FROMCHAR=US7ASCII TOCHAR=WE8ISO8859P1
It will then report if the character migration would be successful. It does this
by scanning every block in the database and checking if the current character
can be migrated to the new character set.
There are four possible outcomes from the scan.
Changeless No additional work is required (Good)
Convertible Means the data must be converted and we have to export the
table before the change and then import it (Not good—very
time-consuming)
Truncation The converted data will not fit in the current column size.
Column needs to be increased before exporting the table,
then the migration followed by the import. (Not good)
Lossy Data does not have a valid code point in the target character set,
i.e. it does not exist. Every ‘lossy’ character will be converted to
the _same_ undefined character e.g., “” or “?” (Not good)
We were very fortunate that the results of the scan were all Changeless.
页:
[1]