Get @@SERVERNAME from linked server
8
votes
4
answers
21676
views
This seems like a basic question but I can't find any answers out there - I need to be able to get the server name/instance etc. from a linked server. I've tried a couple of things:
select .@@SERVERNAME;
select .SERVERPROPERTY('ServerName');
... but no joy. Any ideas?
This is
SQL 2008 R2
& 2014
(2008R2
is the linked server)
EDIT: Errors are:
> Msg 102, Level 15, State 1, Line 2 Incorrect syntax near
> '@@SERVERNAME'.
Asked by dwjv
(679 rep)
Sep 16, 2015, 10:22 AM
Last activity: Aug 29, 2019, 05:07 PM
Last activity: Aug 29, 2019, 05:07 PM