Like any DBMS, SQL Server is useful when combined with a software application that meets a business need such as storing and retrieving customer records, sales transactions, scientific data or credit history. And, as the amount of data increases, so does the usefulness of the data to the business.
SQL Server is generally used as a database in medium-sized companies and large enterprises, where the ability to scale to millions or hundreds of millions of records is important. SQL Server editions range from SQL Server Enterprise, designed with high-end datacenter capabilities, to SQL Server Express, an entry-level database for learning about and building desktop and small applications.
Traditionally, companies have used SQL Server on premises in their own data center. As the computing landscape has evolved, so have options with SQL Server. In the cloud, companies can opt for Azure SQL, a family of managed products: Azure SQL Database, Azure SQL Managed Instance and SQL Server on Azure VMs. For the Internet of Things (IoT) and the network edge, Microsoft offers Azure SQL Edge, the SQL Server database engine in a small footprint with built-in artificial intelligence (AI).
The options allow companies to develop once and deploy in all environments: on premises, in the cloud and in IoT devices at the edge of the network.
As a proprietary RDBMS, SQL Server is subject to licensing fees; it is not free.
Note that Microsoft makes available two specialized, no-cost editions:
The main components of SQL Server include the following:
The most common tools are the management environment for configuring, monitoring and administering databases and the development environment for writing and running SQL code and scripts. For convenience, the environments are usually integrated in a single SQL Server database management tool.
Most database tasks break down into a few categories:
Database programming requires an interface to work with basic elements of the database such as design, configurations, tables, views, queries and indexes. Beyond those basics, DBAs and developers look for advanced functions:
The architecture of SQL Server aligns with the services/components described above.
The Database Engine comprises a relational engine and a storage engine. The relational engine performs the work of parsing queries, then optimizing and executing them. The storage engine manages data access as the query is executed and interacts with the data and log files to process records in tables. SQL Server databases are collections of objects such as user, role, schema, table, index, view and stored procedure.
Analysis Services (SSAS) are structured similarly to databases, with collections of objects such as cube, dimension, measure, mining structures and role.
Reporting Services (SSRS) use the ReportServer to store metadata for each report configuration, including report data sources and definition.
In the context of that architecture, most DBAs are concerned with keeping SQL Server databases optimized, secure and highly available to meet the demands of the business. That means focusing on both the internal and the external factors that affect availability and performance.
Among the biggest internal factors is the quality of the SQL statements and queries running against the database. Since poorly formed SQL makes the database work harder than necessary, DBAs rely on SQL Server performance monitoring and tuning tools. They investigate performance problems by drilling into the most-executed queries and examining the most frequently accessed objects and files, along with disk I/O statistics and wait-events. They analyze and compare execution plans for SQL statements and check usage and contention of the TempDB database.
If performance problems remain after the SQL has been tuned, then DBAs turn to monitoring, diagnosis and optimization of their broader database environment, including virtual machines and the operating system. They run diagnostics on physical resources like CPU utilization, memory usage, disk capacity, network throughput and system uptime. They perform wait stat analysis to see what processes – down to individual statements – are awaiting resources. They examine workloads for bottlenecks and look for deadlocks by host, database, user or SQL statement.
As companies seek to reduce licensing costs and avoid vendor lock-in, the appeal of open-source databases like MySQL becomes stronger. Here are some of the main points of comparison between SQL Server and MySQL.
There are differences in the development capabilities between SQL Server and MySQL. In cases where it is more important to have a solid data store than a fully featured programming environment, many DBAs opt for MySQL.
In general, the decision between proprietary and open-source software depends on more than licensing cost. The traditional advantage of proprietary software is that it is developed and marketed by large companies that maintain product roadmaps, support, security and patching. As going concerns, they have a vested interest in keeping the products safe for their customers.
When opting for open-source products, DBAs and database developers must take into account the state of the community. Can the creator provide long-term development, support and management of the database? How large and devoted is the community? How often do its members and followers add to the code base?
Many companies choose an open-source database to avoid licensing costs. They should keep in mind that, in addition to maintaining their own software, they may end up having to maintain that database – configurations, patches, fixes – as well. The costs of doing so – whether internally or externally – can be on par with licensing proprietary software.