Article ID: 317241
Article Last Modified on 5/18/2007
APPLIES TO
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio .NET 2003 Professional Edition
- Microsoft Visual Studio .NET 2003 Enterprise Architect
- Microsoft Visual Studio .NET 2003 Enterprise Developer
- Microsoft Visual Studio .NET 2002 Professional Edition
- Microsoft Visual Studio .NET 2002 Enterprise Architect
- Microsoft Visual Studio .NET 2002 Enterprise Developer
- Microsoft SQL Server 2000 Standard Edition
This article was previously published under Q317241
SYMPTOMS
If you rename the host computer for a Microsoft SQL Server 2000 server, you cannot step into a SQL Stored Procedure with the Visual Studio 2005 or Visual Studio .NET environment, and you may receive the following error message:
Note You can still run the stored procedure.
CAUSE
The Debugger cannot find the name of the host computer in the system table entry because the host computer has been renamed. During installation, SQL Server stores the name of the host computer in a system table entry that is used by the debugger. If the host computer is renamed, this table is not updated automatically.
RESOLUTION
Update the name of the SQL Server internal computer:
In Query Analyzer, run the following commands:
sp_dropserver 'OldServerName' go sp_addserver 'NewServerName','local' go
- Stop and restart SQL Server to update the global variable @@servername with the correct server name.
Use Query Analyzer and run the following command to verify the correct server name:
SELECT @@servername
REFERENCES
For more information about how to set up SQL debugging, see the following topic in the Visual Studio .NET online Help documentation:
SettingUpSQLDebugging
http://msdn2.microsoft.com/en-us/library/s4sszxst(vs.71).aspx
For more information about renaming a SQL Server, see "Renaming a Server" in SQL Server Books online. In addition, click the following article number to view the article in the Microsoft Knowledge Base:
303774 BUG: Renaming a Server Topic in Books Online is Incomplete
Keywords: kbvs2005applies kbvs2005swept kbvs2002sp1sweep kbbug kbdebug kbprb KB317241