Solved

Where did SQL Server get the hostname connected?

Posted on 2006-11-26
5
1,071 Views
Last Modified: 2008-02-01
Hi experts,

I monitor the activities of my users through the SQL Server 2005 Management Studio - Activity Monitor.
The hostname column in the Activity Monitor used to report correctly the hostname of the client PC.
But I have some client PC that Activity Monitor reported the hostname wrongly -
I clone the PC (using Norton Ghost) and renamed (from say OldHost) the hostname before release for production use -
But Activity Monitor reported the hostname as the "OldHost"!

Where did SQL Server get the hostname connected from?
How can I rectify this problem?

regards
0
Comment
Question by:novknow
5 Comments
 
LVL 21

Expert Comment

by:pinaldave
ID: 18016594
When you change the name of the computer that is running Microsoft SQL Server the new name is recognized during SQL Server startup. You do not have to run Setup again to reset the computer name.

You can connect to SQL Server using the new computer name after you have restarted the server. However, to correct the sysservers system table, you should manually run these procedures:

sp_dropserver <old_name>
go
sp_addserver <new_name>
go
0
 
LVL 16

Accepted Solution

by:
Hillwaaa earned 250 total points
ID: 18016962
Hi novknow,

I think that the hostname is being returned from the client PC's computer name.  For those that you think are incorrect - check that the "Full computer name" (assuming windows XP) is not set to "OldHost".  This can be accessed through Control Panel -> System -> Computer Name (tab).

Cheers,
Hillwaaa
0
 

Author Comment

by:novknow
ID: 18017088
Hi Hillwaaa,

The client PCs are all in a workgroup. I can verify if the "Full computer name" was set correctly.
Assuming it is set correctly, what could be the other possiblity?
I asked this because the standard procedure is to rename the computer hostname and reboot the PC.
Also, if the hostname are the same for these group of PC, I would have received "System Error" from the OS.

regards
0
 
LVL 16

Expert Comment

by:Hillwaaa
ID: 18017116
I'm not sure what else it could be picking up.  If possible, can you connect from one of the "OldHost" client machines using query analyzer, and just run:
"SELECT HOST_NAME()".  This should tell us if it is the hostname that is being brought back incorrectly, or if it's the Activity Monitor displaying something else in the hostname column.
0
 
LVL 9

Expert Comment

by:dduser
ID: 18018044
Checkout name of your server in sysservers tablems-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/bbaf1445-b8a2-4ebf-babe-17d8cf20b037.htm

Regards,

dduser
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need sql in string 2 28
T-SQL to copy a database 37 66
Convert VBA UDF to SQl SERVER UDF 4 48
Linked Server - SP with Param to VIew 7 21
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question