Wednesday, December 15, 2010

How to Get servername,instancename,hostname

To Get the name of server execute this query: SELECT SERVERPROPERTY(“MachineName”)
To Get the name  of the computer running the query: SELECT host_name()
Instance name: SELECT @@ServerName

No comments:

Post a Comment