• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

How to log SQL-code run against MDB?

Hi Experts,

is it possible to log all SQL-statements executed against a certain MDB-file? Maybe something like the SQL Profiler for MS SQL Server?

broesi
0
broesi
Asked:
broesi
  • 2
  • 2
2 Solutions
 
nico5038Commented:
Sorry, but not to my knowledge.
The only way would be to run all queries from code and record that in a loggong table.
The queries are executed by the Je engine and this has no logging or view possibility.

Why do you need this ?

Nic;o)
0
 
broesiAuthor Commented:
It is the same old story: a programmer did a little tool that moves data around between several MDB-files. Now he left and all we have is this little executable (presumably created with Visual Basic). Of course the database structure changed and we have to re-create the little tool from scratch since we do not have the source code.

To make this task a little easier, I would like to see the SQL that is sent to the MDB's.

broesi
0
 
nico5038Commented:
Them I'm afraid when he's dynamically creating the queries in code and that it will be impossible to get them.

Sorry for the bad news...

On the oher hand it's often faster to start from scratch to create an application as the time to find out how an old application works is considerable.

Nic;o)
0
 
dannywarehamCommented:
Sounds like you've got a pain on your hands, lad.
I agree with nico that you should start from scratch (then you can comment the code yourself too for future users)
Plus, its always better to try and avoid changing a running system
:-)
0
 
broesiAuthor Commented:
Found out myself:

1. Opened the MDB with Access 2000
2. Used the Upsizing wizard to move the tables to a Microsoft SQL-Server
3. Linked the tables back using their original names

Now I can use SQL Profiler to have a look under the hood...

Might not work with all applications, but for this one it does!

Thanks for your responses, I'll split the points...

broesi
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now