Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

EXP-00041 after changing database character set.

Posted on 2001-08-02
10
Medium Priority
?
1,811 Views
Last Modified: 2007-11-27
How can I get a sucessful direct export?  How do I change the user's character set to make this work?

Command run on unix server connecting to $ORACLE_SID environment variable.  (all environment variables set including ORACLE_NLS=/u01/app/oracle/product/8.1.6/ocommon/nls/admin/data
ORA_NLS32=/u01/app/oracle/product/8.1.6/ocommon/nls/admin/data)

exp file=myfile.dat log=myfile.log userid=batch/password full=y buffer=819200 indexes=y rows=n constraints=y compress=n direct=y        

EXP-00041: Export done in server's WE8ISO8859P1, different from user's character set US7ASCII

EXP-00000: Export terminated unsuccessfully
0
Comment
Question by:joelpatt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 3

Accepted Solution

by:
ramkb earned 200 total points
ID: 6346545

jeolpatt,

Check for NLS_LANG.  This should be the same as DB Character set while doing export.  In your case for eg.
AMERICAN_AMERICA.WE8ISO8859P1.

Hope this helps!
- Ramesh
0
 
LVL 3

Expert Comment

by:Wadhwa
ID: 6347043
Ypur database is of US7ASCII so set NLS_LANG to that

If you are using  Ksh , update .profie  as

NLS_LANG=AMERICAN_AMERICA.US7ASCII;export NLS_LANG

for csh update .login as

setenv NLS_LANG AMERICAN_AMERIC.US7ASCII

relogin and start the export now

Hope this solve the problem

Regards
0
 
LVL 1

Expert Comment

by:selvamsm
ID: 6348402
Hi,
   In u'r question u had given the export file as myfile1.dat and it want to be myfile1.dmp.Just for correction.

thanks
selva
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 3

Expert Comment

by:ramkb
ID: 6349210

To clarify things (no offense intended), your Database characterset i suppose is WE8ISO8859P1 and not US7ASCII.

As this is not the point of discussion here, i am just adding this as a comment to the earlier posts.

This is very apparent from the error message from Oracle.
EXP-00041: Export done in server's WE8ISO8859P1, different from user's character set US7ASCII

You can verify this by logging into the database and querying as follows:
select * from v$nls_parameters
where parameter like '%CHARACTERSET'
/
This will give you both your Database characterset and National Characterset.
For the purposes of your Export with Direct=y, you need to set the NLS_LANG environment variable in the client side where you are running to the same as DB Character set.

Note that this restriction is only for Direct Exports.  You will still be able to do a regular export with NLS_LANG set to US7ASCII.

Your export file also can have any name or extension doesn't have to be dmp extension.

Hope this helps
- Ramesh
0
 
LVL 1

Author Comment

by:joelpatt
ID: 6355508
Thanks ramkb, but...
I'm not getting it guys.

exp file=myfile.dmp log=myfile.log userid=batch/password full=y buffer=819200 indexes=y rows=n constraints=y
compress=n direct=y        

EXP-00041: Export done in server's WE8ISO8859P1, different from user's character set US7ASCII
EXP-00000: Export terminated unsuccessfully

@abrdev:/u01/app/oracle/joelp> echo $NLS_LANG
AMERICAN_AMERICA.WE8ISO8859P1                    

select * from v$nls_parameters
  2  where parameter like '%CHARACTERSET';

PARAMETER                   VALUE
--------------------------- ---------------
NLS_CHARACTERSET            WE8ISO8859P1
NLS_NCHAR_CHARACTERSET      WE8ISO8859P1

0
 
LVL 3

Expert Comment

by:Wadhwa
ID: 6356104
Try to run export without direct=Y , hopefully this will solve your problem

Regards
Sameer
0
 
LVL 1

Author Comment

by:joelpatt
ID: 6356504
exp file=myfile.dmp log=myfile.log userid=batch/bhlod3 owner=JOELP buffer=819200 indexes=y rows=y constraints=y direct=n compress=n  

Yes Wadhwa, that works.  However, I am not confident that it solves my problem.  I still get exp-00041 when using direct=y, and we use direct=y for speed.

Is what you are saying that with this character set, that direct exports are not possible (safely)?

Because, I still would like to see an export without errors, (and and import), unless direct=y is not allowed.
0
 
LVL 3

Expert Comment

by:Wadhwa
ID: 6356523
You can test with direct =Y option if you set
NLS_LANG=AMERICAN_AMERICA.US7ASCII;export NLS_LANG

if it  still gives you error , only option is not to use direct=Y


0
 
LVL 1

Author Comment

by:joelpatt
ID: 6356588
I found the problem, silly me.
I had been typing NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
which only set it for my current telnet session.

When I typed:
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1, direct=y worked.

Thanks for all your help.  I'll probably have more questions later.

I award the points to Ramesh for answering first, and also for clarifying other points.  

Wadhwa answered second and mentioned the 'export' part of setting the environment variable, and followed up to try and get me going, but he exported the wrong characterset, (which by the way didn't confuse me).  

I appreciate all your help but I have found that I can only award points to one person without a second fake question.   If I wasn't so 'into' setting my NLS_LANG variable for 'my' session and then runing exp, I might have gotten it right away.  But it's the little things that count sometimes.  (It's the other session silly).

:)
0
 
LVL 3

Expert Comment

by:ramkb
ID: 6357156

Hi,

Sorry, i couldn't attend this earlier today to resolve your issues.  But i'm glad that you resolved this issue.

Cheers,
Ramesh
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question