DED9

How To Use SQL Server Management Studio To Manage Databases?

SQL Server Management Studio Is One Of The Most Powerful Database Management Systems (DBMS) That Is Available To Network Administrators To Manage And Interact With Databases.

The above tool is so comprehensive and powerful that it is difficult to provide a similar example. All network administrators using SQL Server have to be familiar with the modules of this utility. In this article, we will explain how to install, implement and use this application tool.

What is the language of a structured query?

Structured Query Language (SQL) is the language used to interact with databases. This powerful language allows database administrators to extract, edit, delete and add new information to records within databases. Application developers and database administrators need to pay attention to three important points about SQL.

The first reason is that SQL is a language that is inevitable to learn because all online businesses, like online stores, work based on databases, and therefore learning is essential.

As more and more online businesses are added, and businesses are forced to register their information in databases and retrieve information if needed, people proficient in SQL will gain job opportunities.

The second reason is that data is one of the most important requirements for data scientists and machine learning engineers, and any data received must eventually be stored in a database based on a structured model, so a developer or programmer should know Which format stores data in databases so that it can be retrieved via simple SQL statements.

 Therefore, familiarity with the syntactic composition of this language is essential.

Third, SQL includes various management systems such as SQL Server, MySQL, and PostgreSQL. So to interact with these databases, you need to be familiar with the basics and syntax of SQL.

The fourth reason is that SQL is used to implement dialogs on relational databases. Relational databases refer to a pattern that works based on hierarchy and interaction between objects.

To be more precise, these databases consist of rows and columns in which information is placed. So to extract information from a particular column or to receive a specific group of information, you need to know the syntactic composition of the information.

SQL Server is a comprehensive management solution

Microsoft SQL Server is a relational database management system (RDBMS) that enables dialogs on databases. This dialog can be related to selecting, updating, deleting, or adding information to the database.

Fortunately, SQL Server fully supports SQL, and developers can execute SQL statements in the software.

When SQL Server receives a command, it communicates with the files in the database and shows the conversation results to the user. When you install Security Server on a system, it looks like a Windows service installed and ready to serve.

What is the role of SQL Server Management Studio in this regard?

SQL Server Management Studio provides a powerful user interface that connects to the SQL Server service, allowing administrators of databases to access databases more easily and intelligently and execute SQL commands.

When you install the above tool, you can write SQL language commands and click the Execute button to send the SQL Server database engine commands. In this case, based on the type of process, instructions are executed on the database.

This process may involve retrieving or making changes to the database. Fortunately, the tool provides a graphical user interface or scripting environment for developers to best manage databases.

How to install SQL Server Management Studio?

Fortunately, the installation process of this tool is not very complicated. The software installation tutorial is as follows:

  1. First, go to the Microsoft site and download the software. On the page that appears, click on the Download SQL Server Management Studio option to start the download process.

SQL Server Management Studio

After downloading, run the file and then click on Install. The installation process is not very complicated and starts by clicking the Install button.

3. After the installation is complete, find the SSMS icon in the Windows menu and click on it.

How to connect SQL Server Management Studio and database?

When you run the above tool, you will see the Connect to Server window. There are several fields in the window as follows:

Server Name: Enter the name of the server or IP of the server to which you want to connect. Use the dot character if you want to connect to a server installed on a local system.

Authentication Type: In this field, you must specify the authentication mechanism and connection to the server.

Remember Password: By activating the above option, you do not need to enter a password in future visits.

When you enter the information, click Connect.

If the information is correct, you will be connected to the database, and you will see the information about the database. After connecting to the server, the Object Explorer panel will appear on the left side of the screen. In this panel, it is possible to change the SQL Server settings and the created database.

How to create a database using SQL Server Management Studio?

To build an information bank, follow the steps below:

1. In the left panel, click on the Databases option and select the New Database option.

2. In the New Database, enter the name of the desired database.

3. Accept the default settings to create the database and click Ok.

When creating a new database, changing the owner name, retrieval model, filegroup model, collocation, etc.

How to use Transact-SQL to build a new database?

To do this, first, connect to the Database Engine—Run New Query from the standard bar. In the window that appears, type the following commands and run Execute. In the following example, a database called Sales is created. Since the PRIMARY keyword is not used, the first Sales_dat entity is selected as the primary file. Because MB and KB are not selected in the SIZE parameter for Sales_dat, the default MB option, which represents MB, is used.

The Sales_log file is also based on MB because the MB prefix is ​​explicitly stated in the MB parameter.

USE master;

GO

CREATE DATABASE Sales

ON

( NAME = Sales_dat,

    FILENAME = ‘ C: \ Program Files \ Microsoft SQL Server \ MSSQL13.MSSQLSERVER \ MSSQL \ DATA \ saledat.mdf ‘,

    SIZE = 10,

    MAXSIZE = 50,

    FILEGROWTH = 5)

LOG ON

( NAME = Sales_log,

    FILENAME = ‘ C: \ Program Files \ Microsoft SQL Server \ MSSQL13.MSSQLSERVER \ MSSQL \ DATA \ salelog.ldf ‘,

    SIZE = 5MB,

    MAXSIZE = 25MB,

    FILEGROWTH = 5MB);

GO

Query Editor in Microsoft SQL Server Management

An important functionality that SSMS provides to developers is the execution of T-SQL dialogs. When you click New Query in the toolbar, the Query Editor appears. In the above editor, it is possible to insert SQL dialogs and execute them. Similar to what we did in the previous paragraph. In the following example, we run a simple dialog to view user data.

Open the above window, enter the dialog and click on the Execute option in the toolbar. The dialog results are shown in the Results section as shown below.

The editor offers various capabilities to users. For example, it is possible to change the display type. For this purpose, in the editor toolbar, we can set the display type to be saved in a file. In this case, the information is displayed as plain text.

Additionally, if you plan to separate the dialog pages, there is an option called Display Results in a Separate tab. To activate the above option, you must click on the Tools menu and select Options. In the screen that appears, select the Display Results in a Separate tab.

In this case, the results of the dialogs are displayed in different windows.

SQL Server Management Studio has a wide range of applications, which we will discuss in more detail in future articles.

 

Die mobile Version verlassen