This page is used to check for database connectivity between the webserver and the database server. We use it in our monitoring package to make sure the database is accessible from the webserver.
It accepts two parameters via the query string. These are the Server and database name that you want to attempt to connect to. It then opens an ADO connection to the specified database and queries the sysobjects table of that database. It doesn't return anything from the table, it just uses it in the query as follows,
SELECT 'DATABASE CONNECTION OK' as chkMsg FROM dbo.sysobjects
If the connection is successful, this will return a page with,
DBServer - DBase
DATABASE CONNECTION OK
To use, extract the files in the zip to a directory on your webserver.
Alter database connection string in global.asa to have the appropriate username and password to connect to your SQL Server.
Create a virtual directory on IIS pointing to the directory containing the extracted files.
Open web browser and enter URL with appropriate parameters as per example above.
As always, any questions or comments are welcome.