Saturday , April 20 2024

@@SERVICENAME Function in SQL Server(TSQL)

 

You can find the name of the SQL Server Instance that you are connected to with the @@ SERVICENAME Function. If the instance you connected to is default instance, the result will return as MSSQLSERVER. If Named Instance, the result will return as Named Instance’s name.

When this function is executed on default instance:

When this function is executed on named instance:

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories