Query logging?

Query logging?

Postby Pawel Tarnik » Wed 17 Sep 2008 08:06


I'm currently working on a project with OraDirect.NET and Entity Framework.
The problem that I have is that I can't see how exactly looks PL-SQL code that goes to the DB. It's very painful, especially when there is some exception during execution of this SQL on DB.

My question is:
Is there a way in OraDirect.NET to log queries that go to the DB, so that they can be viewed later?
Pawel Tarnik
Posts: 1
Joined: Wed 17 Sep 2008 06:42

Postby huanghexd » Wed 17 Sep 2008 17:51

Recently I was wondering the same question and it took me a while to figure it out. Man, we need better document :-( Here is one way to do it:

1) refer to the following 2 assembly:
(which can be found at C:\Program Files\Devart\OraDirect.NET2\ if you installed the drivers in the default location).

2) create a monitoring objecct before you create the object context object:

CoreLab.Oracle.OracleMonitor oracleMonitor1 = new CoreLab.Oracle.OracleMonitor();

oracleMonitor1.IsActive = true;

3) Run the DBMonitor before you run your program.

That's it. You will catch all sql texts sent to the Oracle database.
Posts: 8
Joined: Tue 09 Sep 2008 19:06

Return to dotConnect for Oracle