Referência
Aplicável
- Oracle 9, Oracle 10 e Oracle 11
Solução
###################################################
Antes de
realizar esta alteração, faça um backup do banco de dados
###################################################
- Verifique a versão atual.
maq01:oramaq
3> sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production
on Thu Nov 14 15:08:03 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition
Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data
Mining and Real Application Testing options
SQL> select property_value from database_properties
where upper(property_name) =
'NLS_NCHAR_CHARACTERSET';
PROPERTY_VALUE
--------------------------------------------------------------------------------
AL16UTF16
- Verifique se seu banco de dados não está usando nenhum
campo do tipo NCHAR, NVARCHAR2 or NCLOB. Caso encontre, entre em contato
com o suporte da SAP.
SQL> select owner, table_name, column_name
from dba_tab_columns
where (data_type = 'NCHAR' or
data_type = 'NVARCHAR2' or
data_type = 'NCLOB') and
owner != 'SYS' and
owner != 'SYSTEM';
from dba_tab_columns
where (data_type = 'NCHAR' or
data_type = 'NVARCHAR2' or
data_type = 'NCLOB') and
owner != 'SYS' and
owner != 'SYSTEM';
no
rows selected
Changing the national
character set
- Para realizar esta alteração, é necessário possuir
permissão SYSDBA.
- Execute os comandos nesta ordem.
sqlplus “/as sysdba”
CONNECT / AS SYSDBA
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0 SCOPE = MEMORY;
ALTER SYSTEM SET AQ_TM_PROCESSES=0 SCOPE = MEMORY;
ALTER DATABASE OPEN;
ALTER DATABASE NATIONAL CHARACTER SET UTF8;
SHUTDOWN IMMEDIATE
STARTUP
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0 SCOPE = MEMORY;
ALTER SYSTEM SET AQ_TM_PROCESSES=0 SCOPE = MEMORY;
ALTER DATABASE OPEN;
ALTER DATABASE NATIONAL CHARACTER SET UTF8;
SHUTDOWN IMMEDIATE
STARTUP
- Verificando o national character set.
SQL> select property_value from database_properties
where upper(property_name 2 ) = 'NLS_NCHAR_CHARACTERSET';
PROPERTY_VALUE
--------------------------------------------------------------------------------
UTF8
Postar um comentário
Obrigado por comentar.
Aguarde a moderação.