Query to Determine Current SQL Instance Name Posted by John Colton — April 19, 2012 0 Here’s a simple query to determine the current SQL server instance name: select @@SERVERNAME If this query is executed within a named instance, it will return a result such as SQLSERVERNAMEDINSTANCE