John Smith
John Smith

Reputation: 601

How to determine SQL Server Instance name remotely

If I know a that SQL Express is installed on a given computer. I have the SA password to that database. However I do not know the Instance Name.

(So the connection string would be "Data Source=[IP Address]\????;User Id=sa;Password=[password]")

Without logging into the box, how can I determine what the instance name?

Upvotes: 1

Views: 2769

Answers (1)

Heinzi
Heinzi

Reputation: 172200

If you have the SQL Server tools installed locally,

osql -L

will output a list of all available SQL Servers (including their instance names) in your current network.

Upvotes: 1

Related Questions