Re: MS Oracle Data Provider BUG: Data corrupt after 16 rows with O
From: Angel Saenz-Badillos[MS] (angelsa_at_online.microsoft.com)
Date: 07/20/04
- Next message: jlapenta_at_entelsys.com: "Maintenance routines"
- Previous message: JustinS: "ApplicationBlocks Data - Ever Close Connection?"
- In reply to: philipp: "Re: MS Oracle Data Provider BUG: Data corrupt after 16 rows with O"
- Next in thread: philipp: "Re: MS Oracle Data Provider BUG: Data corrupt after 16 rows with O"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Jul 2004 12:51:38 -0700
philipp,
I was not able to get to the bottom of the issue in the previous thread
since I never heard back from him, here was my suggestion to him that shows
how using MSDAORA to insert unicode data into utf8 results in garbage being
inserted (even though it looks like it works) and how to verify it.
Could you use this to check the data in your database? It is very likely
that this is not your problem, but it is easy to verify.
Thanks,
Angel
To verify this you can try the following:
Insert into EMP (Empno, Ename) values (1000, 'аий')
Once you have done this with both the Oracle managed provider and either
sqlplus or msdaora you can get the real values stored in the database like
this:
select dump(ename, 1016) from emp;
DUMP(ENAME,1016)
----------------------------------------------------------------------------
---- Typ=96 Len=10 CharacterSet=UTF8: e0,e8,e9,20,20,20,20,20,20,20 //invalid utf-8 value inserted with msdaora Typ=96 Len=10 CharacterSet=UTF8: c3,a0,c3,a8,c3,a9,20,20,20,20 //аий inserted with Oracle managed provider. -- Angel Saenz-Badillos [MS] Managed Providers This posting is provided "AS IS", with no warranties, and confers no rights.Please do not send email directly to this alias. This alias is for newsgroup purposes only. I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/ "philipp" <philipp@discussions.microsoft.com> wrote in message news:060ADEEA-8A30-4929-AAAE-3DB8FAD3AB6A@microsoft.com... > Hello Frans , hello Angel, > > thank you for all your replies. It may help you to know how the data got into the database. I tried several ways to fill in the data into the table: > > 1. Initial data were a dump from a former 8i UTF8 database. They were imported into the 9i database without any errors (i tried 8i Client as well as 9i client). > > 2. Second way i tried is the following: I made TOAD to generate an sql script from the data with a lot of insert statements. Via TOAD (8i Client as well as 9i Client, tried both on different machines) i loaded the data into the table by the sql script. Before, I tried truncating the table as well as dropping and recreating the table. > > To me, it still seems to be an ODP / MSDPO issue OR an Oracle Client (9.2.0.1.) issue. I cannot imagine how simple ascii-sql-scripts could lead to corrupt data encodings or whatsoever. Also I cannot imagine that the database itself (9.2.0.4 on W2003Server) makes such simple errors in the Online-Converting. Although, this may be a hint, the problem disappears when I tell the client (via registry) to use WE8MSWIN1252 instead of UTF8. > > Another hint may be the following: We had exactly the same problem 1,5 years ago when we were using ODP and 8i Client / 8i Database. The second prefetch of rows lost one or some bytes and data were corrupt. A former team member informed me that the problem disappeared when they switched from ODP (at that time) to MS Data Provider. > > Any other ideas ? > > Angel, you had a similar thread in another group 0,5 years ago with a developer from poland. Could you help him at that time? How? > > Thanks a lot in advance, > > Philipp. > > > "Angel Saenz-Badillos[MS]" wrote: > > > I was thinking more along the lines of invalid UTF 8 data having been > > inserted into the Oracle database. This is surprisingly easy to do and hard > > to catch. By default some providers and sqlplus are not safe to use with > > Unicode into a UTF8 database, when you insert Unicode data it inserts > > "garbage". This is hard to catch because reading back the "garbage" data > > with the same provider that you used to insert it will return the data you > > where expecting. True Unicode providers like odp.net and the oracle managed > > provider will instead return the "garbage". The best way to verify this is > > to do a "select dump(<row>, 1016) from <yourtable>" and use a utf8 > > converter to verify that the data in the database is correct. > > > > -- > > Angel Saenz-Badillos [MS] Managed Providers > > This posting is provided "AS IS", with no warranties, and confers no > > rights.Please do not send email directly to this alias. > > This alias is for newsgroup purposes only. > > I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/ > > > > > > > > > > "Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xs4all.nl> wrote in message > > news:xn0dkyszusv731000@msnews.microsoft.com... > > > Angel Saenz-Badillos[MS] wrote: > > > > > > > It is really strange that both ODP.NET and the Oracle Client managed > > > > provider are running into this question, especially since your database > > is > > > > using UTF8. How did you insert the data? Can you do a select dump to get > > the > > > > actual value inserted in the database and verify that the data was > > inserted > > > > correctly? > > > > > > ... perhaps it's something with the oracle client (thus not the provider, > > > but the actual client software the provider talks to) settings. > > > > > > FB > > > > > >
- Next message: jlapenta_at_entelsys.com: "Maintenance routines"
- Previous message: JustinS: "ApplicationBlocks Data - Ever Close Connection?"
- In reply to: philipp: "Re: MS Oracle Data Provider BUG: Data corrupt after 16 rows with O"
- Next in thread: philipp: "Re: MS Oracle Data Provider BUG: Data corrupt after 16 rows with O"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|