Sunday, January 3, 2016

Why can't I log into SQL Server using Windows Integrated Security?

I'm trying to write a small app that will log into SQL Server to perform some admin functions. When I connect to SQL Server using the following connection string, I can log in fine:




Data Source=Localhost\SqlExpress;Initial Catalog=PeteDb;User Id=sa;Password=test;


However when I want to use integrated:



Data Source=Localhost\SqlExpress;Integrated Security=True;MultipleActiveResultSets=True"




A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified)




How can this be solved? I am in the list of logins.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...