Solved

Where did SQL Server get the hostname connected?

Posted on 2006-11-26
5
1,042 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
best counters for cpu high usage 3 33
Need some help to cast ntext to nvarchar SQL 2000 7 34
SQL Error - Query 6 26
SQL Server 2015 Restore - doing it right 2 15
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

831 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