0

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

AgostinoX
  • 181
  • 2
  • 13

2 Answers2

0

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

beakersoft
  • 997
  • 15
  • 29
0

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.

Saif Khan
  • 1,935
  • 2
  • 20
  • 25