Oct 16, 2013

Sql script to get database server name in sql server


We can get the server name in sql server by following sql query:

SELECT @@SERVERNAME AS [Server]

Sample output:

Server
RITESH-PC\SQLEXPRESS

No comments:

Post a Comment