We have an application (written in Delphi 5) that works against a SQL Server 7.0 database. I have noticed that when the application is running on a client machine (with a number of forms open) that I am seeing what I interpret to be multiple connections from the same machine to the database ‘DATABASE1’ that contains the data for the application. These connections come from the same network address – as viewed through SQL Enterprise Manager – Management – Current Activity – Process Info. This has led me to believe that we have multiple connections being opened through the application. There should only be one TDatabase component in the Delphi application through which all database access is done – it is my belief that this may not be the case. We need to establish first if we are making multiple connections then can look at the code to determine the issues.
When running other applications I have developed I only see one open connection.
Is there a way I can monitor when a database is connected to from an external application ?
Does one of the system tables in the ‘master’ database store the currently open connections and in which case can I set a trigger against it to insert an entry into a new table that we can later review to determine as and when connections are being made (and from which network address) ?
How wise is it setting triggers against tables in the ‘master’ database ? Are they best left untouched and only used for data retrieval ?
Thanks in advance for any pointers with this.
Regards,
Steve
When running other applications I have developed I only see one open connection.
Is there a way I can monitor when a database is connected to from an external application ?
Does one of the system tables in the ‘master’ database store the currently open connections and in which case can I set a trigger against it to insert an entry into a new table that we can later review to determine as and when connections are being made (and from which network address) ?
How wise is it setting triggers against tables in the ‘master’ database ? Are they best left untouched and only used for data retrieval ?
Thanks in advance for any pointers with this.
Regards,
Steve