July 4, 2007 at 3:27 am
On my production SQL Server2000, @@servername is currently NULL. This is causing problems with DTS packages which are failing to recognise their own server!
In my company DNS is used to direct users to the correct SQL server for Disaster recovery purposes. i.e. Actual server name is ServerLive, but end users query ServerX. DNS directs ServerX to ServerLive or to ServerDR during disaster or disaster testing as appropriate.
Therefore my question is; should my @@Servername be set to ServerLive or ServerX??
July 4, 2007 at 3:35 am
Jsut add the sql server entry using the following and then use the @@servername
sp_addserver [ @server = ] 'server'
[ , [ @local = ] 'local' ]
If you still face the problem the other option is to use the serverproperty('Servername') available.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
July 4, 2007 at 4:14 am
Hi,
I have had the same problem ever since I upgraded my SQL2K to SP4.
sp_addserver has no effect at all on this.
Luckily it doesn't seem to affect my DTS packages
Edit: Interestingly, SERVERPROPERTY('servername') returns the correct servername.
See my original post on this site :
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=244107
The last suggestion on there, that it may be due to the server being renamed at some point in the past might be worth checking out.
David
If it ain't broke, don't fix it...
July 4, 2007 at 4:30 am
Thanks for that. The reason I am confused is that my actual servername (which is correctly returned by using SERVERPROPERTY('servername')), differs from the DNS name used for the server.
In my DTS packages, the DTS name is used and error:
ERROR SOURCE: Microsoft OLE DB Provider for SQL Server. Error Describtion: Could not find server '' in sysserveers. Execute sp_addlinkedserver to add the server to sysservers.
Which servernam eshoudl I be adding? The actual server name as shown in SERVERPROPERTY('servername'), or the DNS name for the server???
July 4, 2007 at 5:28 am
You should add the acutal server name that you serverproperty command return using the sp_addserver sql. This should solve your issue.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
July 5, 2007 at 1:59 am
sp_addserver 'msyserver','local' also requires you to stop and re-start the service before it takes effect
MVDBA
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply