Sunday, March 1, 2015

How to get SQL server and instance name??

If you want to know the SQL Server server name and instance name then just execute the 
below query:

SELECT @@servername

If you want to know only the instance name of SQl server then execute:

SELECT SERVERPROPERTY ('InstanceName')      

                        
Thanks!!!                                                                                                                                     

1 comment: