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 <linked server>.@@SERVERNAME;
select <linked server>.SERVERPROPERTY('ServerName');
... but no joy. Any ideas?
This is SQL 2008 R2SQL 2008 R2
& 20142014
(2008R22008R2
is the linked server)
EDIT: Errors are:
Msg 102, Level 15, State 1, Line 2 Incorrect syntax near '@@SERVERNAME'.