Sql-server – Cannot authenticate a domain user with SQL Server 2008

active-directorysql serverwindows-server-2008

I'm new to setting up Domains so I might be missing something simple here…

I've installed SQL Server 2008 on a Windows Server 2008 R2 box and I have another WS2008 R2 box acting as the domain controller.

I've joined the SQL server to the domain and it seems to be behaving itself fine. I can ping the DC by name and IP address.

I created a domain user 'SPSQLAdmin' that I want to use for database access with SharePoint but I can't seem to log on to SQL with this user.

SQL complains, saying that the user belongs to an untrusted domain.

I've configured the DC to delegate control for any service to the SQL Server but it doesn't improve the situation.

What should I try next?

Thanks in advance.

Best Answer

This can be accomplished by opening SQL Server Management Studio, connecting to the instance with the SA user or the Windows user that installed SQL, going to Security -> Logins, right click on Logins -> New Login.

Or run this query from a properly credentialed SQL user.

USE [master]
GO

/* Create the user in the SQL instance itself with a simple query. */
CREATE LOGIN [YOURDOMAIN\SPSQLAdmin] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
/* And you may want to give them a decent role.  */
ALTER SERVER ROLE [sysadmin] ADD MEMBER [YOURDOMAIN\SPSQLAdmin]
GO