OracleOracle DB administeringOracle DB troubleshooting

ORA-12899: importing a .dmp file + character set conversion

Posted

https://www.queryxchange.com/q/7_17504/ora-12899-importing-a-dmp-file-character-set-conversion/

You can edit the dump file and change the included NLS_LENGTH_SEMANTICS from BYTE to CHAR.

Near the beginning of the file you find a line ending like this :

^@02:00:^@^@^D^@BYTE^F^@UNUSED^A^@2^K^INTERPRETED^K^@DISABLE:ALL^@^@

Change BYTE to CHAR using your favorite text editor and save the file.

When you will imp that new dump file, all columns will be create with CHAR length semantics.

If you need to automate the fix, the following script should work :

sed '1,/\x00BYTE\x06/{s/\x00BYTE\x06\x00UNUSED/\x00CHAR\x06\x00UNUSED/}' < original.dmp > modified.dmp

Leave a Reply

Your email address will not be published. Required fields are marked *