1

I am using Visual Studio 2017. From data connection when I create new SQL Server database, a pop up open and ask for server name. I refreshed but no server name display. What is the solution?

enter image description here

1
  • If you're looking for a simple dev enviroment database, then localdb may be what you're looking for. It is a pared back version of SQL Server, and can be installed with VS. More info Commented Feb 22, 2018 at 1:06

3 Answers 3

5

I found my answer. From the SQL Server Object Explore, Right Click "Add New Server" Then click to local and select server. After selecting the server i found server name. I copy the servername from here

and paste it to paste it to

"create new sql server database" server name field.. And set database name. Finally it works!

Sign up to request clarification or add additional context in comments.

3 Comments

If you found your answer, don't you think you should accept it?
not working after following same steps as you answered
I installed three useless MS programs (as instructed by various MS pages) to try and get this done and all I needed was VS... Glad I finally found your answer :)
2

Install SQL Server, SQL Server Express, or LocalDB on your current computer or a computer in your network.

Explanation

SQL Server Data Tools provides you with a client application that you can use to connect to SQL Server instances.

However, it does not include a server instance (a Database Engine Instance). In order to have anything populate that list (namely servers), you have to install one of the above options on a machine in your network that you can connect to.

3 Comments

I don't want to install sql server or sql server Express on my computer. Because visual studio 2017 itself have sql server data tools. Thanks for your comment.
I suspect that localdb is already installed, and that this question is actually about connection strings....
Maybe. Isn't that an optional part of the Visual Studio installation, though?
1

you can use localDb...
create a new connection with the following in your connection string:

Data Source=(localdb)\MSSQLLocalDB;
Integrated Security=True;

then you can create new DB inside visual studio:

Create new DB from Visual Studio

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.