Showing posts with label returning. Show all posts
Showing posts with label returning. Show all posts

Saturday, February 11, 2012

@@serverName returns wrong name

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
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

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
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

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
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

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 returning NULL

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

@.@.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

Hi,
The variable @.@.servername is not returning Machine
Name..is there a way to update the @.@.servername to reflect
actual machine name...
JohnHi,
Execute the below command:-
sp_addserver 'servername',local
Before adding the server check the server name using
sp_helpserver
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
> Hi,
> The variable @.@.servername is not returning Machine
> Name..is there a way to update the @.@.servername to reflect
> actual machine name...
> John|||Hi.
Thanks for your Input.
John
>--Original Message--
>Hi,
>Execute the below command:-
>sp_addserver 'servername',local
>Before adding the server check the server name using
>sp_helpserver
>Thanks
>Hari
>MCDBA
>
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
reflect[vbcol=seagreen]
>
>.
>|||Alternatively, if you are using SQL Server 2000, you can use the
SERVERPROPERTY().
So,
select SERVERPROPERTY('machineName'), SERVERPROPERTY('serverName')) will
give you the machine name and the instance name respectively
Al
"Hari Prasad" wrote:

> Hi,
> Execute the below command:-
> sp_addserver 'servername',local
> Before adding the server check the server name using
> sp_helpserver
> Thanks
> Hari
> MCDBA
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
>
>

@@servername

Hi,
The variable @.@.servername is not returning Machine
Name..is there a way to update the @.@.servername to reflect
actual machine name...
John
Hi,
Execute the below command:-
sp_addserver 'servername',local
Before adding the server check the server name using
sp_helpserver
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
> Hi,
> The variable @.@.servername is not returning Machine
> Name..is there a way to update the @.@.servername to reflect
> actual machine name...
> John
|||Hi.
Thanks for your Input.
John[vbcol=seagreen]
>--Original Message--
>Hi,
>Execute the below command:-
>sp_addserver 'servername',local
>Before adding the server check the server name using
>sp_helpserver
>Thanks
>Hari
>MCDBA
>
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
reflect
>
>.
>
|||Alternatively, if you are using SQL Server 2000, you can use the
SERVERPROPERTY().
So,
select SERVERPROPERTY('machineName'), SERVERPROPERTY('serverName')) will
give you the machine name and the instance name respectively
Al
"Hari Prasad" wrote:

> Hi,
> Execute the below command:-
> sp_addserver 'servername',local
> Before adding the server check the server name using
> sp_helpserver
> Thanks
> Hari
> MCDBA
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
>
>

@@servername

Hi,
The variable @.@.servername is not returning Machine
Name..is there a way to update the @.@.servername to reflect
actual machine name...
JohnHi,
Execute the below command:-
sp_addserver 'servername',local
Before adding the server check the server name using
sp_helpserver
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
> Hi,
> The variable @.@.servername is not returning Machine
> Name..is there a way to update the @.@.servername to reflect
> actual machine name...
> John|||Hi.
Thanks for your Input.
John
>--Original Message--
>Hi,
>Execute the below command:-
>sp_addserver 'servername',local
>Before adding the server check the server name using
>sp_helpserver
>Thanks
>Hari
>MCDBA
>
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
>> Hi,
>> The variable @.@.servername is not returning Machine
>> Name..is there a way to update the @.@.servername to
reflect
>> actual machine name...
>> John
>
>.
>|||Alternatively, if you are using SQL Server 2000, you can use the
SERVERPROPERTY().
So,
select SERVERPROPERTY('machineName'), SERVERPROPERTY('serverName')) will
give you the machine name and the instance name respectively
Al
"Hari Prasad" wrote:
> Hi,
> Execute the below command:-
> sp_addserver 'servername',local
> Before adding the server check the server name using
> sp_helpserver
> Thanks
> Hari
> MCDBA
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:67a601c4837b$29ce52a0$a301280a@.phx.gbl...
> > Hi,
> >
> > The variable @.@.servername is not returning Machine
> > Name..is there a way to update the @.@.servername to reflect
> > actual machine name...
> >
> > John
>
>