How to log SQL-code run against MDB?

Posted on 2004-11-25
Last Modified: 2006-11-17
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?

Question by:broesi
    LVL 54

    Accepted Solution

    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 ?

    LVL 5

    Author Comment

    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.

    LVL 54

    Expert Comment

    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.

    LVL 26

    Assisted Solution

    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
    LVL 5

    Author Comment

    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...


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now