Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

@@Servername Expand / Collapse
Author
Message
Posted Sunday, April 25, 2010 8:39 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, July 21, 2014 12:24 PM
Points: 604, Visits: 1,306

Hi,

I have named instance in sql server 2000 version. while executing the @@servername command its giving the server name as value "Null".

Can anybody tell me the reason why its giving result like that or is there any issue at server ?

Thanks in Advance.

Post #910109
Posted Sunday, April 25, 2010 10:25 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 11:10 AM
Points: 814, Visits: 1,361
Sudhakara ,

That's strange..! The serverproperty gives entire details of the SQL server.

Again cross check the server name from services section.

Refer the link:
http://msdn.microsoft.com/en-us/library/aa933172(SQL.80).aspx


Thanks.
Post #910124
Posted Sunday, April 25, 2010 2:33 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:50 PM
Points: 6,191, Visits: 13,340
has this server been renamed at some point?



-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #910146
Posted Sunday, April 25, 2010 8:41 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 3:04 PM
Points: 6,582, Visits: 8,861
Check out sp_AddServer in BOL.
You'll probably need to run it as:
execute sp_AddServer 'MyServerName', 'LOCAL'



Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #910165
Posted Monday, April 26, 2010 1:00 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, July 21, 2014 12:24 PM
Points: 604, Visits: 1,306
Sourav-657741 (4/25/2010)
Sudhakara ,

That's strange..! The serverproperty gives entire details of the SQL server.

Again cross check the server name from services section.

Refer the link:
http://msdn.microsoft.com/en-us/library/aa933172(SQL.80).aspx


Thanks for all,

can you tell what kind of problem may occur if its continues ?.
Post #910204
Posted Monday, April 26, 2010 6:59 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 12:27 PM
Points: 15,541, Visits: 27,919
Can you get the information running this query?

SELECT CONVERT(sysname, SERVERPROPERTY('servername'));

If not, you may have an issue with the server, it's configuration, your connections... not sure.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #910334
Posted Monday, April 26, 2010 7:16 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:42 AM
Points: 74, Visits: 275
I've seen this before- I'd bet your server isn't registered as "local"
Try selecting from master.Sys.servers- (select * from master.sys.servers)
you're local servername should be server_id= 0

if it's not- I think you need to drop and readd
exec sp_dropserver 'myserver'
exec sp_addserver 'myserver',local


Good luck
Ben Pflanzer



Post #910348
Posted Wednesday, April 28, 2010 1:33 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, July 21, 2014 12:24 PM
Points: 604, Visits: 1,306
Grant Fritchey (4/26/2010)
Can you get the information running this query?

SELECT CONVERT(sysname, SERVERPROPERTY('servername'));

If not, you may have an issue with the server, it's configuration, your connections... not sure.


Yes. That select statement displaying the name of the server.But here name of the instance and name of the server is different.

Thanks.
Post #911668
Posted Wednesday, April 28, 2010 1:41 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, July 21, 2014 12:24 PM
Points: 604, Visits: 1,306
bpflanzer (4/26/2010)
I've seen this before- I'd bet your server isn't registered as "local"
Try selecting from master.Sys.servers- (select * from master.sys.servers)
you're local servername should be server_id= 0

if it's not- I think you need to drop and readd
exec sp_dropserver 'myserver'
exec sp_addserver 'myserver',local


Good luck
Ben Pflanzer



Its a named instance in the server. Server id column has value as 1.
Post #911675
Posted Wednesday, April 28, 2010 5:47 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 12:27 PM
Points: 15,541, Visits: 27,919
sudhakara (4/28/2010)
Grant Fritchey (4/26/2010)
Can you get the information running this query?

SELECT CONVERT(sysname, SERVERPROPERTY('servername'));

If not, you may have an issue with the server, it's configuration, your connections... not sure.


Yes. That select statement displaying the name of the server.But here name of the instance and name of the server is different.

Thanks.

OK. That's good. Then you can also call the SERVERPROPERTY function with 'InstanceName' to get the instance. If that's accurate, you might be OK.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #911801
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse