Mahmoud ElMansy: knowledge meant to be free

Get list of SQL Servers Instance On Your Network with OSQL and SQLCMD

This post will dedicated to a simple every day development task.

Is how to get name of all SQL Server instance on your local machine and Network.

It is easy just open your cmd and type.

OSQL -L (for win XP)

OSQL /L (for win7)

OR Type.

SQLCMD -L (for win XP)

SQLCMD /L (for win7)

The commend will get a list of all instance and will be written in this form.

Server Name\Instance Name