What is the best way to check database access from remote machine.
Here is the situation:
SQL Server 2005 (or 2008) is running on
MACHINE1
(Windows 2003 or 2008). There is a database calledENTERPRISEDB
.Another server, called
MACHINE2
(Windows 2003 or 2008). It has ODBC connection toMACHINE1
.
Now, what is the best and simplest SQL query to check if MACHINE2
can connect and access the ENTERPRISEDB
in MACHINE1
?
Thanks.