1

When I try to connect to a SQL Server from my local machine I get the following error:

Cannot connect to Computer1\Instance1.
The target principal name is incorrect.
Cannot generate SSPI context.
(Microsoft SQL Server, Error: 0)

When I tried to connect to the same instance through RDP, it throws the following error:

TITLE: Microsoft SQL Server Management Studio
Error connecting to 'Computer1\Instance1'.
Attempted to divide by zero. (mscorlib)

At the same time it is connecting successfully through CMD. It was working fine, until last night. but now I am unable to connect to it.

1

2 Answers 2

1

This error occurred because the TCP port was wrongly configured for the instance.

Initially, I checked named pipes and shared memory; everything was perfect. Then I discovered that the TCP/IP protocol port was mismatched, by checking the port configuration in the IP Address tab.

I enabled port 1433 for the server's IP address and pressed OK. Now it works.

1

I have had this happen when it loses a trust relationship with the domain. One of my solutions is to open up a command window and type in ipconfig /registerdns, wait 15 minutes and try again.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.