Sql-server – How to trace from the client PC what databases it connects to

crystalreportsodbcpacket-capturesql servertrace

I wonder if there is some way to trace what servers my program using OLEDB tries to connect to.

Problem:

I have a program displaying some reports made in Crystal Reports.
The loading of some reports are really slow when.
My guess is that they have some embedded connection strings which reference a server that does not exist. My guess is that the client tries to use the embedded connections when loading the report.

I would like to know if I can see trace / log these failed connections in any way.

Best Answer

You can run a packet capturing application like wireshark (Linux + Windows) or tcpdump (Linux). If your server is busy, it may not be easy to recognize the relevant/irrelevant connections.

If you know the port number/protocol, you can write filters to see less traffic.