由于导出的dmp字符集与oracle服务器字符集不一致,导致导入失败
操作命令
[oracle@ORACLE ~]$ sqlplus /nolog
SQL> conn /as sysdba;
SQL>select userenv(‘language’) from dual; --查看服务端字符集
SQL>SHUTDOWN IMMEDIATE --关闭数据库
SQL>STARTUP MOUNT --启动到 Mount
SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL>ALTER DATABASE OPEN;
SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP;
SQL>select userenv(‘language’) from dual; --查看服务端字符集
oracle@localhost.localdomain:/home/oracle$ sqlplus /nolog
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Sep 3 12:48:50 2020
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
SQL> conn /as sysdba;
Connected.
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT
ORACLE instance started.
Total System Global Area 3154113400 bytes
Fixed Size 8901496 bytes
Variable Size 671088640 bytes
Database Buffers 2466250752 bytes
Redo Buffers 7872512 bytes
Database mounted.
SQL> 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_USE ZHS16GBK;
System altered.
SQL>
System altered.
SQL>
System altered.
SQL>
Database altered.
SQL>
Database altered.
SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP;
ORACLE instance started.
Total System Global Area 3154113400 bytes
Fixed Size 8901496 bytes
Variable Size 671088640 bytes
Database Buffers 2466250752 bytes
Redo Buffers 7872512 bytes
Database mounted.
Database opened.
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK
参考:https://www.cnblogs.com/zxg-6/p/9771530.html 成功解决问题
记录下工作中的遇到的问题及解决办法