New answers tagged

1

It does return 'Null' if you've only got a default instance. I tried it in SQL 2005 and SQL 2008R2. Otherwise, @@SERVERNAME should be the same as ServerProperty('MachineName') + '\' + ServerProperty('InstanceName') Tested this also in SQL 2005 and SQL 2008R2.



Top 50 recent answers are included