Step by step instructions to change oracle database character set.
meda Unselected an answer 09/08/2022
We can change the character set of an Oracle database once the database instance is created, provided that the database has no data unless the data is corrupted. If the database has data, it is better to recreate the database instance.
And below is a step by step practical example to change oracle database character set using SQL*PLUS command-line tool.
D:\app\Admin\virtual\virtual\product\12.2.0\dbhome_1\bin>sqlplus/nolog SQL*Plus: Release 12.2.0.1.0 Production on Sat Jan 29 17:38:34 2022 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> conn sys/orcl@orcl as sysdba Connected. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup restrict ORACLE instance started. Total System Global Area 2499805184 bytes Fixed Size 8749920 bytes Variable Size 687869088 bytes Database Buffers 1795162112 bytes Redo Buffers 8024064 bytes Database mounted. Database opened. --- Check the existing character set SQL> select value from NLS_DATABASE_PARAMETERS where PARAMETER = 'NLS_CHARACTERSET'; VALUE -------------------------------------------------------------------------------- WE8ISO8859P1 --- Change the existing character set to AL32UTF8 SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8; Database altered. SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 2499805184 bytes Fixed Size 8749920 bytes Variable Size 687869088 bytes Database Buffers 1795162112 bytes Redo Buffers 8024064 bytes Database mounted. Database opened. SQL> select value from NLS_DATABASE_PARAMETERS where PARAMETER = 'NLS_CHARACTERSET'; VALUE ---------------------------------------------------------------- AL32UTF8
meda Edited answer 23/04/2023