$link = mssql_connect($db_host,$db_user,$db_pass,true);
if ($link) {
@mssql_select_db($db1_name,$link)
} else {
$link = mssql_connect($db_host1,$db_user,$db_pass,true);
@mssql_select_db($db2_name,$link);
}
$res = @mssql_query('Set language Russian');
@mssql_free_result($res);