Cannot generate SSPI context error, but not if SPN server Name is specified

1.5k views Asked by At

I'm facing this error when connecting to a remote SQL Server via VPN.

The issue here is that I'm do able to connect only if the SPN Name is specified on the string connection, ie: "Server SPN = MSSQLSvc\MyServer.foo.bar"

What's difference between specify the SPN name or not?

1

There are 1 answers

0
dbamex On

Have you checked your SQL Server is really listening on the IPs that you have registered with setspn -l? I remember a case some time ago where the registered name was another and the connection was made with a virtual servername.

If you have tried all of that and is still not working maybe you should go with SQL Server authentication (if possible) that should avoid this error.