I have written a VB6 program that uses ADO to connect to over 60
different SQL Servers in order to collect info about all the db's on
each server to then produce a consolidated report of our enterprise.
I need DBName, Data Space Allocated (MB), Log Space Allocated (MB) and
Data Space Utilized (MB) for each DB on each of the Servers.
I need to collect this from both v6.5 and v7.0 Servers.
I cannot use SQLDMO against two different SQL versions. I tried to use
the Databases Collection, but my program would not work against v6.5
servers, only 7.0.
Instead, I would like to retrieve the required info by running a SELECT
the version of the Server I connect to.
I would need a separate SELECT for v6.5 as well as v7.0.
This program will run weekly in order to spot growth trends and other
My program is running well now against either version of the Servers,
but I am using sp_help to only get the DBNames on the servers. I need
Can anyone provide me the two SELECT statements that will accurately
retrieve for me the info I need from both versions of SQL Server?
Other suggestions would be appreciated, of course.