Re: Characters losts during Import (8.1.6) -> (9.2.0.6)



Sybrand Bakker wrote:

You are spreading fairy tales.

#
# loads the Oracle environment for a 9.2.0.5.0 US7ASCII database
#

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9ir2
export ORACLE_SID=bol1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib

#
# sets the NLS_LANG environment value to the same value as the database
# charset
#

$ export NLS_LANG=american_america.US7ASCII

#
# inserts a 8-bit character into a 7-bit database
#

$ sqlplus scott/tiger

SQL*Plus: Release 9.2.0.5.0 - Production on Thu Jul 6 09:29:32 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Release 9.2.0.5.0 - Production
JServer Release 9.2.0.5.0 - Production

SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

VALUE
----------------------------------------
US7ASCII

SQL> create table z ( z varchar2(4000) ) ;

Table created.

SQL> insert into z values ('città');

1 row created.

#
# dumps the 8-bit character into a text file
#

SQL> spool z.txt

SQL> select z from z ;

Z
--------------------------------------------------------------------------------
città

SQL> spool off
SQL> exit

#
# shows that the text file is an ISO-8859 file and contains the correct
# character
#

$ file z.txt
z.txt: ISO-8859 text
$ cat z.txt
città

#
# loads the Oracle environment for a second database, 10.1.0.4.0 - UTF8
#

export ORACLE_HOME=$ORACLE_BASE/product/10gr1
export ORACLE_SID=bol3
export TNS_ADMIN=$ORACLE_HOME/network/admin
unset ORA_NLS33
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib

#
# sets the NLS_LANG environment value according to the text file charset
#

$ export NLS_LANG=american_america.WE8ISO8859P1

#
# creates a z.ctl file
#

load data
infile "z.txt"
append
into table z
(
z position (1:80)
)

#
# loads z.txt into UTF8 database
#

$ sqlldr scott/tiger z.ctl

SQL*Loader: Release 10.1.0.4.0 - Production on Thu Jul 6 09:27:10 2006

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Commit point reached - logical record count 1

#
# shows the 8-bit character was correctly loaded
#

$ sqlplus scott/tiger

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Jul 6 09:28:13 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Release 10.1.0.4.0 - Production

SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

VALUE
--------------------------------------------------------------------------------
UTF8

SQL> select z from z ;

Z
--------------------------------------------------------------------------------
città



--
Cris Carampa (spamto:cris119@xxxxxxxxxxxxx)

blind faith in your leaders or
in anything will get you killed


.



Relevant Pages

  • ORA-01092: ORACLE instance terminated. Disconnection forced
    ... I know that Oracle recommends AUTO, but I just want to test ... SQL> CREATE TABLESPACE "RBS01" ... Database mounted. ... SQL> CREATE ROLLBACK SEGMENT rollback1 TABLESPACE rbs01 ...
    (comp.databases.oracle.server)
  • ORACLE DBA -- Western Suburbs of Chicago
    ... OPERATIONAL ORACLE DBA ... DBA will work in the Oracle environment and help manage a complex ... with many constituencies to develop database solutions to business ... with a minimum of 3 years' of Oracle DBA experience. ...
    (comp.lang.python)
  • Re: Anleitung für Oracle Upgrdae?
    ... To upgrade Oracle databases from a previous release directly to Oracle9i ... For more information about upgrading a database, ... For RAC installations, ensure that there is at least 50 MB of free space ... SQL> SHOW PARAMETER PFILE; ...
    (de.comp.datenbanken.misc)
  • Re: OOP/OOD Philosophy
    ... > Because if you don't Oracle will print something you don't want to see. ... The database should not print anything at all. ... > Great but this discussion was about Standand SQL. ... Transactions and locking work together. ...
    (comp.object)
  • Re: Selecting from dynamic performance views in PL/SQL
    ... Andreas Sheriff wrote: ... > SQL> DECLARE ... see if the database was restarted and store the new startup ... > Oracle 10g Certified Professional ...
    (comp.databases.oracle.server)