Create a database with SSMS

Tutorial to create a SQL Server database with SSMS.

Use the SSMS software to create a new database without any script

How to create a SQL Server database with SQL Server Management Studio also called SSMS ? In this tutorial, let us see how to add a new SQL Server database. Indeed, to start, it’s mandatory to create a SQL Server database to start creating and using SQL objects.

It is possible to perform almost All possible operations on a SQL Server database from SSMS, here SQL Server Management Studio 18. To install a database instance on your machine, start by installing SQL Server 2017 or 2019 for example.

To create a database with a T-SQL script check this code example. Both options are valuable, once automating the deployments then the scripting option is the one to choose.

The SSMS tutorial is also available in a video format:

Create a SQL Server database step by step

First, from the PC, open :

  • Program Files
    • Microsoft SQL Server
      • and then Microsoft SQL Server Management Studio

There might be a list of existing databases in the DBMS (Database Management System), at least the system database. If the current privileges are high enough to see them.

Connect to the target instance, here it’s the localhost server, and a SQL Server Authentication:

Connect to the database server to create the database in SQL Server Management Studio.
Connect to the database server to create the database

In SSMS, select the instance, then right-click on “Databases” and select the “New Database…” option in the contextual menu:

Right-Click to open the New Database menu on SSMS
Right-Click to open the New Database menu

Secondly, in the “New Database” window enter the name of the new SQL Server database. we call the database “DB2_ExpertOnly“. Because other databases are already created on the server. In this example, the default settings are kept.

Like for example the size of the new database (5 megabytes) and the size of the log file (1 megabyte). The Autogrowth and Maxsize options per default are respectively 10 percent and unlimited.

Create the database name and leave the default SSMS options
Create the database name and leave the default SSMS options

This example shows how to easily create a new SQL Server database from the graphic user interface, also called GUI, with no lines of code. This applies to all existing versions, with some variations in the options and display. It is also possible to create a new MS SQL database with a T-SQL script.

Be the first to comment

Leave a Reply

Your email address will not be published.


*