How to Get a List of MS SQL Servers

The SQL Server database system includes a command line utility that allows you to list tables, query records or retrieve a list of Microsoft (MS) SQL Servers on the network. This command is beneficial if you want to create an inventory of SQL Servers and the server's associated name. You can run this command line utility from any SQL Server computer or an administrator computer with the SQL Server tools installed.

Instructions

    • 1

      Click the Windows "Start" button on a computer that has SQL Server or the tools installed. Type "cmd" into the text box and press "Enter." This command opens the MS-DOS command prompt.

    • 2

      Type "sqlcmd -U me -P pass" where "me" is your SQL Server username and "pass" is your password. Press "Enter" to start the SQL Server utility.

    • 3

      Type "sp_databases" and press "Enter." A list of SQL Server databases is shown in the command line. You can output a list to a text file by typing "sp_databases > mydatabases.txt" and pressing "Enter."

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured