You either need:
- Use the built-in security in the connection string and create trust between the domain of your resource (where the SQL server is) and the domain of your account (where the account is located). Or...
- Create an account on SQL Server and use it in your connection string as username and password.
You make an invalid mix by adding domain credentials to user / pass and there is not even a trust relationship.
EDIT:
The comments indicate the need to synchronize your SQL account with AD loans. It is not necessary. A sql account is simply a username and password for SQL that refers to the SQL server and has nothing to do with domain loans. If you use an SQL account, then they become the configuration settings of your application, which are used to build the correct connection and are sent via cable. The SQL server authenticates these creds locally without the involvement of AD.
Itβs also interesting if you are creating a two-tier client (direct access to sql directly) or 3-tier (clients get access to a mid-level application server that accesses sql). If this is the last, your application authenticates and authorizes users, and after that it uses the configuration setting with the specific sql user / password in it to access sql. If this is the first one and you are using sql accounts, you need one client and that is the problem.
bryanmac
source share