Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I logged on as administrator and created a trusted connection for a software that connects to my sqlserver. Then I logged on as a regular user and checked on the db server the users connected. Surprise: the user logged on was the administrator (the one that configured the connection) and not the current log-on user. Is it a "trusted connection" feature? I suspect that this behavior is introduced by my software. thanks in advance Agostino

share|improve this question

2 Answers 2

I would check the application initiating the connection has not got a hard coded database username/password that it is using to connect

share|improve this answer

Whether the connection is to be a secure connection or not. Recognized values are 'true', 'false', and 'sspi', which is equivalent to 'true'.

Reference

Basically, you are telling the application to impersonate the current logged on user's identity when connecting to SQL Server, instead of using a specific identity (username/password) in the connection string

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

If you need to pass a specific username/password then use

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;

Now, to test for problems, try

  1. Change the server name in the connection string and open the app. If the app runs then, as @beakersoft said, perhaps the app is using a hardcoded connection string.
  2. Try a specific connection and use "sa" as a test and see if that works. Then try another user.

Note: The username/password (or TRUSTED USER) must have the correct permissions on SQL Server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.