Create a new database with SQL Server Management Studio

Time economy is key when you create a SQL Server partition.
Time economy is key when you create a SQL Server partition.

How to create a new SQL Server database with SQL Server Management Studio – 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 (SQL Server Management Studio). 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.

How to create a new database with SQL Server Management Studio ?

First, on 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:

In SSMS, select the instance, then right-click on “Databases” and select the “New Database…” option in the contextual 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.

This example shows how to easily add a new SQL Server database from the graphic user interface – GUI – with no lines of code. This applies to all existing versions, with some variations in the options and display.