Skip to main content

Change the Database Char Set Using CSSCAN and CSALTER

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

Comments

Tani said…
Thanks for Sharing Knowledge related to Changing the Database Char Set Using CSSCAN and CSALTER in Oracle applications.

sap upgrade evaluation

Popular posts from this blog

ORA-20200 Error while running AWR report from PDB level

Issue: In 19c database, while generating AWR report from PDB level, got the below error.  In 12cR1 - We can only generate statistics and run the Workload Repository (AWR) report from CDB level.  Since 12.2, if we want to generate statistics and run AWR report from PDB level, we have to change  awr_pdb_autoflush_enabled parameter to TRUE. Error: ERROR at line 1: ORA-20200: Database/Instance 2832289441/1 does not exist in AWR_PDB_DATABASE_INSTANCE ORA-06512: at line 27 Solution: alter session set container=ORCL; >>>>   Set the container Name alter system set awr_pdb_autoflush_enabled=true; conn system/<pwd>@orclcdb     >>>> Login into PDB database alter system set AWR_SNAPSHOT_TIME_OFFSET=1000000 scope=both;   >>> Set the arameter to avoid performance issue while generating snapshot at the same time in CDB and PDB level. exec dbms_workload_repository.create_snapshot(); SQL> @?/rdbms/admin/awrrpt.sql Console Log: SQL> show pdbs       CON_ID CON

EBS 12.2 - Script to monitor JVM Heap Memory for the weblogic managed servers

#!/bin/sh # Script to monitor JVM Heap Memory for the managed servers # Author : Ramasubbu Sunadaravel # Date   : 23-Aug-2016 # Usage  : sh jvm_heap_mem_mon.sh run  ## VARIABLES save_date=`date +%d_%b_%y` LOGFILE=/export/home/applmgr/oraprocs/logs HISTFILE=/export/home/applmgr/oraprocs/histfile threshold=10 MAIL_LIST=rsundaravel@yahoo.com SCRIPT=/export/home/applmgr/oraprocs/.jvm_check.py ## SCRIPTS STARTS HERE . /r11/app/FLRPRD/R12apps/EBSapps.env . $FMW_HOME/wlserver_10.3/server/bin/setWLSEnv.sh java weblogic.WLST $SCRIPT > $LOGFILE/jvm_heap_monitoring.log date '+Start Time: %m/%d/%y %H:%M:%S' >> $HISTFILE/jvm_heap_monitoring_$save_date.log cat $LOGFILE/jvm_heap_monitoring.log|grep "%" >> $HISTFILE/jvm_heap_monitoring_$save_date.log date '+End Time: %m/%d/%y %H:%M:%S' >> $HISTFILE/jvm_heap_monitoring_$save_date.log #Alert DBA's if any of the managed server heap size reached more than $threshold value current=`

EBS 12.2 - Script to monitor Weblogic Managed servers

#!/bin/sh # Script to monitor Weblogic managed server status # Author : Ramasubbu Sunadaravel # Date   : 23-Aug-2016 . /r11/app/FLRPRD/R12apps/EBSapps.env ## VARIABLES ### LOGFILE=/export/home/applmgr/oraprocs/logs MAIL_LIST=rsundaravel@yahoo.com ADMIN_URL=http://test.domain.int:7014/console PARFILE=/export/home/applmgr/oraprocs/mgd_server_list.par ## - place all the managed servers name. WEBLOGIC_PWD = /export/home/applmgr/oraprocs/.weblogicpwd ## SCRIPT STARTS cat $PARFILE |while read line do managed_server=`echo $line | awk '{print $1}'` LOGFILE=/export/home/applmgr/oraprocs/logs echo $managed_server echo `cat $WEBLOGIC_PWD`|$ADMIN_SCRIPTS_HOME/admanagedsrvctl.sh status $managed_server|grep $managed_server|grep -v logs > $LOGFILE/$managed_server.log status=`cat $LOGFILE/$managed_server.log|grep "is running"|wc -l` if test $status -eq 1 then echo "$managed_server is Running" else echo "$managed