How do I trace SQL generated from Entity Framework?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
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


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,

Site Admin
Posts: 8248
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: , section "Using OraDirect .NET", part "Using DBMonitor".

Post Reply