Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to import an Oracle 11 export into Oracle 11 XE.

I get the following messages:

import in XE fehlerhaft import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion)

Any ideas, how I can import this dump into Oracle 11 XE ?

Edit:

Given a table

CREATE TABLE BDATA.Artikel(
    Key                   VARCHAR2(3)  NOT NULL,
    Name                  VARCHAR2(60) NOT NULL,
    Abkuerzung            VARCHAR2(5)  NOT NULL
);

I get errors like this

IMP-00019: row rejected due to ORACLE error 12899
IMP-00003: ORACLE error 12899 encountered
ORA-12899: value too large for column "BDATA"."ARTIKEL"."ABKUERZUNG" (actual: 6, maximum: 5)
Column 1 ABL
Column 2 Aufbewahrungslösung
Column 3 AfbLö

Some rows are missing from the import.

share|improve this question
add comment

3 Answers 3

up vote 6 down vote accepted

If that is the actual DDL you are using to create the table, you could use the NLS_LENGTH_SEMANTICS parameter. If you set that to CHAR rather than the default of BYTE, a VARCHAR2(5) will be allocated enough space to store 5 characters in the database character set (potentially up to 20 bytes) rather than 5 bytes (which could allow just 1 character).

Unfortunately, changing the NLS_LENGTH_SEMANTICS probably won't be terribly helpful if you're relying on the import process to create the table-- the dump file will inherently add the CHAR or BYTE keyword so it would actually issue the statement

CREATE TABLE BDATA.Artikel(
    Key                   VARCHAR2(3 BYTE)  NOT NULL,
    Name                  VARCHAR2(60 BYTE) NOT NULL,
    Abkuerzung            VARCHAR2(5 BYTE)  NOT NULL
);
share|improve this answer
    
I have the create table script and can modify it according to your proposal. If imp works when the tables are already created, all would be fine. –  bernd_k May 16 '11 at 14:58
    
@bernd_k - Cool. Then you can either set NLS_LENGTH_SEMANTICS before running the DDL or you could modify the DDL to add CHAR to every VARCHAR2 column declaration. When you do the import, you'll just have to tell it to ignore the failure of the CREATE TABLE statements since the tables will already exist. –  Justin Cave May 16 '11 at 15:32
    
I changed my table definition ...VARCHAR2(60 CHAR) NOT NULL ... and used IMP with IGNORE=Y and Import terminated successfully with warnings. –  bernd_k May 16 '11 at 17:48
add comment

You don't have a choice of character set on XE so you cannot change it to suit the database you are trying to import. Would it be practical to migrate the source database before export?

The import should work, but character set conversion might mean some text columns with non-ascii characters won't look the same after the import. And rows can be rejected if they are too long in the new character set.

In your case, you are converting to UTF8, which will mean it is possible for a single byte character to grow during conversion to 2 (or more in theory). You may need to increase the column size before export or adjust the target schema and import the data in a separate step. See here for other possible data truncation problems

share|improve this answer
    
See my edit. My only hope is to first create the tables with extended width and than import the data ignoring the create tables from the import. –  bernd_k May 16 '11 at 13:09
    
are you using impdp? see here for how –  Jack Douglas May 16 '11 at 13:20
    
not yet, but perhaps a good time to learn. –  bernd_k May 16 '11 at 13:33
    
but note that impdp can only be used with exports created with expdp –  Jack Douglas May 16 '11 at 13:53
add comment

You can actually change XE character set to match the original, as long as you don't mind loosing UTF advantages. I had the same problem and this solution worked for me.

http://www.dbaportal.eu/?q=node/15

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.