Administration - character set migration
Steps –
- Install CS Scan tool into the database.
- 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
- Use the information provided in the CS Scan Report.
- Request data owners (apps team) to clean all loosely data.
- Recheck for any loosely data
- Find the list of tables, which has convertible data. (List 1)
- Find the list of tables, which has RAW/CLOB/BLOW columns and has records (List 2).
- Find the list (List 3) of tables including the dependent tables from the List 1 & 2.
- Export all the tables (List 3).
- Disable constraints involving the table from List 3
- Truncate tables (List 3).
- SHUTDOWN IMMEDIATE;
- STARTUP MOUNT;
- ALTER SYSTEM ENABLE RESTRICTED SESSION;
- ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
- ALTER SYSTEM SET AQ_TM_PROCESSES=0;
- ALTER DATABASE OPEN;
- ALTER DATABASE CHARACTER SET <character set>;
- SHUTDOWN;
- STARTUP;
- Import data into the tables, which was exported earlier.
- Enable constraints
- Recreate an application index.
- 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