Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

export with data length semantics

548625Dec 16 2008 — edited Dec 16 2008
Hello,

I've following problem.

I have a table abcd which contains 2 VARCHAR2 columns with different data length semantics (one with BYTE, one with CHAR). Charset is Single Byte; let's say WE8MSWIN1252, so data length semantics should not be a problem. should not. details later.
So this would be:
create table abcd (a_char VARCHAR2(2 CHAR), a_byte VARCHAR2(2 BYTE));
after that I export the table via exp. I'm not setting NLS_LENGTH_SEMANTICS environment variable, so BYTE is used.
In the dump file the data length semantics for the byte col is omitted, as I exported it with BYTE:
create table abcd (a_char VARCHAR2(2 CHAR), a_byte VARCHAR2(2));
after that, I "accidently" import it with data length semantics set to CHAR, and the table looks like this now
abcd
--------------------
a_char VARCHAR2(2 CHAR)
a_byte VARCHAR2(2 CHAR)
Same happens vice versa when using CHAR for export and BYTE for import...

In single byte charsets this might not be so much of a problem, as one CHAR is equal to one BYTE, but...
If I compile plsql against the original table, and run against the outcoming table after export, I get an ORA-4062, and I have to recompile...
Would not be a problem if the plsql I compile would be on the database...Big problem is that the ORA-4062 occurs in forms, where it's difficult for me to recompile (I would have to transfer all the sources to customer and compile there).

Is there any possibility to export data length semantics regardless which environment variable is set?

database version would be 9.2.0.6; but if there exists a solution in higher versions I would also be happy to hear them...

many thanks,

regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2009
Added on Dec 16 2008
3 comments
1,015 views