We can change the DB char set using the CSSCAN utility, it provides information about if we change the char set, which data we might lost during the char set conversion.
let's see how to use csscan utility.
1.set your DB env
2.Go to $ORACLE_HOME/bin
3.Before invoke the csscan , make sure you have char set migration schema(csminst) available in database, if not install it first, otherwise you will get this below error while running csscan
CSS-00107: Character set migration utility schema not installed
sqlplus "/as sysdba"
@?/rdbms/admin/csminst.sql
4.Invoke the csscan utility
./cssacn \"sys/oracle AS SYSDBA\" FULL=Y - to scan the whole DB
./cssacn \"sys/oracle AS SYSDBA\" table=schema.table_name - to scan a table
still many options available to scan a schema itself etc.
5.while running the above, we need to provide the char set name, which we need to migrate and no of process.
6.Once it completed, validate the scan.txt, scan.err for any lossy data,if it's there check with application team to fix the data.
7.Once you fix the data, run it again.
To change the char set.
1.shut the db and start using restricted mode.
2.run csalter.plb
sqlplus "/as sysdba"
@?/rdbms/admin/csalter.plb
0 rows created.
Function created.
Function created.
Procedure created.
This script will update the content of the Oracle Data Dictionary.
Please ensure you have a full backup before initiating this procedure.
Would you like to proceed (Y/N)?Y
old 6: if (UPPER('&conf') <> 'Y') then
new 6: if (UPPER('Y') <> 'Y') then
Checking data validility...
begin converting system objects
PL/SQL procedure successfully completed.
Alter the database character set...
CSALTER operation completed, please restart database
PL/SQL procedure successfully completed.
0 rows deleted.
Function dropped.
Function dropped.
Procedure dropped.
3.restart the DB, and check char set.
SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
Refernce :
http://www.oracle-base.com/articles/10g/CharacterSetMigration.php
let's see how to use csscan utility.
1.set your DB env
2.Go to $ORACLE_HOME/bin
3.Before invoke the csscan , make sure you have char set migration schema(csminst) available in database, if not install it first, otherwise you will get this below error while running csscan
CSS-00107: Character set migration utility schema not installed
sqlplus "/as sysdba"
@?/rdbms/admin/csminst.sql
4.Invoke the csscan utility
./cssacn \"sys/oracle AS SYSDBA\" FULL=Y - to scan the whole DB
./cssacn \"sys/oracle AS SYSDBA\" table=schema.table_name - to scan a table
still many options available to scan a schema itself etc.
5.while running the above, we need to provide the char set name, which we need to migrate and no of process.
6.Once it completed, validate the scan.txt, scan.err for any lossy data,if it's there check with application team to fix the data.
7.Once you fix the data, run it again.
To change the char set.
1.shut the db and start using restricted mode.
2.run csalter.plb
sqlplus "/as sysdba"
@?/rdbms/admin/csalter.plb
0 rows created.
Function created.
Function created.
Procedure created.
This script will update the content of the Oracle Data Dictionary.
Please ensure you have a full backup before initiating this procedure.
Would you like to proceed (Y/N)?Y
old 6: if (UPPER('&conf') <> 'Y') then
new 6: if (UPPER('Y') <> 'Y') then
Checking data validility...
begin converting system objects
PL/SQL procedure successfully completed.
Alter the database character set...
CSALTER operation completed, please restart database
PL/SQL procedure successfully completed.
0 rows deleted.
Function dropped.
Function dropped.
Procedure dropped.
3.restart the DB, and check char set.
SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
Refernce :
http://www.oracle-base.com/articles/10g/CharacterSetMigration.php
Comments
sap upgrade evaluation