1-click AWS Deployment 1-click Azure Deployment
- Overview
- Features
- AWS
- Azure
- Videos
Overview
SQL Server is a relational database management system (RDBMS) developed by Microsoft. It is widely used for storing, managing, and retrieving data in various applications and systems. SQL Server supports the Structured Query Language (SQL) for managing databases and offers a range of features for data storage, manipulation, and analysis.
Here are some key aspects and features of SQL Server:
- Data Storage: SQL Server allows you to create and manage databases, tables, and other database objects to store your data efficiently. It supports different data types, such as integers, strings, dates, and binary data.
- Data Retrieval and Manipulation: SQL Server provides a comprehensive set of SQL statements for querying and modifying data. You can use SELECT statements to retrieve data from tables, and UPDATE, INSERT, and DELETE statements to modify the data.
- Transaction Management: SQL Server supports transactions to ensure data integrity and consistency. You can group multiple database operations into a single transaction and ensure that they either all succeed or all fail.
- Security: SQL Server offers various security features to protect your data. You can define user roles and permissions to control access to the database objects. It also provides encryption capabilities for securing sensitive data.
- Scalability and Performance: SQL Server is designed to handle large amounts of data and support high-performance applications. It offers features like indexing, query optimization, and partitioning to enhance performance and scalability.
- High Availability: SQL Server provides features for ensuring high availability of your databases. It supports database mirroring, failover clustering, and Always On Availability Groups for maintaining database availability in case of hardware or software failures.
- Business Intelligence: SQL Server includes tools and features for business intelligence and data analysis. It supports data warehousing, reporting, and integration with other Microsoft BI tools like Power BI.
- Integration Services: SQL Server Integration Services (SSIS) is a powerful ETL (Extract, Transform, Load) tool that allows you to integrate data from various sources, perform transformations, and load data into SQL Server databases.
- Analysis Services: SQL Server Analysis Services (SSAS) enables online analytical processing (OLAP) and data mining capabilities. It allows you to create multidimensional data models and perform complex analysis on large datasets.
- Reporting Services: SQL Server Reporting Services (SSRS) is a reporting platform that enables the creation, management, and delivery of paginated and interactive reports.
SQL Server has different editions, including the Enterprise, Standard, and Express editions, each with varying features and limitations. It also integrates with other Microsoft technologies and development tools, making it a popular choice for building applications that require a robust and scalable database backend.
Main Editions of SQL Server
- Enterprise Edition: This edition provides the most comprehensive set of features and capabilities for large-scale enterprise deployments. It includes advanced features like high availability, online transaction processing (OLTP), data warehousing, advanced analytics, and business intelligence. Enterprise Edition is suitable for mission-critical applications that require maximum performance, scalability, and high availability.
- Standard Edition: Standard Edition is designed for smaller to medium-sized businesses. It offers a basic set of database management features, including core database engine functionality, security features, and basic business intelligence capabilities. While it lacks some of the advanced features found in the Enterprise Edition, it still provides reliable performance and scalability for most common database applications.
- Express Edition: Express Edition is a free, lightweight version of SQL Server. It has limitations on database size (10 GB maximum per database) and hardware utilization (limited to a single processor and 1 GB of RAM). Express Edition is suitable for small-scale applications or development and testing purposes.
- Developer Edition: Developer Edition has the same features as the Enterprise Edition but is licensed for development and testing purposes only. It provides all the functionalities of the Enterprise Edition, making it an excellent choice for developers and development teams to build and test applications without the cost of the Enterprise license.
- Web Edition: Web Edition is specifically designed for hosting websites and web applications. It offers the necessary database management features for web-based workloads at a lower cost compared to other editions. Web Edition has limitations on CPU utilization and memory usage and is licensed based on the number of cores used by the server.
- Business Intelligence Edition: This edition is tailored for business intelligence and data warehousing scenarios. It includes features like advanced analytics, data integration, and reporting capabilities. Business Intelligence Edition provides a cost-effective solution for organizations focused on data analysis and reporting.
Key Components / Services of SQL Server
- Database Engine: The Database Engine is the core component responsible for storing, processing, and managing data. It includes the SQL Server Database Services, which handle query processing, data storage, and transaction management.
- SQL Server Management Studio (SSMS): SSMS is a graphical user interface (GUI) tool used for administering and managing SQL Server. It allows database administrators and developers to perform tasks such as creating databases, writing queries, managing security, and monitoring server performance.
- Integration Services (SSIS): Integration Services is an ETL (Extract, Transform, Load) tool that enables data integration and workflow management. It provides a platform for building and managing data integration solutions, including data extraction, transformation, and loading processes.
- Analysis Services (SSAS): Analysis Services is a component of SQL Server used for creating and managing online analytical processing (OLAP) and data mining solutions. It allows users to build multidimensional data models and perform complex analysis on large datasets.
- Reporting Services (SSRS): Reporting Services is a server-based reporting platform that enables the creation, management, and delivery of paginated reports, interactive reports, and mobile reports. It provides a wide range of reporting capabilities and supports data-driven subscriptions and report distribution.
- Full-Text Search: Full-Text Search is a service that enables advanced text-based search capabilities in SQL Server. It allows users to perform complex searches on text and unstructured data stored in the database and retrieve relevant results efficiently.
- Machine Learning Services (formerly R Services): Machine Learning Services integrate the R and Python programming languages into SQL Server. It allows users to run machine learning and data analytics algorithms directly within the database engine, leveraging the power of SQL Server for scalable and high-performance analytics.
- Replication: Replication is a feature that enables data synchronization and distribution across multiple SQL Server instances. It allows you to replicate data from one database to another, maintaining consistency between multiple copies of the database.
- Always On Availability Groups: Always On Availability Groups is a high-availability and disaster recovery feature that provides database-level redundancy and failover capabilities. It allows you to create groups of databases that can failover to a secondary replica in case of a primary replica failure.
- Security and Authentication: SQL Server provides robust security features to protect data. It includes mechanisms for authentication, authorization, and encryption to ensure data privacy and prevent unauthorized access to the database.
SQL Server Instances
SQL Server instances play a crucial role in the efficient and organized management of databases. Here are some key reasons highlighting the importance of SQL Server instances:
- Database Isolation: SQL Server instances allow for the isolation of databases and their resources. Each instance functions as a separate and independent environment, enabling multiple databases to run concurrently on the same server without interfering with one another. This isolation ensures better resource allocation, performance optimization, and simplified management.
- Security and Access Control: Instances provide a boundary for security and access control. Each instance can have its own authentication, authorization, and security settings, allowing administrators to define and enforce fine-grained access controls for specific databases within an organization. This enhances data security and mitigates the risk of unauthorized access or data breaches.
- Resource Allocation and Management: Instances enable efficient utilization and allocation of server resources. By segregating databases into separate instances, administrators can allocate resources such as CPU, memory, and disk I/O according to the specific requirements of each instance. This ensures optimal performance and prevents resource contention between different databases.
- Version and Patching Flexibility: Instances allow flexibility in managing different versions and patch levels of SQL Server. Organizations may have multiple applications or databases that rely on specific SQL Server versions or require different patch levels due to compatibility or stability reasons. Instances provide a means to maintain and manage these diverse environments effectively.
- Application and Service Isolation: Instances enable the isolation of applications or services that rely on SQL Server. By deploying different instances for different applications or services, administrators can ensure that changes or issues in one application or service do not affect others. This isolation enhances the stability and reliability of applications and services running on SQL Server.
- Scalability and Performance: Instances offer scalability options to handle growing database workloads. Administrators can add additional instances or distribute databases across multiple instances to distribute the load and improve performance. This scalability approach allows organizations to accommodate increased data volumes, user concurrency, and processing requirements.
- High Availability and Disaster Recovery: Instances are instrumental in implementing high availability and disaster recovery solutions. Organizations can configure instances as primary and secondary replicas in an availability group or configure database mirroring between instances. This ensures continuous availability of critical databases and minimizes downtime in the event of a failure.
- Application Testing and Development: Instances provide a dedicated environment for application testing and development. Developers can have separate instances to work on new features, test database changes, or experiment without affecting the production environment. This isolation facilitates a controlled and independent testing and development process.
Operation and SQL Server Architecture
We have two types of servers such as the OLTP server(OnLine Transactional Processing) which allows us to write transactional queries(exemple: SELECT “colonne1, colonne2 …, n” FROM “table” WHERE “condition1, condition2,. ., n)on the one hand and on the other hand we have the OLAP server (OnLine Analytical Processing) which a decisional server or a Datawarehouse. In other words, it’s thanks to the OLAP serevr it can be possible to make business intelligence(create multidimensional cubes,make report…)
MS SQL Server contains several software that run as services or have graphical interfaces or are accessible through a command line. MS SQL Server is composed of 5 main services such as:
- TSQL SERVER : It’s the database engine service that corresponds to a SQL Server instance. This component runs as a Windows service and is named as MSSQLSERVER for a default instance and MSSQLSERVER$instanceName for a named instance. An instance name is defined when installing a new instance
- SSIS (Sql Server Integration Service) : It’s the tool for Importing and exporting data,transfering and transforming data.It includes wizards for creating ETL (Extraction Transformation Loading).
- SSAS(Sql Server Analysis Service) : It’s the right component for making decisional projects. This component is an OLAP analysis tool and Microsoft’s Data Mining tool for building OLAP Cube.
- SSRS (Sql Server Reporting Service) : It’s thanks to this component it possible to return our data coming from our Datawarehouse in a form report (table, chart etc …), dashboard, on various support and easily understood by third persons.This component also makes it possible to create interactive, tabular, graphical reports from XML, relational, or multidimensional data sources
- Agent SQL :In charge of SQL Serve monitoring, this component also manages the execution of scheduled tasks and the monitoring of alerts. It runs as a Windows service and is directly linked to a SQL Server instance. It is referenced by default in the Windows Service Manager as SQL Server Agent and by SQL Server Agent (instance name) in the case of a named instance.
[] To this list of main components we can add others such as:
- Microsoft Full Text Search : Manages the indexing of text documents and word-based searches
- CLR : It permit you to develop stored procedures and functions using C# and VB.NET
- Composant de Replication de données : Allows the data to be positioned closer to the users and to reduce processing times. The replication is the duplication of data from one server to another server for the purpose of spreading the workload between the two server
We can find different tools in MS SQL SERVER such as:
- SQL Server Management Studio to Allow you performing all operations at the Database Engine level
- SQL Server Configuration Manager to Manage All Services Related to SQL Server
- SQL Server Profiler to track and analyze the workload of a SQL Server instance
- The Database Engine Tuning Wizard allows for optimizing the operation of the Database Engine
- The SqlCmd tool is used to execute approved queries, execute Command scripts, establish a dedicated administration connection (DAC)
SQL Server Login Database
SQL Server login database is a simple creadential which is used to access SQL Server.
What is credential?
Credentials are simply a username and a password that you provide your username and password when logging on to Windows or even your e-mail account. This username and password builds up the credentials.
There are four types of logins provided by SQL Server:
- A login based on Windows credentials.
- A login specific to SQL Server.
- A login mapped to a certificate.
- A login mapped to asymmetric key.
Logins based on Windows credentials facilitates you to log in to SQL Server using a Windows username and password. If you want to create your own credentials (username and password,) you can create a login specific to SQL Server.
To create, alter, or remove a SQL Server login, you can take one of two approaches:
- Using SQL Server Management Studio.
- Using T-SQL statements.
Using SQL Server Management Studio
Open SQL Server management studio
Go to Security:
Open Security. You will see “Logins”. Right click on Logins and you will get “New Login”?
It will open a new page:
Here you can set a login name and password.
SQL Server Create Datatabase
In SQL Server, you have to create a database first before creating a table.
Go to SQL Server Management Studio. You will see a Database.
Right click on the databases and you will see new database. Create a new database.
Name your database.
For example:
Create a database “javatpoint”.
You can see that a database is created as “javatpoint”.
MS SQL Server Select Database
SQL Server select database specifies your database in which you want to create your table and further operations.
SQL Server Installation Prerequisites
For our SQL Server Installation steps, we will be first downloading the Developer edition
- Click on Download now and the downloading of will start
- • Once downloading is finished, the file will be available in the downloads folder, or in any folder you have specified, as SQLServer2017-SSCI-Dev
SQL Server Installation
- Click on the file SQLServer2017-SSCI-Dev, and you will find a window with three options: Basic, Custom, and Download Media
- Select Custom, as we want the Developer edition, and you will find a path for it below Media Location. You can either retain the default one or you can specify a customized path
- In the snapshot, the default path is retained as is in Media Location
- Once the path is selected, click on Install and the installation begins
- A message appears as Your SQL Server Installation will begin shortly… and you will find a pop-up screen of SQL Server Installation Center
How to Install SQL Server?
- A pop-up window, SQL Server Installation Center, appears and it contains two columns
- Select Installation from the left-side column, and once you select it, you will find multiple options on the right-side column
- Select the first option from the right-side column, which is New SQL Server stand-alone installation or add features to an existing installation
- Wait for it to process and you will have a window SQL Server 2017 Setup in which click on Next
- Select Perform a new installation of SQL Server 2017 and click on Next
- Select the free edition from Specify a free edition and click on Next
- Accept the license terms
- The display screen takes you to the features of the SQL Server 2017
- There are many options available, but in this blog we will be selecting Database Engine Services
- Click on Next
- The next setup is the Instance Configuration
- Give the details in Named instance and Instance ID fields and click on Next
- Here in the snapshot, I have given the Name instance as SPARATA and the same appears for the Instance ID
- The Server Configuration screen is displayed in which click on Next
- Now on the screen, you will find two authentication modes
- Windows authentication mode
- Mix Mode
- Select the Mix mode and enter the desired password and confirm the password
- Select the user by clicking on Add Current User, and the current user has been added now
- Click on Next
- Once the Current User is added, the SQL Server is ready to install
- Now, click on Next and the installation process takes place
- Once the installation process is completed, you’re back to SQL Server Installation Center
Now, you will also have to install the SQL Server Management Tools; this tool will help you connect with the database.
- Click on Install SQL Server Management Tools and it will redirect you to Microsoft web page
- Download the latest version of SQL Server Management Studio and you will find the downloaded file in your folder as SSMS-Setup-ENU
- Click on the file and install the studio
- Once the installation is completed, search for Microsoft SQL Server Management Studio
- The SQL Server Management Studio is launched, and you will find a pop up, Connect to Server
- Enter the password which you had entered before with Login as sa and click on Connect
—Microsoft SQL Server 2012 Express is a powerful and reliable free data management system that delivers a rich and reliable data store for lightweight Web Sites and desktop applications. Microsoft SQL Server 2012 is a relational database management system (RDBMS) designed for the enterprise environment. Like its predecessors, SQL Server 2012 comprises a set of programming extensions to enhance the Structured Query Language (SQL), a standard interactive and programming language for getting information from and updating a database.SQL Server 2012’s new features and enhancements include
Always On SQL Server Fail-over Cluster Instances and Availability Groups which provides a set of options to improve database availability, Contained Databases which simplify the moving of databases between instances, new and modified Dynamic Management Views and Functions, programmability enhancements including new spatial features,metadata discovery, sequence objects and the THROW statement, performance enhancements such as Column Store Indexes as well as improvements to OnLine and partition level operations and security enhancements including provisioning during setup, new permissions, improved role management, and default schema assignment for groups.