Showing posts with label sp3aselect. Show all posts
Showing posts with label sp3aselect. Show all posts

Thursday, February 9, 2012

@@servername returns NULL

Hi,
sql server 2000 sp3a
select @.@.servername returns null but
select * from sysservers shows the correct servername. This causes problems
to set up replication.
Any idea how to resolve apart of reinstalling?
Thanks
YanLook up sp_dropserver and sp_addserver system procedures in Books Online.
Have you renamed the server recently? (either the machine or the SQL Server
instance)
ML
http://milambda.blogspot.com/|||Yan,
please try:
Use Master
go
Sp_DropServer 'OldName'
GO
Use Master
go
Sp_Addserver 'NewName', 'local'
GO
Stop and Start SQL Services
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||Thanks, I found the problem when I used sp_addserver I did not add the
second param @.local so the result is that master..sysservers has no row with
a srvrid 0 which should represent the local server.
Thanks.
"ML" <ML@.discussions.microsoft.com> wrote in message
news:CB9D38F6-E2F0-43F3-84C2-CF5DEA8AF8C8@.microsoft.com...
> Look up sp_dropserver and sp_addserver system procedures in Books Online.
> Have you renamed the server recently? (either the machine or the SQL
> Server
> instance)
>
> ML
> --
> http://milambda.blogspot.com/|||Yeah, those darn extra parameters... :)
ML
http://milambda.blogspot.com/