Saturday, February 11, 2012
@@SERVERNAME sql 2k
Diff server name for same sql box.
Select @.@.SERVERNAME
and select * from sysservers
WHy?
@.@.SERVERNAME returns incorrect name. How do I correct it?
THnksHi
At some point you probably renamed the server at some point, run
sp_dropserver and sp_addserver as shown in:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
John
"mecn" wrote:
> Hi,
> Diff server name for same sql box.
> Select @.@.SERVERNAME
> and select * from sysservers
> WHy?
> @.@.SERVERNAME returns incorrect name. How do I correct it?
> THnks
>
>
@@SERVERNAME sql 2k
Diff server name for same sql box.
Select @.@.SERVERNAME
and select * from sysservers
WHy?
@.@.SERVERNAME returns incorrect name. How do I correct it?
THnksHi
At some point you probably renamed the server at some point, run
sp_dropserver and sp_addserver as shown in:
http://msdn.microsoft.com/library/d...nstall_5r8f.asp
John
"mecn" wrote:
> Hi,
> Diff server name for same sql box.
> Select @.@.SERVERNAME
> and select * from sysservers
> WHy?
> @.@.SERVERNAME returns incorrect name. How do I correct it?
> THnks
>
>
@@serverName returns wrong name
installed. The first is returning the wrong name when I run "@.@.serverName".
The other is returning "null" when I run this query.
Can anyone tell me what the impact on applications is of changing these
names to what they should be?
tia
jjHi
Just rename the SQL Server as per:
http://msdn.microsoft.com/library/d...nstall_5r8f.asp
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Use:
SELECT SERVERPROPERTY('ServerName')
David Portas
SQL Server MVP
--
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Hi,
Stop ur sql services and restart the services u will get the real
error.
from
Doller
@@serverName returns wrong name
installed. The first is returning the wrong name when I run "@.@.serverName".
The other is returning "null" when I run this query.
Can anyone tell me what the impact on applications is of changing these
names to what they should be?
tia
jj
Hi
Just rename the SQL Server as per:
http://msdn.microsoft.com/library/de...stall_5r8f.asp
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>
|||Use:
SELECT SERVERPROPERTY('ServerName')
David Portas
SQL Server MVP
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>
|||Hi,
Stop ur sql services and restart the services u will get the real
error.
from
Doller
@@serverName returns wrong name
installed. The first is returning the wrong name when I run "@.@.serverName".
The other is returning "null" when I run this query.
Can anyone tell me what the impact on applications is of changing these
names to what they should be?
tia
jjHi
Just rename the SQL Server as per:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Use:
SELECT SERVERPROPERTY('ServerName')
--
David Portas
SQL Server MVP
--
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Hi,
Stop ur sql services and restart the services u will get the real
error.
from
Doller
@@SERVERNAME returns NULL value... Can we adjust so that it returns the server name
select @.@.SERVERNAME we are getting a NULL value back. According to BOL ...
the information in returned by @.@.SERVERNAME may be different than the
SERVERNAME property of SERVERPROPERTY function. The SERVERNAME property
automatically reports changes in the network name of the computer. In
contrast, @.@.SERVERNAME does not report such changes. @.@.SERVERNAME reports
changes made to the local server name using the sp_addserver or
sp_dropserver stored procedure
Assuming that my server name is XYZ - I would assume that by executing the
following command we would be OK:
use master
go
sp_addserver 'XYZ', 'local'
go
But when executing this - we get the following message:
Server already exists.
Can someone advise the correct way to do this?
Thanks,
Tom
Hi,
Try this
sp_dropserver 'XYZ'
go
sp_addserver 'XYZ', 'local'
go
After this stop and start the MS SQL Server service. Then login in Query
analyzer and execute SELECT @.@.SERVERNAME
Thanks
Hari
SQL Server MVP
"TJT" <TJT@.nospam.com> wrote in message
news:O9QwWELiFHA.1244@.TK2MSFTNGP14.phx.gbl...
> We are running SQL 2000 in a non-clustered server. For some reason when
> we
> select @.@.SERVERNAME we are getting a NULL value back. According to BOL
> ...
> the information in returned by @.@.SERVERNAME may be different than the
> SERVERNAME property of SERVERPROPERTY function. The SERVERNAME property
> automatically reports changes in the network name of the computer. In
> contrast, @.@.SERVERNAME does not report such changes. @.@.SERVERNAME reports
> changes made to the local server name using the sp_addserver or
> sp_dropserver stored procedure
> Assuming that my server name is XYZ - I would assume that by executing the
> following command we would be OK:
> use master
> go
> sp_addserver 'XYZ', 'local'
> go
> But when executing this - we get the following message:
> Server already exists.
> Can someone advise the correct way to do this?
> Thanks,
> Tom
>
>
>
@@SERVERNAME returns NULL value... Can we adjust so that it returns the server name
select @.@.SERVERNAME we are getting a NULL value back. According to BOL ...
the information in returned by @.@.SERVERNAME may be different than the
SERVERNAME property of SERVERPROPERTY function. The SERVERNAME property
automatically reports changes in the network name of the computer. In
contrast, @.@.SERVERNAME does not report such changes. @.@.SERVERNAME reports
changes made to the local server name using the sp_addserver or
sp_dropserver stored procedure
Assuming that my server name is XYZ - I would assume that by executing the
following command we would be OK:
use master
go
sp_addserver 'XYZ', 'local'
go
But when executing this - we get the following message:
Server already exists.
Can someone advise the correct way to do this?
Thanks,
TomHi,
Try this
sp_dropserver 'XYZ'
go
sp_addserver 'XYZ', 'local'
go
After this stop and start the MS SQL Server service. Then login in Query
analyzer and execute SELECT @.@.SERVERNAME
Thanks
Hari
SQL Server MVP
"TJT" <TJT@.nospam.com> wrote in message
news:O9QwWELiFHA.1244@.TK2MSFTNGP14.phx.gbl...
> We are running SQL 2000 in a non-clustered server. For some reason when
> we
> select @.@.SERVERNAME we are getting a NULL value back. According to BOL
> ...
> the information in returned by @.@.SERVERNAME may be different than the
> SERVERNAME property of SERVERPROPERTY function. The SERVERNAME property
> automatically reports changes in the network name of the computer. In
> contrast, @.@.SERVERNAME does not report such changes. @.@.SERVERNAME reports
> changes made to the local server name using the sp_addserver or
> sp_dropserver stored procedure
> Assuming that my server name is XYZ - I would assume that by executing the
> following command we would be OK:
> use master
> go
> sp_addserver 'XYZ', 'local'
> go
> But when executing this - we get the following message:
> Server already exists.
> Can someone advise the correct way to do this?
> Thanks,
> Tom
>
>
>|||Hi Hari,
I have the same scenario as below, and I have even try to do two times
server restart also, but @.@.servername still returns Null to me, which is
different result from SERVERNAME property of SERVERPROPERTY function. Any
idea what else we can try? Thanks in advance!
Regards,
JC
"Hari Prasad" wrote:
> Hi,
> Try this
>
> sp_dropserver 'XYZ'
> go
> sp_addserver 'XYZ', 'local'
> go
> After this stop and start the MS SQL Server service. Then login in Query
> analyzer and execute SELECT @.@.SERVERNAME
> Thanks
> Hari
> SQL Server MVP
>
> "TJT" <TJT@.nospam.com> wrote in message
> news:O9QwWELiFHA.1244@.TK2MSFTNGP14.phx.gbl...
> > We are running SQL 2000 in a non-clustered server. For some reason when
> > we
> > select @.@.SERVERNAME we are getting a NULL value back. According to BOL
> > ...
> > the information in returned by @.@.SERVERNAME may be different than the
> > SERVERNAME property of SERVERPROPERTY function. The SERVERNAME property
> > automatically reports changes in the network name of the computer. In
> > contrast, @.@.SERVERNAME does not report such changes. @.@.SERVERNAME reports
> > changes made to the local server name using the sp_addserver or
> > sp_dropserver stored procedure
> >
> > Assuming that my server name is XYZ - I would assume that by executing the
> > following command we would be OK:
> >
> > use master
> > go
> >
> > sp_addserver 'XYZ', 'local'
> > go
> >
> > But when executing this - we get the following message:
> > Server already exists.
> >
> > Can someone advise the correct way to do this?
> >
> > Thanks,
> > Tom
> >
> >
> >
> >
> >
> >
>
>
@@SERVERNAME returns NULL value... Can we adjust so that it returns the server name
select @.@.SERVERNAME we are getting a NULL value back. According to BOL ...
the information in returned by @.@.SERVERNAME may be different than the
SERVERNAME property of SERVERPROPERTY function. The SERVERNAME property
automatically reports changes in the network name of the computer. In
contrast, @.@.SERVERNAME does not report such changes. @.@.SERVERNAME reports
changes made to the local server name using the sp_addserver or
sp_dropserver stored procedure
Assuming that my server name is XYZ - I would assume that by executing the
following command we would be OK:
use master
go
sp_addserver 'XYZ', 'local'
go
But when executing this - we get the following message:
Server already exists.
Can someone advise the correct way to do this?
Thanks,
TomHi,
Try this
sp_dropserver 'XYZ'
go
sp_addserver 'XYZ', 'local'
go
After this stop and start the MS SQL Server service. Then login in Query
analyzer and execute SELECT @.@.SERVERNAME
Thanks
Hari
SQL Server MVP
"TJT" <TJT@.nospam.com> wrote in message
news:O9QwWELiFHA.1244@.TK2MSFTNGP14.phx.gbl...
> We are running SQL 2000 in a non-clustered server. For some reason when
> we
> select @.@.SERVERNAME we are getting a NULL value back. According to BOL
> ...
> the information in returned by @.@.SERVERNAME may be different than the
> SERVERNAME property of SERVERPROPERTY function. The SERVERNAME property
> automatically reports changes in the network name of the computer. In
> contrast, @.@.SERVERNAME does not report such changes. @.@.SERVERNAME reports
> changes made to the local server name using the sp_addserver or
> sp_dropserver stored procedure
> Assuming that my server name is XYZ - I would assume that by executing the
> following command we would be OK:
> use master
> go
> sp_addserver 'XYZ', 'local'
> go
> But when executing this - we get the following message:
> Server already exists.
> Can someone advise the correct way to do this?
> Thanks,
> Tom
>
>
>
Thursday, February 9, 2012
@@servername returns NULL value
I have a SQL 2005 clustered server which is returning a Null value for @.@.servername. I find the server entry in sysservers. I have replication configured on this so i am not able to do a Sp_dropserver & sp_addserver as this acts as a publisher. The configured merge repication stopped working because of this issue and I am not able to delete replication as the the delete option uses @.@.servername which returns a null value. So I am struck in a loop.
Any advice is appreciated.
thanks
For a machine to be considered local, srvid = 0 in sysservers. Can you check on this?
Can a simple reboot of the nodes fix the problem? Otherwise how did you get into this state, considering you have replication set up properly already?
|||Hi,
Have you rename the virtual server name or the participating node name?
Peng
@@SERVERNAME returns NULL
SELECT @.@.SERVERNAME
It returns NULL. How, and how can I fix.
Thanks.
Darin
*** Sent via Developersdex http://www.codecomments.com ***
Darin,
use:
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)
@@servername returns NULL
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/
@@servername returns NULL
to use @.@.servername in the statement. I found out the select
@.@.servername returns NULL. I used sp_dropserver to drop any servernames
first, restarted SQL, ran sp_addserver 'servername' to add the
servername, restarted SQL. select @.@.servername still returns NULL...
Any ideas why this may be happening?
Thanks,
TGru
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!tgru (tgru@.devdex.com) writes:
> I am trying to script out the creation of database scripts. I am trying
> to use @.@.servername in the statement. I found out the select
> @.@.servername returns NULL. I used sp_dropserver to drop any servernames
> first, restarted SQL, ran sp_addserver 'servername' to add the
> servername, restarted SQL. select @.@.servername still returns NULL...
> Any ideas why this may be happening?
Did you specify 'local' as the second parameter to sp_addserver?
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland is the man!!
Thanks, I battle syntax on a daily basis...
TGru
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
@@ServerName returns NULL
which server the script is running upon. However, for some unknown reason,
the statement "Select @.@.ServerName" is returning a null value rather than the
name of the server. This has broken ALL of our job scripts. There is a work
around, however, with over 100 jobs that run, we are not too keen about
modifying existing scripts. Any ideas how we can get this fixed?
SQL Server Man Not
On Wed, 6 Oct 2004 14:57:02 -0700, Richard wrote:
>Hi: We use @.@.Servername throughout all our jobs to indicate to the script
>which server the script is running upon. However, for some unknown reason,
>the statement "Select @.@.ServerName" is returning a null value rather than the
>name of the server. This has broken ALL of our job scripts. There is a work
>around, however, with over 100 jobs that run, we are not too keen about
>modifying existing scripts. Any ideas how we can get this fixed?
Hi Richard,
Quote from Books Online:
SQL Server Setup sets the server name to the computer name during
installation. Change @.@.SERVERNAME by using sp_addserver and then
restarting SQL Server. This method, however, is not usually required.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Thanks for the imput Hugo, we have done just that and we still get a Null
result.
"Hugo Kornelis" wrote:
> On Wed, 6 Oct 2004 14:57:02 -0700, Richard wrote:
>
> Hi Richard,
> Quote from Books Online:
> SQL Server Setup sets the server name to the computer name during
> installation. Change @.@.SERVERNAME by using sp_addserver and then
> restarting SQL Server. This method, however, is not usually required.
>
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
|||On Wed, 13 Oct 2004 09:51:09 -0700, Richard wrote:
>Thanks for the imput Hugo, we have done just that and we still get a Null
>result.
Hi Richard,
I'm sorry to hear that. Unfortunately, I'm at a loss about what might
cause this. However, you might want to check the following links to see if
they apply to your situation:
http://support.microsoft.com/default...b;en-us;302223
http://support.microsoft.com/default...b;en-us;303774
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||run sp_dropserver
and then run sp_addserver 'local' if the instance is a default
instance .
If the instance is a named instance then run sp_addserver
'machinename\instancename' .
The server name will be changed after SQL is recycled.
HTH.
Venu
Hugo Kornelis <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message news:<rh3rm0t9lje6103c41f7f3plke6hoie7nj@.4ax.com>. ..
> On Wed, 13 Oct 2004 09:51:09 -0700, Richard wrote:
>
> Hi Richard,
> I'm sorry to hear that. Unfortunately, I'm at a loss about what might
> cause this. However, you might want to check the following links to see if
> they apply to your situation:
> http://support.microsoft.com/default...b;en-us;302223
> http://support.microsoft.com/default...b;en-us;303774
> Best, Hugo
@@ServerName returns NULL
which server the script is running upon. However, for some unknown reason,
the statement "Select @.@.ServerName" is returning a null value rather than the
name of the server. This has broken ALL of our job scripts. There is a work
around, however, with over 100 jobs that run, we are not too keen about
modifying existing scripts. Any ideas how we can get this fixed?
--
SQL Server Man NotOn Wed, 6 Oct 2004 14:57:02 -0700, Richard wrote:
>Hi: We use @.@.Servername throughout all our jobs to indicate to the script
>which server the script is running upon. However, for some unknown reason,
>the statement "Select @.@.ServerName" is returning a null value rather than the
>name of the server. This has broken ALL of our job scripts. There is a work
>around, however, with over 100 jobs that run, we are not too keen about
>modifying existing scripts. Any ideas how we can get this fixed?
Hi Richard,
Quote from Books Online:
SQL Server Setup sets the server name to the computer name during
installation. Change @.@.SERVERNAME by using sp_addserver and then
restarting SQL Server. This method, however, is not usually required.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks for the imput Hugo, we have done just that and we still get a Null
result.
"Hugo Kornelis" wrote:
> On Wed, 6 Oct 2004 14:57:02 -0700, Richard wrote:
> >Hi: We use @.@.Servername throughout all our jobs to indicate to the script
> >which server the script is running upon. However, for some unknown reason,
> >the statement "Select @.@.ServerName" is returning a null value rather than the
> >name of the server. This has broken ALL of our job scripts. There is a work
> >around, however, with over 100 jobs that run, we are not too keen about
> >modifying existing scripts. Any ideas how we can get this fixed?
> Hi Richard,
> Quote from Books Online:
> SQL Server Setup sets the server name to the computer name during
> installation. Change @.@.SERVERNAME by using sp_addserver and then
> restarting SQL Server. This method, however, is not usually required.
>
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>|||On Wed, 13 Oct 2004 09:51:09 -0700, Richard wrote:
>Thanks for the imput Hugo, we have done just that and we still get a Null
>result.
Hi Richard,
I'm sorry to hear that. Unfortunately, I'm at a loss about what might
cause this. However, you might want to check the following links to see if
they apply to your situation:
http://support.microsoft.com/default.aspx?scid=kb;en-us;302223
http://support.microsoft.com/default.aspx?scid=kb;en-us;303774
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||run sp_dropserver
and then run sp_addserver 'local' if the instance is a default
instance .
If the instance is a named instance then run sp_addserver
'machinename\instancename' .
The server name will be changed after SQL is recycled.
HTH.
Venu
Hugo Kornelis <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message news:<rh3rm0t9lje6103c41f7f3plke6hoie7nj@.4ax.com>...
> On Wed, 13 Oct 2004 09:51:09 -0700, Richard wrote:
> >Thanks for the imput Hugo, we have done just that and we still get a Null
> >result.
> Hi Richard,
> I'm sorry to hear that. Unfortunately, I'm at a loss about what might
> cause this. However, you might want to check the following links to see if
> they apply to your situation:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;302223
> http://support.microsoft.com/default.aspx?scid=kb;en-us;303774
> Best, Hugo
@@servername returning NULL
Any advice is appreciated.
thanks
@.@.Servername of null can happen if there is no entry in sys.servers for server_id 0. check sys.servers with this:
select * from sys.servers where server_id=0
If this returns 0 rows you can add the local server with
sp_addserver '<servername>', local
you will need to restart the server for this to take effect.
@@servername NULL
service packs. After applying the lastest security update to Windows
and rebooting the server, SQL has suddenly fogottern its name - SELECT
@.@.SERVERNAME returns NULL. In conjuction with this loss of identity,
various maintenance plan jobs seem to hang and never complete. This is
wreaking all sorts of havoc with my backups since none of them complete
successfully.
Will the sp_dropserver/sp_addserver combination fix the NULL problem?
Is there anything else I need to do?
Thanks,
M. E. HoustonYes...the dropserver, addserver should clean it up.
If you query the system table sysserver, you will probably
find that there isn't a server with the srvid = 0. The 0 is
used for the local server. If there is an entry for the
local server and srvid is not 0, you can remove it with
sp_dropserver. Uisng sp_addserver with 'local' adds the
server with the srvid = 0. If you don't specifiy 'local',
it's not added with the 0 for srvid.
-Sue
On Tue, 30 Sep 2003 11:19:09 -0500, meh
<margit.houston@.no_spam.gsiusa.com> wrote:
>I am running SQL 7 Standard on a W2K server, both at the most current
>service packs. After applying the lastest security update to Windows
>and rebooting the server, SQL has suddenly fogottern its name - SELECT
>@.@.SERVERNAME returns NULL. In conjuction with this loss of identity,
>various maintenance plan jobs seem to hang and never complete. This is
>wreaking all sorts of havoc with my backups since none of them complete
>successfully.
>Will the sp_dropserver/sp_addserver combination fix the NULL problem?
>Is there anything else I need to do?
>Thanks,
>M. E. Houston|||This solved my server name problem, but I'm still having
issues with jobs created by maintenance plans hanging. In
order to make them stop, I have to kill the process. When
I do that, the following message gets written to the log --
[Microsoft SQL-DMO (ODBC SQLState: 01000)] Error 0:
[Microsoft][ODBC SQL Server Driver][Shared Memory]
ConnectionRead (recv()).
[Microsoft][ODBC SQL Server Driver][Shared Memory]General
network error. Check your network documentation.
-- Anyone have any clue as to what this really means?
Thanks,
Margit
>--Original Message--
>Yes...the dropserver, addserver should clean it up.
>If you query the system table sysserver, you will probably
>find that there isn't a server with the srvid = 0. The 0
is
>used for the local server. If there is an entry for the
>local server and srvid is not 0, you can remove it with
>sp_dropserver. Uisng sp_addserver with 'local' adds the
>server with the srvid = 0. If you don't specifiy 'local',
>it's not added with the 0 for srvid.
>-Sue|||Just curious based on the first issue and not sure if it's
the issue or not but did you by any chance rename the server
after the jobs were created? Do you have any problems
changing, modifying jobs?
-Sue
On Thu, 2 Oct 2003 13:22:09 -0700, "M. E. Houston"
<margit.houston@.no_spam.gsiusa.com> wrote:
>This solved my server name problem, but I'm still having
>issues with jobs created by maintenance plans hanging. In
>order to make them stop, I have to kill the process. When
>I do that, the following message gets written to the log --
>[Microsoft SQL-DMO (ODBC SQLState: 01000)] Error 0:
>[Microsoft][ODBC SQL Server Driver][Shared Memory]
>ConnectionRead (recv()).
>[Microsoft][ODBC SQL Server Driver][Shared Memory]General
>network error. Check your network documentation.
>-- Anyone have any clue as to what this really means?
>Thanks,
>Margit
>
>>--Original Message--
>>Yes...the dropserver, addserver should clean it up.
>>If you query the system table sysserver, you will probably
>>find that there isn't a server with the srvid = 0. The 0
>is
>>used for the local server. If there is an entry for the
>>local server and srvid is not 0, you can remove it with
>>sp_dropserver. Uisng sp_addserver with 'local' adds the
>>server with the srvid = 0. If you don't specifiy 'local',
>>it's not added with the 0 for srvid.
>>-Sue|||Sorry for the delay in reply.
I did not have any problems making changes to any of the
jobs/maintenance plans either before or after I renamed the server. I
thought the problem might have been a naming issue so I deleted all the
maintenance plans and all the jobs I had created and started over. The
new jobs under the correct server name still exhibit the same bad
behaviour. There doesn't seem to be any consistency as to where in the
job stream things fall apart, i.e., which database in the backup job it
hangs on. On some occassions, the jobs even complete as expected.
Thanks,
Margit
Sue Hoegemeier wrote:
> Just curious based on the first issue and not sure if it's
> the issue or not but did you by any chance rename the server
> after the jobs were created? Do you have any problems
> changing, modifying jobs?
> -Sue|||Sorry for the delay in reply.
I did not have any problems making changes to any of the
jobs/maintenance plans either before or after I renamed the server. I
thought the problem might have been a naming issue so I deleted all the
maintenance plans and all the jobs I had created and started over. The
new jobs under the correct server name still exhibit the same bad
behaviour. There doesn't seem to be any consistency as to where in the
job stream things fall apart, i.e., which database in the backup job it
hangs on. On some occassions, the jobs even complete as expected.
Thanks,
Margit
Sue Hoegemeier wrote:
> Just curious based on the first issue and not sure if it's
> the issue or not but did you by any chance rename the server
> after the jobs were created? Do you have any problems
> changing, modifying jobs?
> -Sue|||Can't tell you for sure why the jobs randomly hang - I've
seen jobs hang when they attempt to send mail and there are
problems somewhere in the mail configuration. You could run
profiler or a trace to try to track down what specifically
is going on when the jobs hang.
-Sue
On Wed, 08 Oct 2003 08:53:32 -0500, meh
<margit.houston@.no_spam.gsiusa.com> wrote:
>Sorry for the delay in reply.
>I did not have any problems making changes to any of the
>jobs/maintenance plans either before or after I renamed the server. I
>thought the problem might have been a naming issue so I deleted all the
>maintenance plans and all the jobs I had created and started over. The
>new jobs under the correct server name still exhibit the same bad
>behaviour. There doesn't seem to be any consistency as to where in the
>job stream things fall apart, i.e., which database in the backup job it
>hangs on. On some occassions, the jobs even complete as expected.
>Thanks,
>Margit
>Sue Hoegemeier wrote:
>> Just curious based on the first issue and not sure if it's
>> the issue or not but did you by any chance rename the server
>> after the jobs were created? Do you have any problems
>> changing, modifying jobs?
>> -Sue
@@servername gives old name
I have changed mycomputername from test1 to test2
I can connect to sql server 2000 in query analyzer using test2 name , but
when I give query
select @.@.servername is gives old name test1
why this happens?
ThanksChanging the servername is not only a thing on windows, there are entries
you have to make via stored procedure on the systables, what does the table
sysserver tell (located in master)
HTH, Jens Suessmeyer.
"AM" <anonymous@.examnotes.net> schrieb im Newsbeitrag
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||Changing the name of your server does not automatically change the name of t
he
SQL Server instance. Changing the name of a server running SQL Server is a
significant undertaking and should not be done without considerable forethou
ght.
Here's a link on the Microsoft KB that might help:
http://support.microsoft.com/defaul...kb;en-us;303774
Of course, this doesn't account for all applications that will have to chang
e to
point to the new server.
Thomas
"AM" <anonymous@.examnotes.net> wrote in message
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||Execute the following on your server:
sp_dropserver <old_name>
go
sp_addserver <new_name>
go
When you rename a server, it doesn't update the master..sysservers table,
which is where @.@.servername gets its value. In SQL Server Books Online go
to index and type "Renaming servers" and you'll get a good topic discussing
it.
Mike
"AM" <anonymous@.examnotes.net> wrote in message
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||http://www.karaszi.com/SQLServer/in...server_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"AM" <anonymous@.examnotes.net> wrote in message news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.ph
x.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>
@@servername
ThanksThe BOL is incomplete about this subject. Try this microsoft article (http://support.microsoft.com/default.aspx?scid=kb;en-us;303774)
Good luck
Hope this helped|||I'd use:EXECUTE sp_addserver 'desiredServerName', 'LOCAL'-PatP
@@servername
Can anybody tell me why when i "select @.@.servername" it=B4s=20
returned NULL value?
Should i do an INSERT in the master..sysservers? or can=20
you tell me if exists something that correct this=20
situation?
Best RegardsMake a backup of master first
do sp_dropserver 'servername'
go
sp_addserver 'servername', local
go
then stop and start your server.
Then select @.@.servername
Jeff
MCDBA, MCSE+I|||Thanks Jeff
>--Original Message--
>Make a backup of master first
>do sp_dropserver 'servername'
>go
>sp_addserver 'servername', local
>go
>then stop and start your server.
>Then select @.@.servername
>Jeff
>MCDBA, MCSE+I
>.
>
@@servername
SELECT @.@.servername
In Query Analyzer, I get a servername other than mine (I'm connected to loca
lhost)
What's happening?
Thanks
RicardoRicardo,
If the server has been renamed in the past whilst SQL was installed, then
the @.@.servername will be wrong.
In order to resolve it, do the following.
SP_DROPSERVER OLDSERVERNAME
GO
SP_ADDSERVER CORRCECTSERVERNAME, LOCAL
GO
Then you must restart SQL server to take effect.
Immy
"Ricardo" <anonymous@.discussions.microsoft.com> wrote in message
news:F29CD1CA-3752-4B2F-97E9-CF6BE4FF10EB@.microsoft.com...
> If I try this
> SELECT @.@.servername
> In Query Analyzer, I get a servername other than mine (I'm connected to
localhost)
> What's happening?
> Thanks
> Ricardo|||Thanks Immy