How do I trace SQL generated from Entity Framework?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
markaw
Posts: 13
Joined: Mon 11 Aug 2008 12:45

How do I trace SQL generated from Entity Framework?

Post by markaw » Wed 24 Sep 2008 14:54

Hi,

Is there a way to trace the SQL Statements generated from Entity Framwork? Especially the failed ones like this:

failed: System.Data.UpdateException : An error occurred while updating the entries. See the InnerException for details.
----> CoreLab.Oracle.OracleException : ORA-06550: Zeile 5, Spalte 448:
PL/SQL: ORA-01747: Ungültige Angabe für benutzer.tabelle.spalte, tabelle.spalte oder spalte
ORA-06550: Zeile 5, Spalte 1:
PL/SQL: SQL Statement ignored

Best regards,
Mak

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 25 Sep 2008 15:01

You can use the Call Stack and Locals windows in Debug mode for tracing the exception.
For this check the Common Language Runtime checkbox (Debug->Exceptions...) and uncheck the Enable Just My Code checkbox (Tools->Options->Debugging).

Alternatively, take advantage of using DBMonitor. Please learn more on how to use it here: http://www.devart.com/dotconnect/oracle/docs/ , section "Using OraDirect .NET", part "Using DBMonitor".

Post Reply