t

Command Line SQL Server Instance Version

In SQL Server on October 19, 2011 by VeryWoody Tagged: , , , , ,

Run cmd to display the Command Console

Type sqlcmd –L to display a list of available servers and instance names

With your server name/instance type, sqlcmd –S <server name>

It will then display line one. This is now the same as writing a query in SQL Server Management Studio.

On our console we can then query the server version

1> SELECT @@Version

2> GO

You can then type exit to go back

This is one use of many available commands.

For a comprehensive list of commands use sqlcmd /?

Comments Off

Follow

Get every new post delivered to your Inbox.