Oracle -- Set NS_NCHAR_CHARACTEREST



--------------------1 change NLS_NCHAR_CHARACTERSET
SHUTDOWN IMMEDIATE;
STARTUP MOUNT exclusive RESTRICT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN ;
-------------------
 
update props$
set value$='AL16UTF16'
where name in ( 'NLS_NCHAR_CHARACTERSET');
commit;

SHUTDOWN IMMEDIATE;
STARTUP;


--select * from nls_database_parameters where parameter IN ('NLS_NCHAR_CHARACTERSET','NLS_CHARACTERSET);

--2 change NLS_CHARACTERSET to from WE8MSWIN1252 to AL32UTF8.
SHUTDOWN IMMEDIATE;
STARTUP RESTRICT;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;

alter database CHARACTER SET AL32UTF8;

SHUTDOWN IMMEDIATE;
STARTUP;

--3 if 2 is not work let's try this------------------------------------------------------------------
Execute the following commands in sqlplus connected as "/ AS SYSDBA":
1. SHUTDOWN IMMEDIATE;
2. STARTUP MOUNT;
3. ALTER SYSTEM ENABLE RESTRICTED SESSION;
4. ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
5. ALTER SYSTEM SET AQ_TM_PROCESSES=0;
6. ALTER DATABASE OPEN;
7. ALTER DATABASE CHARACTER SET WE8MSWIN1252;
8. SHUTDOWN IMMEDIATE;
9. STARTUP RESTRICT;
10. SHUTDOWN;
11. STARTUP;
Now of course your database is then WE8MSWIN1252, so
you need to replace <existing database character set> with WE8MSWIN1252 from now on....

• Perform a backup of the database.
• Check the backup.
• Double-check the backup.
Then use the "alter database" command, this changes the current database
character set definition WITHOUT changing the actual stored data.

Shutdown the listener and any application that connects locally to the database.
There should be only ONE connection the database during the WHOLE time and that's
the sqlplus session where you do the change.

Now From WE8MSWIN1252 TO AL32UTF8
Execute the following commands in sqlplus connected as "/ AS SYSDBA":
1. SHUTDOWN IMMEDIATE;
2. STARTUP MOUNT;
3. ALTER SYSTEM ENABLE RESTRICTED SESSION;
4. ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
5. ALTER SYSTEM SET AQ_TM_PROCESSES=0;
6. ALTER DATABASE OPEN;
7. ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;
8. SHUTDOWN IMMEDIATE;
9. STARTUP;
now we have done....Database into AL32UTF8


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章