Accented characters are shown with question.

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

Hello everyone,

I did a data load through the SQL * loader, from one schema to another (on the same bank), in the source schema the accented characters are shown correctly, but in the schema Destination The accented characters are shown with question marks instead of accents.

Does anyone know how to tell me why this happens ???

Att,
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Hi Warrence!

You can deal with the NLS (language) setting in the current session you are using to run SQL * Loader.

Some points for you to reflect:

- Are you running Sqlloader on the database server or on your local machine?
- SQLLoader needs a text file with the data. I understand that somehow you generated the source schema data in a text file. Did you get to open the generated TXT file with the "normal schema" data?
- The accent of words in the text file are OK?
- Where the unload operations and the loader are exactly the same? That is, do you run everything on the same machine?

I suggest the following action plan:
a) Connect to the machine where you are running SQL * Loader;
b) Open a SQL * Plus session (it has to be SQL * plus) with the bank user you are using in SQL * Loader;
c) Run the

Select all

SELECT * FROM NLS_SESSION_PARAMETERS;
command

Analyze the result of the above command. If you indicate that NLS_Language is different from Brazilian (eg: American English), this may be the reason for your accented characters not to be recognized.

You need to configure the database session so that it always works with the Portuguese language. You could - for example - Create a logon trigger for the destination schema, which would execute a

Select all

ALTER SESSION SET NLS_LANGUAGE='BRAZILIAN PORTUGUESE' 
This would ensure that the client independent where you run the SQLLoader, it always will adopt this language in the session that is opened.

I do not know if I could clarify your doubt. Please feel free to post other questions if this is not the case.

Hugs,

Sergio Coutinho
marlonsc
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 10
Joined: Tue, 28 Aug 2012 4:33 pm
Location: São Paulo
Contact:

Use NLS_LANG environment variables to set up correctly as it must be entering as ASCII (7-bit), use Export for Linux and SET for Windows.

If the input data is encoded in Windows:

Select all

export/set NLS_LANG='AMERICAN_AMERICA.WE8MSWIN1252'
in ISO-8859-P1 (UNIX):

Select all

export/set NLS_LANG='AMERICAN_AMERICA.WE8ISO8859P1' 
in UTF-8:

Select all

export/set NLS_LANG='AMERICAN_AMERICA.AL32UTF8'

SDS,

Marlon Costa http://www.marlonscdba.com
User avatar
fbifabio
Moderador
Moderador
Posts: 199
Joined: Tue, 22 Feb 2011 1:51 pm
Location: São Paulo - SP
Contact:
Fábio Prado
www.fabioprado.net

You can also specify the Character Set within the SQL Loader control file. See example in the article below:
http://www.fabioprado.net/2010/10/carga ... o-sql.html
[] S
Fábio Prado
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest