Forum: LRCM

Forums > LRCM > Problem importing Oracle dmp from server to a laptop

Problem importing Oracle dmp from server to a laptop


user offline United_States
I want periodically to move the BI-Cycle LRCM tables from the server to my laptop where I have my BI-Cycle LRCM program running. I try to do this with an export and import respectively. That way, whenever I want, I can switch BI-Cycle from using the server's Oracle database to the local database on my laptop. I can conveniently perform my reliability analyses without having to be connected to the network.

The import begins well indicating that Oracle on the server uses character set WE8ISO8859P1 and that the laptop Oracle uses AL32UTF8. And it indicates "conversion possible".

However, during the import I got occasional Oracle Error 12899 indicating that data was too large for the column. (e.g. valeur trop grande pour la colonne ... reelle : 26, maximum : 25)

I set the NLS_LANG on the laptop to NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 but that did not help.


Send eMail to User user offline Canada
There are actually two separate issues:
  1. How Oracle stores data, and
  2. How the laptop displays data.
How Oracle stores data is established at database creation.
How the laptop displays data is set up in the laptop's operating system.

Setting NLS_LANG is the way we tell Oracle how we want the laptop to display data. Oracle, using the information in NLS_LANG, will then know how it should convert data from its stored form each time a user (using the laptop) asks to see some data.

The problem that you have is as follows:
  • The server's Oracle database stores data in a way that every character takes 1 byte of space.
  • But the laptop database stores data in a (newer) way so that some characters take 2, 3, or 4 bytes of space.
The import utility knows how the data was stored in the source and how it should be stored in the laptop. So it does the conversion. Some characters will be converted from one byte of storage space to two or more bytes. Naturally, there will sometimes not be enough storage space allocated in the target database. This is the error you got. Obviously, setting NLS_LANG (how data is displayed) will not take care of this storage related problem.

Oracle needed to solve this problem with the advent of multi-byte characters.

Solution:

SQL> alter system set nls_length_semantics=char;
Restart the database.

From now on Oracle, not we, will worry about the actual physical space of the column. We just specify (in create or alter table) the number of characters (as we always did in the single byte world). As long as the column width is sufficient to store the specified number of characters (regardless of their individual byte sizes) the load will succeed.

Show posts:
 

Features

Quick Edit a Wiki Page

Menu

Powered by Tikiwiki Powered by PHP Powered by Smarty Powered by ADOdb Made with CSS Powered by RDF
RSS feed Wiki RSS feed Blogs