Connecting to SQL Server 2008 Using Domain Login
Posted: Fri Mar 12, 2010 1:36 pm
Hello,
I have been trying to figure out a way to connect to a SQL Server 2008 database using a domain ID instead of a local ID. The database server, web server and my computer are all on separate machines. The below connection string works just fine as administrator is a local ID on sql2008:
$link = mssql_connect('sql2008', 'administrator', 'password');
However, when I want to connect using a domain ID, such as below, I get the error: Login failed for user 'domain\administrator' (severity 14).
$link = mssql_connect('sql2008', 'domain\administrator', 'password');
I am certain that domain\administrator and the related password were entered correctly and we are using mixed mode authentication on the SQL 2008 machine, so it should know to go to the domain controller for domain IDs.
Has anyone figured out a way to hard code a domain ID into a mssql_connect string? If so, what did you do to configure it correctly?
Thanks!
Josh
I have been trying to figure out a way to connect to a SQL Server 2008 database using a domain ID instead of a local ID. The database server, web server and my computer are all on separate machines. The below connection string works just fine as administrator is a local ID on sql2008:
$link = mssql_connect('sql2008', 'administrator', 'password');
However, when I want to connect using a domain ID, such as below, I get the error: Login failed for user 'domain\administrator' (severity 14).
$link = mssql_connect('sql2008', 'domain\administrator', 'password');
I am certain that domain\administrator and the related password were entered correctly and we are using mixed mode authentication on the SQL 2008 machine, so it should know to go to the domain controller for domain IDs.
Has anyone figured out a way to hard code a domain ID into a mssql_connect string? If so, what did you do to configure it correctly?
Thanks!
Josh