views:

631

answers:

3

I am using VS 2008 and trying to step into a stored procedure on a SQL Server 2005 database. I bring up Server Explorer, double-click on the procedure. It comes up in the text window. I set a break point in it, right click and select "Step into stored procedure". It comes back with "canceled by user". MSVSCOM.exe is running on the SQL Server host and I can connect to remote processes on SQL Server host. Can you tell me what I am doing wrong?

A: 

I guess you have two different version of remote monitor running on each of these machines.

"This error commonly shows when mismatching versions of msvsmon.exe (Remote Debugging Monitor) is used. They have to be of the same version in order to do remote CLR debugging. The locations: 2008 -> C:\Program Files\Microsoft Visual Studio 9\Common7\IDE\Remote Debugger\x86\msvsmon.exe, version 9.0.2 2005 -> C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86\msvsmon.exe, version 8.0.5"

This is a nice article on setting up remote debugging that should resolve your issue. Please post back if you cannot resolve it

http://msdn.microsoft.com/en-us/library/bt727f1t.aspx

CodeToGlory
The msvsmon build version on the SQL Server host is 9.0.30729.141 which is the same as the IDE. Can you confirmed you've successfully debugged a SQL Server 2005 instance from Visual Studio 2008? Thanks.
javacavaj
Yes. Also make sure both the machines are on the same domain.
CodeToGlory
I'm actually in a work group environment, but both are in the same work group. Also, tried installing msvsmon as a service versus an application. Still no dice. Any additional suggestions for debugging this issue? Thanks.
javacavaj
A: 

Finally resolved this issue by running Visual Studio, the Server Explorer connection and the Remote Debugging Service all with the same credentials.

javacavaj
this actually did not resolve the issue.
javacavaj
A: 

I was able to resolve this issue by setting the "Log on as" account for SQL Server (MSSQLSERVER) to the server's Administrator account. For reference, my complete setup is as follows:

  1. Client: Windows XP with VS Studio 2008 (9.0.30729.1), Server: Windows Server 2003 with SQL Server 2005 (9.0.4035)

  2. Both computers in the same workgroup

  3. Administrator account on both machines enabled and set to same password.

  4. MSSQLSERVER and MSVCMON (running as a Service) run in the context of the Administrator account.

  5. Visual Studio 2008 run in the context of my account (member of Administrators group) on the client machine. The same account was created on the server (member of Administrators group) and the password is the same on both.

javacavaj