blog menu1

Administration - character set migration

Administration - character set migration

Steps –


  1. Install CS Scan tool into the database.
  2. Run CS Scan report to find losey and convertible records.
e.g. –
$ORACLE_HOME/bin/csscan id/pw@erpai1t FULL=Y fromchar=US7ASCII tochar=UTF8 capture=Y log=/home/oracle/cs_migration/erpai1t/css_US7ASCII_UTF8_20081027_1 array=10000000 process=10


  1. Use the information provided in the CS Scan Report.
  2. Request data owners (apps team) to clean all loosely data.
  3. Recheck for any loosely data
  4. Find the list of tables, which has convertible data. (List 1)
  5. Find the list of tables, which has RAW/CLOB/BLOW columns and has records (List 2).
  6. Find the list (List 3) of tables including the dependent tables from the List 1 & 2.
  7. Export all the tables (List 3).
  8. Disable constraints involving the table from List 3
  9. Truncate tables (List 3).
  10. SHUTDOWN IMMEDIATE;
  11. STARTUP MOUNT;
  12. ALTER SYSTEM ENABLE RESTRICTED SESSION;
  13. ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
  14. ALTER SYSTEM SET AQ_TM_PROCESSES=0;
  15. ALTER DATABASE OPEN;
  16. ALTER DATABASE CHARACTER SET <character set>;
  17. SHUTDOWN;
  18. STARTUP;
  19. Import data into the tables, which was exported earlier.
  20. Enable constraints
  21. Recreate an application index.
  22. Restart database

To see the full list of parameters, enter CSSCAN HELP=Y. (Make sureyou have the identifier for the character set to which you'll bemigrating, such as AL32UTF8 or UTF8 for Oracle 8.) After runningthe utility, there should be three files created in your currentdirectory: scan.err, scan.out, and scan.txt. These files containthe scan's results.
For example, I inserted chr(169) into a text columnin a UTF-8 database. This character isn't a valid UTF-8 sequence;it's a common character that a Web user might insert. The outputfrom CSSCAN in scan.err says:

User : SCOTT
Table : TMPTABLE
Column: TEXT
Type : VARCHAR2(2000)
Number ofExceptions :1
Max Post Conversion Data Size: 1
ROWID Exception Type Size Cell Data(first 30bytes)
----------------------------------------- ---------------------- ------------------------------
AAAHboAABAAAMYyAAA lossyconversion ?
----------------------------------------- ---------------------- ------------------------------

No comments:

Post a Comment