Have you considered using an alternative approach - have a look at these CodeProject articles
Using SqlDependency for data change events[
^]
Query Notification using SqlDependency and SqlCacheDependency[
^]
Also refer to the link in my comment above :
Thread.Sleep is a sign of a poorly designed program. – Peter Ritchie's MVP Blog[
^]
Richard's comment deserves some real consideration - using a Task Scheduler is probably a better approach.
I also question topics like this - just how urgent is it that these updates are notified every 5 minutes? Especially if it is being logged into a text file - realistically is someone going to look at that text file every 5 minutes? Ever?
There is a certain "something" about this question that makes me think it might be homework, but there is definitely something else you need to address first ...
Quote:
And assuming there are 3 columns for every DB...
Columns are features of
Tables, not Databases. You are going to struggle with acquiring the data you want until you get a better understanding of the databases you are going to query.