Windows Authentication Connection String with SQL Server 2008 R2 ???
Hi all,
I am trying to figure out how to create my connection string so that I can use current logged on account for authentication with my remote SQL server.
Currently I can connect to my SQL server remotely using TCP protocol.
My SQL server authenthication's connection string is:
Data Source=P200-DEV-PCSIM\MySQLServer;Initial Catalog=Machine_MA;Persist Security Info=True;User ID=sa1;Password=sa1;Connect Timeout=0
and my connection string for Windows Authentication is:
Data Source=P200-DEV-PCSIM\MySQLServer;Initial Catalog=Machine_MA;Integrated Security=True; Connect Timeout=0; Trusted_Connection=Yes
but it does not work. it always returns an error message
as shown below:
Login failed for user 'P200-DEV-PCSIM\Guest'
Why does not it use my current logged on account but Guest account?
Thanks for any help
2 answers
Hi Linning, have you got a solution for this? I'm struggling with the same thing... Thanks. :)
Hi I am Appu.
Use Instance name in the Connection String.
The below Connection string may be helpful to u.