0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

IMP-00038: Could not convert to environment character set's handleとなった時の対応方法

Last updated at Posted at 2020-04-21
  • 環境
    • Red Hat Enterprise Linux Server release 5.11 (Tikanga)
    • SQL*Plus: Release 11.2.0.1.0
    • Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

impコマンドでDumpをインポートしようとしたら怒られた

$ imp ponsuke/password file=/path/to/dpdump/hogedb.dmp fromuser=hogedb touser=testhoge

Import: Release 11.2.0.1.0 - Production on Tue Apr 21 14:04:57 2020

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

IMP-00038: Could not convert to environment character set's handle
IMP-00000: Import terminated unsuccessfully

原因 : expdpコマンドでエクスポートしたDumpファイルをimpコマンドでインポートするから

参考 : ORACLE 11g IMP-00038 キャラクタセットが同じ場合の原因 解決方法:ITみたいな なにか!?

expdpコマンドでエクスポートしたファイルだった・・・

対応 : impdpコマンドでインポートする

ORACLE/IMPORT(impdp)編 - オラクルちょこっとリファレンス

うまくいった
$ impdp ponsuke/password directory=DATA_PUMP_DIR dumpfile=hogedb.dmp remap_schema=hogedb:testhogedb

Import: Release 11.2.0.1.0 - Production on Tue Apr 21 14:33:09 2020

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Legacy Mode Active due to the following parameters:
...省略...

ほかの原因 : エクスポートしたDBとインポートしたDBのキャラクタセットが違うから

でキャラクタセットを確認する方法
SQL> select * from nls_database_parameters where parameter in ('NLS_LANGUAGE','NLS_CHARACTERSET');

PARAMETER                      VALUE
------------------------------ --------------------------------------------------------------------------------
NLS_LANGUAGE                   AHOGEICAN
NLS_CHARACTERSET               JA16SJISTILDE

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?