86

I've used SQL Server Management Studio before, but only when the server is already up and running.

I need to start from the beginning and create my own instance on the local computer.

The instructions I'm getting, is just put "." on the server name and use Windows Authentication. But that gives me a "server not found" error.

Can someone please help? I'm using SQL Server 2012 Management Studio.

I really thought it would be just like Access, create my tables and start creating queries.

5
  • are you launching studio on the same sql server machine? if you are then "." will work otherwise from a different machine you have to key-in the machine name or ip address depending if you have configured sql server properly Commented Apr 11, 2017 at 20:51
  • 2nd question, when setting up the sql server did you add yourself in as the admin or just "sa", if "sa" only then login as "sa" and add yourself in as a domain user or sql user Commented Apr 11, 2017 at 20:53
  • see this link msdn.microsoft.com/en-us/library/bb500438(v=sql.105).aspx Commented Apr 11, 2017 at 20:54
  • 4
    You need to install Server Instance. You have Management Studio installed, but that's just tool to connect to SQL Server, which is installed separately. Commented Apr 11, 2017 at 20:56
  • i used to know a small sql server set up .exe file many many years ago. I could use it on access and run sample sql server database. Not t bulky 4GB sql server express. Does someone remeber that file name or where i can get it? Commented Jan 15, 2022 at 9:29

6 Answers 6

80

You need to install a so-called Instance of MSSQL server on your computer. That is, installing all the needed files and services and database files. By default, there should be no MSSQL Server installed on your machine, assuming that you use a desktop Windows (7,8,10...).

You can start off with Microsoft SQL Server Express, which is a 10GB-limited, free version of MSSQL. It also lacks some other features (Server Agents, AFAIR), but it's good for some experiments.

Download it from the Microsoft Website and go through the installer process by choosing New SQL Server stand-alone installation .. after running the installer.

Click through the steps. For your scenario (it sounds like you mainly want to test some stuff), the default options should suffice.

Just give attention to the step Instance Configuration. There you will set the name of your MSSQL Server Instance. Call it something unique/descriptive like MY_TEST_INSTANCE or the like. Also, choose wisely the Instance root directory. In it, the database files will be placed, so it should be on a drive that has enough space.

Click further through the wizard, and when it's finished, your MSSQL instance will be up and running. It will also run at every boot if you have chosen the default settings for the services.

As soon as it's running in the background, you can connect to it with Management Studio by connecting to .\MY_TEST_INSTANCE, given that that's the name you chose for the instance.

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

3 Comments

So, I installed it, and for anyone wondering how to bring the localdb up, you use the cmd prompt. dba.stackexchange.com/questions/121150/…
To whom it may concern: I had to choose Custom Install, not Basic Install, to get to the "New SQL Server stand-alone installation", else installing failed for me.
"It will also run at every boot if you have chosen the default settings for the services". What if I don't want it to run at boot? How do I start and stop the database?
38

For anyone still looking to do this in 2022. So long as you are purely using it for development purposes you can download a full featured version of SQL Server directly from Microsoft at https://www.microsoft.com/en-us/sql-server/sql-server-downloads.

Comments

6

After installation you need to connect to Server Name : localhost to start using the local instance of SQL Server.

Once you are connected to the local instance, right click on Databases and create a new database.

Comments

5

Go to CommandPrompt and type sqllocaldb name of the instance you want to create and press enter

Type the below command and press enter sqllocaldb "local"

Now go to SSMS and click on the Connect and Select Database Engine and in Server name text box type (localdb)\Local and set Authentication as Windows. Click connect and you are done.

1 Comment

I get unknown SqlLocalDB operation: "local" if I try this
1

You need SQL Server Configuration Manager and then enable TCP/IP pipes. Can be installed with SQL Server Express.

enter image description here

Comments

-5

Your best bet over here to install XAMPP..Follow the link download it , it has an instruction file as well. You can setup your own MY SQL database and then connect to on your local machine.

https://www.apachefriends.org/download.html

2 Comments

Deducing from the nomenclature ("SQL Server Management Studio"), the author is asking about MSSQL (Microsoft) rather than MySQL.
Very valid answer, in my experience MSSQL makes life excessively difficult, especially if you want multiple logins and access rights. But, I would say that....

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.