Detect SQL Server Availability
This C# function helps you check if SQL Server is running fine on a particular server and port. Useful to use on app startup, or for troubleshooting firewall problems after a Windows SP2 installation.
using System.Net; using System.Net.Sockets;public bool CheckSQLServer(string SQLHost, int SQLPort) { try { IPHostEntry IPHost = new IPHostEntry(); IPHost = Dns.Resolve(SQLHost);IPAddress IPAddr = IPHost.AddressList[0];TcpClient TcpCli = new TcpClient(); TcpCli.Connect(IPAddr, SQLPort); TcpCli.Close();return true; } catch { return false; } }


Pray that there isn’t a firewall and that you know the target SQL server’s port.
install SP4 for SQL Server 2000
Firewall issue will be solved, it is running on port 1433
ok this is good but , first Dan is right about firewalls and second what if the network admin is not stupid and changed the port of mssql during the instalation? any way there are no other solutions for it , so if you are in a Enterprice group have a couple of beers with your network admin and use social engineering for that