Doporučil bych vám stáhnout binární soubory serveru SQL z oken a používat PDO.
try {
//In some occasions you only need to define IP/Hostname and you can forgo the \SQLEXPRESS part
$db = new PDO( "sqlsrv:Server=HOSTNAME\SQLEXPRESS;Database=DATABASENAME","USERNAME","PASSWORD");
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
// set this to your primary database
$db->query("USE DATABASENAME");
}
catch( PDOException $e ) {
die( "Error connecting to SQL Server".$e );
}