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
 SQL Server Administration (2000)
 sysserver value and @@servername

Author  Topic 

cbeganesh
Posting Yak Master

105 Posts

Posted - 2008-07-23 : 09:48:36

when i use @@servername it gives a diffrent name than in the sysserver table. How to get the same value as in sysserver table using @@servername
Thanks

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-23 : 09:56:20
According to Bol:

Sysservers: Contains one row for each server that an instance of Microsoft SQL Server 2005 can access as an OLE DB data source.

Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-23 : 22:42:04
>> How to get the same value as in sysserver table using @@servername

Is result of @@servername same as host name or host\instance_name? If not, you can fix it with 'sp_dropserver old_name' and 'sp_addserver new_name, local'. Need restart sql to make the change effect.
Go to Top of Page
   

- Advertisement -