The connection to the database is very fragile, so I try to test the connection before make a link to it. I found pg_connect
and mysql_ping
and how-do-i-ping-the-mysql-db-and-reconnect-using-pdo, but none has anything to do with MSSQL
or function that I can use.
Is there a way I can test the database before I connect to it?