SQL Server DBA

Create a SQL Server database with SSMS

Tutorial to create a SQL Server database with SSMS (SQL Server Management Studio). How to create a SQL Server database with SQL Server Management Studio, i.e. SSMS. In this tutorial, let’s learn how to add a new MS SQL database to an instance. Indeed, to start, it’s mandatory to create a database to create and use SQL objects. It is possible to perform almost

SQL Server DBA

Create SQL Server user with SSMS and set up access rights

How to create a new SQL Server user with SQL Server Management Studio (SSMS)? This SQL Server administration tutorial explains how to create a SQL Server user login with SSMS, used to connect to the databases of an instance. The user login can have a Windows security or the SQL Server security. Security management in SQL Server in general and in SQL databases is

SQL Server DBA

Download SQL Server 2019 developer edition

How to download the Microsoft SQL Server 2019 developer edition for free? SQL Server 2019 developer is the free edition, and the download contains the full set of available features. It also provides a real option for evaluation for developments, tests, and proof of concepts. Nevertheless, it is not for use in a production environment. 1. How to download the SQL Server 2019 developer

SQL Server DBA

Clear the SQL Server transaction log and fix the 9002 error

How to clear the SQL Server transaction log and fix the error 9002? It is time to clear the transaction log when a SQL Server database is slow, or the available disk space is getting abnormally small. Indeed, it is sometimes enough to clear the SQL Server transaction log and reduce the files in the SQL Server database. Often, during this operation, this message

SQL Server DBA

Drop a SQL Server database with a script

How to delete a SQL Server database with a script? And delete all associated files? These files are the .mdf, .ndf, .ldf files and also the .bak backup files. Use the SQL Server Drop database command as below. With a check beforehand to avoid errors. It runs the command only if the SQL Server database exists on the given server and instance. Create a

SQL Server DBA

Cannot drop the database because it is currently in use

How to fix the SQL Server error Cannot drop the database because it is currently in use? Also know as the 3702 error, the SQL Server error Cannot drop the database because it is currently in use is frequent in multi-user enfironements. It is possible to manage SQL databases with scripts or via the various windows of SQL Server Management Studio. For example, you

SQL Server DBA

Install a second instance of SQL Server

How to install a second instance of SQL Server? During the first installation of SQL Server, there are two options for the instances, te first option is to install the default instance, the other option is to install a named instance. To install another instance, follow the steps below and adapt according to the SQL Server configuration. Add multiple additional instances to a SQL

SQL Server DBA

Create a SQL Server database with a script

In order to create a new SQL Server database with one script, just follow this article and especially the code snippet. To create a Microsoft database with a Transact-SQL script, use the CREATE DATABASE function as explained in this post. First, a database represents the main part of a Relational Database Management System. An RDBMS contains and runs databases. A database contains SQL objects

SQL Server DBA

Query to display SQL Server version details

Display the SQL Server version number with details using a query? Using SQL Server Management Studio, here is a query to display SQL Server exact version. It is possible by using simple T-SQL queries and stored procedures. For example, it is very helpful to know the exact version of SQL Server installed. Especially when working on security patches and upgrades, to ensure compatibility and