Oracle changing character set

Source: Internet
Author: User

Event environment:

The server a character set is inconsistent with the server B character set.

After the server a exp command exports the DMP file, garbled characters are displayed when IMP is imported into Chinese on server B.

Solution: Modify the character set of Oracle service on server B (essentially equivalent to the character set of server a Oracle ).

1. View server a Character Set

 
SQL>Conn sysAsSysdbasql>Select * FromV $ nls_parametersWhereParameter='Nls_characterset';

2. Delete the existing user tablespace on server B and create a new tablespace user.

 Drop UserIdhrCascade;DropTablespace idhrdevdb;
 --  Initialize database information  Create  Tablespace idhrdevdbloggingdatafile  '  D: \ oraclexe \ app \ oracle \ oradata \ idhrdevdb. DBF  '  Size 32 mautoextend  On  Extent management local;  Create  User Idhr identified By Idhr _ 0525  Profile  Default  Default  Tablespace idhrdevdbaccount unlock;  Grant   All   Privileges   To  Idhr;  Grant Sysdba To Idhr;

 

3. Modify the Oracle Character Set of server B

Http://blog.csdn.net/lyn_bigdream/article/details/7473278

 Shutdown  Immediate; Startup Mount;  Alter Session Set SQL _trace =  True;  Alter  System enable restricted session;  Alter System Set Job_queue_processes =  0 ;  Alter System Set Aq_tm_processes =  0  ;  Alter   Database   Open  ;  Alter   Database   Character   Set  Internal_useAl32utf8; Alter Session Set SQL _trace =  False;  Shutdown  Immediate; startup; 

 

4. Import DMP data on server B again

 
IMP idhr/Idhr_0525File=F: \ ait \ lottes \ dB \ initialization database statement \Database\ Ss_hr.dmpLog=F: \ ait \ lottes \ dB \ initialization database statement \Database\ Ss_hr.LogFromuser=Indonesiaprod2

5. Remotely connect to database B of the server. Chinese characters are displayed normally.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.