Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 SQL Server Name

Author  Topic 

skaluva
Starting Member

17 Posts

Posted - 2002-08-09 : 17:45:02
Hi Everybody

I installed SQL Server 2000 with all default values on installation. Everything went wery well and started development. I created couple connections and started using them.
I was taking server name from srvName frield in master..sysservers after a while I changed my computer name and I found my connections are no more working because my server name is no more the name from srvName frield in master..sysservers. I wonder where is the server name is stored in SQL server??

Please help me where and how can I find servername in the system??

Thanks in advance,

-- Sree

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-08-09 : 18:19:03
You should use @@SERVERNAME rather than querying system tables directly, however open query analyzer and run

 
use master
go

sp_dropserver 'oldpcname'
go

sp_addserver 'newpcname','local'
go



HTH
Jasper Smith
Go to Top of Page
   

- Advertisement -