tags:

views:

20

answers:

1

I'm getting message login failed user not associated with a trusted Sql Server Connection

It's a Sql Server 2005 legacy system with linked servers. Whoever set it up left sa password blank (I will be changing.)

How do make a trusted Sql Server connection ?

+1  A: 

A "trusted SQL Server connection" error usually means that you're attempting to authenticate using Windows Integrated security and the currently logged on Windows user has not been defined either directly or through group membership to have access to the sql server database being requested.

If the sa password is indeed blank you can login using sql server security as sa + [blank] and associate your Windows account with the appropriate server permissions (and change that sa pwd just after you verify your new account works ok...)

From code a Windows Integrated connection string looks like this:

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

a SQL Server user id/pwd connection string looks like this:

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

(for more varieties check out connectionstrings.com)

Good luck!

Tahbaza