Oracle817 version of the database is imported between different character sets

zhaozj2021-02-11  187

Oracle817 version of the database is imported between different character sets

Due to business reasons, it is necessary to import a database DMP file of an English character set (American_america.We8ISO8859P1) into a database of a Chinese character set (Simplified Chinese_China.zhs16GBK). Due to the difference in character sets, the database environment of the Chinese character set is needed into English character sets. I have encountered a lot of trouble, and I finally solved the problem by finding information online. In this process, I found that netizens also have the same problem. In order, let you have successfully complete such work in the future, will now write the process of introducing success and share it with you.

First, the system environment:

Export environment:

Host: Compaq small machine

Operating system: UNIX

Database: Oracle8.1.7 {English character set (American_america.we8iso8859p1)}

Import environment:

Host: ordinary PC

Main frequency: PIII750

Memory: 192m

Operating system: Windows 2000 Server

Database: Oracle8.1.7 Chinese character set (Simplified Chinese_China.zHS16GBK)

Note: The export process is omitted

Second, the import process

1, put the Oracle registry in the Win2000 system

[NLS_LANG] key value in [HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE]

"Simplified chinese_china.zhs16GBK" is changed

"American_america.we8iso8859p1"

2. Use the SYSTEM user's identity to perform the following statement under SQL-PLUS:

Update sys.props $ set value $ = 'whe8iso8859p1' where name = 'nls_characterset';

Update sys.props $ set value $ = 'whe8iso8859p1' where name = 'nls_nchar_characterset';

COMMIT;

3, restart Oracle

4, start importing the database

Userid = User Name / Password @ 连 结串

Buffer = 60000

LOG = C: /DMP.log

FILE = C: / Import Data File Name .dmp

FromUser = username

Touser = username

It should be noted here that to ensure that the imported tablespace and the user have established and the export file, it is necessary to confirm whether the user has the DBA permissions, otherwise it may affect the complete data.

5. Check the import effect. In the current environment, the test data is correct, whether there is garbled, there is information such as a table and other triggers, processes, and functions that have not been successfully imported. After confirming that the import is no problem, enter the next step.

6. Recover the Win2000 Oracle character set environment into a Chinese character set.

[NLS_LANG] key value in [HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE]

"American_america.we8iso8859p1" change

"Simplified chinese_china.zhs16gbk"

7, use the SYSTEM user's identity, perform the following statement under SQL-PLUS:

Update sys.props $ set value $ = 'zhs16gbk' where name = 'nls_characterset'; Update sys.props $ set value $ = 'zhs16gbk' where name = 'nls_nchar_characterset';

COMMIT;

8, restart the database.

Check the data in your database, if there is no garbled, and your program can run normally in this environment, so congratulations, you have succeeded! !

The above is the whole process I introduced, if there is a leak, I hope you can give you points, you can contact me through email: hawk_flying@sina.com.

转载请注明原文地址:https://www.9cbs.com/read-4692.html

New Post(0)