Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
288 views
in Technique[技术] by (71.8m points)

SQL Server: How to find all localdb instance names

I have two versions (2012, 2014) of SQL Server Express LocalDB installed in my system.

How can I find all existing LocalDB instance names?

I found a way to do that using command line as mentioned in the answers section.

Is there a better and easy way to do it?

question from:https://stackoverflow.com/questions/36157191/sql-server-how-to-find-all-localdb-instance-names

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I found SqlLocalDB utility that needs to be run on command line.

SqlLocalDB can be found in

C:Program FilesMicrosoft SQL Server110ToolsBinn

or

C:Program FilesMicrosoft SQL Server120ToolsBinn

To get all existing LocalDB instance names, use:

SqlLocalDB.exe i

 info|i
  Lists all existing LocalDB instances owned by the current user
  and all shared LocalDB instances.

To get detailed information about a specific LocalDB instance:

SqlLocalDB.exe i "MSSQLLocalDB"

info|i "instance name"
  Prints the information about the specified LocalDB instance.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...