低密度脂蛋白高是什么意思| 香醋是什么醋| 为什么狐臭女很漂亮| 发光免疫是检查什么的| 新型冠状病毒有什么症状| 切口憩室是什么意思| 扁桃体发炎吃什么药效果好| 少叙痣是什么意思| 什么是拉拉| 什么星座黑化最吓人| 什么是黄道吉日| 海南简称是什么| 白细胞计数偏高是什么原因| 儿童测骨龄挂什么科| 清创手术是什么意思| 面瘫吃什么药好| 月经不调是什么原因| 什么的遗产| 林深时见鹿什么意思| 小寨附近有什么好玩的| 为什么会连续两天遗精| 上海五行属什么| 马跟什么相冲| 嗜睡挂什么科| 农历十月初五是什么星座| 好好活着比什么都重要| 心率高是什么原因| 92年出生属什么| 回民不能吃什么| zn是什么元素| r代表什么意思| 甜菊糖苷是什么| 功能是什么意思| 结膜炎什么症状| 殇字是什么意思| 怀孕吃什么宝宝会白| 肾囊肿有什么症状| 小孩办理护照需要什么材料| 女人吃山竹有什么好处| 2000年出生属什么| 上海什么时候解放的| 一个田一个比读什么| 什么是禅定| 焦糖色裤子配什么颜色上衣| 孤臣是什么意思| 诺什么意思| 吃什么帮助消化| 什么的鸟窝| 屈光不正什么意思| 咀嚼什么意思| 精血亏虚吃什么中成药| 杞子配什么增强性功能| 女女叫什么| 女性血常规都检查什么| 鸡爪烧什么好吃| 江郎才尽是什么意思| 为什么会得脚气| 六月属什么生肖| 箨是什么意思| 什么芦荟可以直接擦脸| 不修边幅是什么意思| 舌面上有裂纹是什么病| 左下腹疼挂什么科| 低血糖是什么引起的| 衣食父母什么意思| 层次是什么意思| 普洱茶是属于什么茶| 血象是指什么| 男人右眉毛里有痣代表什么| 水煎是什么意思| 奇异果和猕猴桃有什么区别| 毛豆烧什么好吃| 晋五行属什么| 鱼水之欢是什么意思| 血管堵塞吃什么好疏通| 吃什么解暑| 天德月德是什么意思| 农历十月初八是什么星座| 小样什么意思| 颈椎退变是什么意思| 正常人为什么会低血糖| 坐飞机什么不能带| 为什么会有湿气| 功德是什么意思| 原始鳞状上皮成熟是什么意思| 灰指甲长什么样子图片| 颈椎病看什么科最好| 女的学什么手艺最赚钱| 有什么花| 御是什么意思| 老人脚肿是什么原因引起的| 肌无力有什么症状| 什么来什么去的四字词语| 乳房痛挂什么科| 水瓶座是什么性格| 收心是什么意思| 男人割了皮包什么样子| 圣杯是什么意思| 纳囊是什么| 身体缺镁会有什么症状| 中国最高军衔是什么| 感冒喝什么汤| 嘴唇没有血色是什么原因| 感冒了吃什么饭菜合适| 摆架子是什么意思| 腿部抽筋是什么原因引起的| 黑匣子什么颜色| 扩容是什么意思| 八月一号什么星座| 优思明是什么| 鼠的五行属什么| 石榴石是什么材质| 水肿吃什么药消肿最快最有效| 梦到水是什么意思| 消炎药都有什么| 什么时候长智齿| 深海鱼油有什么功效| 被蜈蚣咬了用什么药| 小孩手指脱皮是什么原因| 鼻尖疼是什么原因| 司长是什么级别的官| 糖化是什么意思| 3月7号什么星座| 罢黜百家独尊儒术是什么意思| 西瓜配什么榨汁好喝| 什么血型最招蚊子| 宫腔少量积液是什么意思| 抑郁症是什么意思| 双子座是什么性格| 224是什么星座| 三个小是什么字| 粉尘螨是什么| 殉葬是什么意思| 葫芦为什么会苦| 十里八乡什么意思| 血糖高能吃什么水果| 头皮疼是什么原因引起的| 左眉毛跳是什么预兆| 白塞氏病是什么病| furk是什么意思| 办护照需要什么证件| 品相是什么意思| 百合吃了有什么好处| 痛风可以喝什么酒| 琮字五行属什么| 三叉神经痛吃什么药效果最好| 尿蛋白高是什么原因| 腥辣食物指的是什么| 怀孕什么时候有反应| 北阳台适合种什么植物| 身体缺钾会有什么症状| 拉比是什么意思| 茄子与什么相克| 三句半是什么意思| pre是什么的缩写| 枸橼酸西地那非片是什么药| 梦见花开是什么预兆| 水杯用什么材质的好| 嘴发苦是什么原因| 淞字五行属什么| 绿萝叶子发黄是什么原因| 来姨妈可以吃什么水果| 什么是三级片| 吃中药喝酒有什么影响| 不自爱是什么意思| 嘴唇发白是什么原因| 什么是冰种翡翠| 为什么女的会流水怎么回事| 什么人不适合吃榴莲| 十月份是什么星座的| 女人吃什么| 花心是什么意思| 口唇发绀是什么意思| 胆红素三个指标都高是什么原因| 冬眠是什么意思| 证明是什么意思| 蜻蜓吃什么食物| 9号来的月经什么时候是排卵期| 梦到孩子死了是什么征兆| 数不胜数的胜是什么意思| 儿保挂什么科| 高血脂不能吃什么| 血压高吃什么| 不丹为什么不跟中国建交| 宫颈hsil是什么意思| 和尚化缘的碗叫什么| 1069是什么意思| 表面活性剂是什么| 人为什么会有狐臭| 戴银饰变黑是什么原因| 吃什么可以散结节| 装修都包括什么| 晚上9点是什么时辰| 过敏性鼻炎用什么药效果好| 突然抽搐失去意识是什么原因| 偏左偏右是什么意思| 孕妇吃鸽子蛋对胎儿有什么好处| 炎症吃什么药| 梦见自己和别人吵架是什么意思| 脑血栓是什么意思| 肝血管瘤是什么病| 脾与什么相表里| 十月份什么星座| 误人子弟什么意思| 巡警是做什么的| 葫芦是什么生肖| 咨询什么意思| 痛经喝什么能缓解| 什么的身影| 用什么泡脚减肥最快| 日加立念什么| 为什么耳鸣| 梦见很多人是什么意思| 咳嗽有白痰一直不好是什么原因| 金樱子配什么才壮阳| 中风是什么原因引起的| 隐形眼镜护理液可以用什么代替| 爱而不得是什么感觉| 胎儿肠管扩张是什么原因造成的| 睾丸炎吃什么药好得快| 春天是什么颜色的| 什么颜色防晒效果好| 病历是什么| 黄色裤子配什么上衣好看| 飞蚊症是什么原因造成的能治愈吗| 48年属什么生肖| 123是什么意思| 腰间盘突出吃什么药好| 低钾有什么症状和危害| 五行大林木是什么意思| 甲钴胺治什么病| 以貌取人是什么意思| 病理报告是什么意思| 向日葵代表什么生肖| 什么含钾最多| 罗汉果泡水有什么好处| 月亏念什么| 西罗手表什么档次| 户名是什么| 乳腺囊性增生是什么意思| 归脾丸治什么病| 面线是什么| 飞机杯有什么用| tc是什么| 月亮星座是什么意思| 嬴稷和嬴政是什么关系| 梦见绿豆是什么意思| 疝气有什么症状| 2017年属什么| 扁桃体挂什么科| 杯酒释兵权是什么意思| 吃酒是什么意思| 鞋履是什么意思| 睡觉流口水是什么原因| 下葬下雨是什么兆头| 护佑是什么意思| 二建什么时候考试| 什么是龟头炎| 做蹲起有什么好处| 知了吃什么| 美尼尔眩晕症吃什么药| 6月27号是什么星座| 什么是负数| 循序渐进什么意思| 百度

2017-04-18 14:00:50 NBA 季后赛首轮G2 灰熊vs马刺

百度 解放军中将何雷17日受访表示,台湾问题是中美关系的政治基础,也是中国对外关系的底线,不能触碰。

Microsoft SQL Server is a proprietary relational database management system developed by Microsoft using Structured Query Language (SQL, often pronounced "sequel"). As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network (including the Internet). Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users.

Microsoft SQL Server
Developer(s)Microsoft
Initial releaseApril?24, 1989; 36 years ago?(2025-08-07), as SQL Server 1.0
Stable release
SQL Server 2022[1]?Edit this on Wikidata (CU18 16.0.4185.3)[2] / 16 November 2022; 2 years ago?(16 November 2022)
Written inC, C++[3]
Operating systemLinux, Microsoft Windows Server, Microsoft Windows
Available inEnglish, Chinese, French, German, Italian, Japanese, Korean, Portuguese (Brazil), Russian, Spanish and Indonesian[4]
TypeRelational database management system
LicenseProprietary software
Websitewww.microsoft.com/sql-server

History

edit

The history of Microsoft SQL Server begins with the first Microsoft SQL Server product—SQL Server 1.0, a 16-bit server for the OS/2 operating system in 1989—and extends to the current day. Its name is entirely descriptive, it being server software that responds to queries in the SQL language.

Milestones

edit
  • MS SQL Server for OS/2 began as a project to port Sybase SQL Server onto OS/2 in 1989, by Sybase, Ashton-Tate, and Microsoft.
  • SQL Server 4.2 for NT is released in 1993, marking the entry onto Windows NT.
  • SQL Server 6.0 is released in 1995, marking the end of collaboration with Sybase; Sybase would continue developing their own variant of SQL Server, Sybase Adaptive Server Enterprise, independently of Microsoft.
  • SQL Server 7.0 is released in 1998, marking the conversion of the source code from C to C++.
  • SQL Server 2000, released in 2000. SQL Server 2000 SQL Server 8 SQL Server 8.0 codename Shiloh Release date: 2025-08-07.
  • SQL Server 2005, released in 2005, finishes the complete revision of the old Sybase code into Microsoft code.
  • SQL Server 2008, released in 2008, supports hierarchical data, adds FILESTREAM and SPATIAL data types.
  • SQL Server 2012, released in 2012, adds columnar in-memory storage aka xVelocity.
  • SQL Server 2017, released in 2017, adds Linux support for these Linux platforms: Red Hat Enterprise Linux, SUSE Linux Enterprise Server, Ubuntu & Docker Engine.[5]
  • SQL Server 2019, released in 2019, adds Big Data Clusters, enhancements to the "Intelligent Database", enhanced monitoring features, updated developer experience, and updates/enhancements for Linux based installations.[6]
  • SQL Server 2022, released in 2022.

Currently

edit

As of January?2025, the following versions are supported by Microsoft:[7]

  • SQL Server 2016
  • SQL Server 2017
  • SQL Server 2019
  • SQL Server 2022


From SQL Server 2016 onward, the product is supported on x64 processors only and must have 1.4?GHz processor as a minimum, 2.0?GHz or faster is recommended.[8]

The current version is Microsoft SQL Server 2022, released November 16, 2022. The RTM version is 16.0.1000.6.[9]

Editions

edit

Microsoft makes SQL Server available in multiple editions, with different feature sets and targeting different users. These editions are:[10][11]

Mainstream editions

edit
Enterprise
SQL Server Enterprise Edition includes both the core database engine and add-on services, with a range of tools for creating and managing a SQL Server cluster. It can manage databases as large as 524 petabytes and address 12 terabytes of memory and supports 640 logical processors (CPU cores).[12]
Standard
SQL Server Standard edition includes the core database engine, along with the stand-alone services. It differs from Enterprise edition in that it supports fewer active instances (number of nodes in a cluster) and does not include some high-availability functions such as hot-add memory (allowing memory to be added while the server is still running), and parallel indexes.
Web
SQL Server Web Edition is a low-TCO option for Web hosting.
Business intelligence
Introduced in SQL Server 2012 and focusing on Self Service and Corporate Business Intelligence. It includes the Standard Edition capabilities and Business Intelligence tools: Power Pivot, Power View, the BI Semantic Model, Master Data Services, Data Quality Services and xVelocity in-memory analytics.[13]
Workgroup
SQL Server Workgroup Edition includes the core database functionality but does not include the additional services. Note that this edition has been retired in SQL Server 2012.[14]
Express
SQL Server Express Edition is a scaled down, free edition of SQL Server, which includes the core database engine. While there are no limitations on the number of databases or users supported, it is limited to using one processor, 1?GB memory and 10?GB database files (4?GB database files prior to SQL Server Express 2008 R2).[15] It is intended as a replacement for MSDE. Two additional editions provide a superset of features not in the original Express Edition. The first is SQL Server Express with Tools, which includes SQL Server Management Studio Basic. SQL Server Express with Advanced Services adds full-text search capability and reporting services.[16]

Specialized editions

edit
Azure
Microsoft Azure SQL Database is the cloud-based version of Microsoft SQL Server, presented as a platform as a service offering on Microsoft Azure.
Azure MPP
Azure SQL Data Warehouse is the cloud-based version of Microsoft SQL Server in a MPP (massively parallel processing) architecture for analytics workloads, presented as a platform as a service offering on Microsoft Azure.
Compact (SQL CE)
The compact edition is an embedded database engine. Unlike the other editions of SQL Server, the SQL CE engine is based on SQL Mobile (initially designed for use with hand-held devices) and does not share the same binaries. Due to its small size (1?MB DLL footprint), it has a markedly reduced feature set compared to the other editions. For example, it supports a subset of the standard data types, does not support stored procedures or Views or multiple-statement batches (among other limitations). It is limited to 4?GB maximum database size and cannot be run as a Windows service, Compact Edition must be hosted by the application using it. The 3.5 version includes support for ADO.NET Synchronization Services. SQL CE does not support ODBC connectivity, unlike SQL Server proper.
Developer
SQL Server Developer Edition includes the same features as SQL Server Enterprise Edition, but is limited by the license to be only used as a development and test system, and not as production server. Starting early 2016, Microsoft made this edition free of charge to the public.[17]
Embedded (SSEE)
SQL Server 2005 Embedded Edition is a specially configured named instance of the SQL Server Express database engine which can be accessed only by certain Windows Services.
Evaluation
SQL Server Evaluation Edition, also known as the Trial Edition, has all the features of the Enterprise Edition, but is limited to 180 days, after which the tools will continue to run, but the server services will stop.[18]
Fast Track
SQL Server Fast Track is specifically for enterprise-scale data warehousing storage and business intelligence processing, and runs on reference-architecture hardware that is optimized for Fast Track.[19]
LocalDB
Introduced in SQL Server Express 2012, LocalDB is a minimal, on-demand, version of SQL Server that is designed for application developers.[20] It can also be used as an embedded database.[21]
Analytics Platform System (APS)
Formerly Parallel Data Warehouse (PDW) A massively parallel processing (MPP) SQL Server appliance optimized for large-scale data warehousing such as hundreds of terabytes.[22]
Datawarehouse Appliance Edition
Pre-installed and configured as part of an appliance in partnership with Dell & HP base on the Fast Track architecture. This edition does not include SQL Server Integration Services, Analysis Services, or Reporting Services. SQLCMD

Discontinued editions

edit
Microsoft Data Engine
Version 1.0 is based on SQL Server version 7.0.[23] Afterwards, it was replaced by Microsoft SQL Server Data Engine.
Microsoft SQL Server Data Engine
Also called Desktop Engine, Desktop Edition, it is based on SQL Server 2000. Included with some versions of Microsoft Access, Microsoft development tools, and other editions of SQL Server.[24] Intended for use with those management and development tools, it did not include any other GUI. Later, Microsoft also made available a web admin tool. After SQL Server 2000, it was replaced by SQL Server 2005 Express Edition.
Personal Edition
SQL Server 2000. Had workload or connection limits like MSDE, but no database size limit. Includes standard management tools. Intended for use as a mobile / disconnected proxy, licensed for use with SQL Server 2000 Standard edition.[24] Similar to Standard Edition in SQL Server 2000, but Full-Text Search not working in Windows 98, transactional replication limited to subscriber.[25]
Datacenter
SQL Server 2008 R2 Datacenter is a full-featured edition of SQL Server and is designed for datacenters that need high levels of application support and scalability. It supports 256 logical processors and virtually unlimited memory and comes with StreamInsight Premium edition.[26] The Datacenter edition has been retired in SQL Server 2012; all of its features are available in SQL Server 2012 Enterprise Edition.[14]
Windows CE Edition
Introduced in SQL Server 2000,[27] and was replaced by SQL Server 2005 Mobile Edition.
SQL Server 2005 Mobile Edition
Replaced by SQL Server 2005 Compact Edition after 1 release.
SQL Server 2005 Compact Edition
Replaced by SQL Server Compact 3.5 after 1 release.

Supplemental packages

edit

Tools published by Microsoft include:

  • SQL Server 2000:
  • Samples:[28] Northwind and pubs Sample Databases, Updated Samples for SQL Server 2000.
  • Tools: Stress Testing and Performance Analysis tools (Read80Trace and OSTRESS), PSSDIAG Data Collection Utility, Notification services (up to service pack 1), Security Tools, Best Practices Analyzer 1.0, Reporting Services (up to Service Pack 2), Reporting Services Report Packs, SQL Server 2000 Driver for JDBC (up to service pack 3), SQLXML 3.0 (up to service pack 3).
  • Documentation:[29] SQL Server 2000 Books Online, SQL Server 2000 System Table Map, Resource Kit, SQL Server 2000 — Getting Started Guide.

Architecture

edit

The protocol layer implements the external interface to SQL Server. All operations that can be invoked on SQL Server are communicated to it via a Microsoft-defined format, called Tabular Data Stream (TDS). TDS is an application layer protocol, used to transfer data between a database server and a client. Initially designed and developed by Sybase Inc. for their Sybase SQL Server relational database engine in 1984, and later by Microsoft in Microsoft SQL Server, TDS packets can be encased in other physical transport dependent protocols, including TCP/IP, named pipes, and shared memory. Consequently, access to SQL Server is available over these protocols. In addition, the SQL Server API is also exposed over web services.[11]

Data storage

edit

Data storage is a database, which is a collection of tables with typed columns. SQL Server supports different data types, including primitive types such as Integer, Float, Decimal, Char (including character strings), Varchar (variable length character strings), binary (for unstructured blobs of data), Text (for textual data) among others. The rounding of floats to integers uses either Symmetric Arithmetic Rounding or Symmetric Round Down (fix) depending on arguments: SELECT Round(2.5, 0) gives 3.

Microsoft SQL Server also allows user-defined composite types (UDTs) to be defined and used. It also makes server statistics available as virtual tables and views (called Dynamic Management Views or DMVs). In addition to tables, a database can also contain other objects including views, stored procedures, indexes and constraints, along with a transaction log. A SQL Server database can contain a maximum of 231 objects, and can span multiple OS-level files with a maximum file size of 260 bytes (1 exabyte).[11] The data in the database are stored in primary data files with an extension .mdf. Secondary data files, identified with a .ndf extension, are used to allow the data of a single database to be spread across more than one file, and optionally across more than one file system. Log files are identified with the .ldf extension.[11]

Storage space allocated to a database is divided into sequentially numbered pages, each 8?KB in size. A page is the basic unit of I/O for SQL Server operations. A page is marked with a 96-byte header which stores metadata about the page including the page number, page type, free space on the page and the ID of the object that owns it. The page type defines the data contained in the page. This data includes: data stored in the database, an index, an allocation map, which holds information about how pages are allocated to tables and indexes; and a change map which holds information about the changes made to other pages since last backup or logging, or contain large data types such as image or text. While a page is the basic unit of an I/O operation, space is actually managed in terms of an extent which consists of 8 pages. A database object can either span all 8 pages in an extent ("uniform extent") or share an extent with up to 7 more objects ("mixed extent"). A row in a database table cannot span more than one page, so is limited to 8?KB in size. However, if the data exceeds 8?KB and the row contains varchar or varbinary data, the data in those columns are moved to a new page (or possibly a sequence of pages, called an allocation unit) and replaced with a pointer to the data.[30]

For physical storage of a table, its rows are divided into a series of partitions (numbered 1 to n). The partition size is user defined; by default all rows are in a single partition. A table is split into multiple partitions in order to spread a database over a computer cluster. Rows in each partition are stored in either B-tree or heap structure. If the table has an associated, clustered index to allow fast retrieval of rows, the rows are stored in-order according to their index values, with a B-tree providing the index. The data is in the leaf node of the leaves, and other nodes storing the index values for the leaf data reachable from the respective nodes. If the index is non-clustered, the rows are not sorted according to the index keys. An indexed view has the same storage structure as an indexed table. A table without a clustered index is stored in an unordered heap structure. However, the table may have non-clustered indices to allow fast retrieval of rows. In some situations the heap structure has performance advantages over the clustered structure. Both heaps and B-trees can span multiple allocation units.[31]

Buffer management

edit

SQL Server buffers pages in RAM to minimize disk I/O. Any 8?KB page can be buffered in-memory, and the set of all pages currently buffered is called the buffer cache. The amount of memory available to SQL Server decides how many pages will be cached in memory. The buffer cache is managed by the Buffer Manager. Either reading from or writing to any page copies it to the buffer cache. Subsequent reads or writes are redirected to the in-memory copy, rather than the on-disc version. The page is updated on the disc by the Buffer Manager only if the in-memory cache has not been referenced for some time. While writing pages back to disc, asynchronous I/O is used whereby the I/O operation is done in a background thread so that other operations do not have to wait for the I/O operation to complete. Each page is written along with its checksum when it is written. When reading the page back, its checksum is computed again and matched with the stored version to ensure the page has not been damaged or tampered with in the meantime.[32]

Concurrency and locking

edit

SQL Server allows multiple clients to use the same database concurrently. As such, it needs to control concurrent access to shared data, to ensure data integrity—when multiple clients update the same data, or clients attempt to read data that is in the process of being changed by another client. SQL Server provides two modes of concurrency control: pessimistic concurrency and optimistic concurrency. When pessimistic concurrency control is being used, SQL Server controls concurrent access by using locks. Locks can be either shared or exclusive. An exclusive lock grants the user exclusive access to the data—no other user can access the data as long as the lock is held. Shared locks are used when some data is being read—multiple users can read from data locked with a shared lock, but not acquire an exclusive lock. The latter would have to wait for all shared locks to be released.

Locks can be applied on different levels of granularity—on entire tables, pages, or even on a per-row basis on tables. For indexes, it can either be on the entire index or on index leaves. The level of granularity to be used is defined on a per-database basis by the database administrator. While a fine-grained locking system allows more users to use the table or index simultaneously, it requires more resources, so it does not automatically yield higher performance. SQL Server also includes two more lightweight mutual exclusion solutions—latches and spinlocks—which are less robust than locks but are less resource intensive. SQL Server uses them for DMVs and other resources that are usually not busy. SQL Server also monitors all worker threads that acquire locks to ensure that they do not end up in deadlocks—in case they do, SQL Server takes remedial measures, which in many cases are to kill one of the threads entangled in a deadlock and roll back the transaction it started.[11] To implement locking, SQL Server contains the Lock Manager. The Lock Manager maintains an in-memory table that manages the database objects and locks, if any, on them along with other metadata about the lock. Access to any shared object is mediated by the lock manager, which either grants access to the resource or blocks it.

SQL Server also provides the optimistic concurrency control mechanism, which is similar to the multiversion concurrency control used in other databases. The mechanism allows a new version of a row to be created whenever the row is updated, as opposed to overwriting the row, i.e., a row is additionally identified by the ID of the transaction that created the version of the row. Both the old as well as the new versions of the row are stored and maintained, though the old versions are moved out of the database into a system database identified as Tempdb. When a row is in the process of being updated, any other requests are not blocked (unlike locking) but are executed on the older version of the row. If the other request is an update statement, it will result in two different versions of the rows—both of them will be stored by the database, identified by their respective transaction IDs.[11]

Data retrieval and programmability

edit

The main mode of retrieving data from a SQL Server database is querying for it. The query is expressed using a variant of SQL called T-SQL, a dialect Microsoft SQL Server shares with Sybase SQL Server due to its legacy. The query declaratively specifies what is to be retrieved. It is processed by the query processor, which figures out the sequence of steps that will be necessary to retrieve the requested data. The sequence of actions necessary to execute a query is called a query plan. There might be multiple ways to process the same query. For example, for a query that contains a join statement and a select statement, executing join on both the tables and then executing select on the results would give the same result as selecting from each table and then executing the join, but result in different execution plans. In such case, SQL Server chooses the plan that is expected to yield the results in the shortest possible time. This is called query optimization and is performed by the query processor itself.[11]

SQL Server includes a cost-based query optimizer which tries to optimize on the cost, in terms of the resources it will take to execute the query. Given a query, then the query optimizer looks at the database schema, the database statistics and the system load at that time. It then decides which sequence to access the tables referred in the query, which sequence to execute the operations and what access method to be used to access the tables. For example, if the table has an associated index, whether the index should be used or not: if the index is on a column which is not unique for most of the columns (low "selectivity"), it might not be worthwhile to use the index to access the data. Finally, it decides whether to execute the query concurrently or not. While a concurrent execution is more costly in terms of total processor time, because the execution is actually split to different processors might mean it will execute faster. Once a query plan is generated for a query, it is temporarily cached. For further invocations of the same query, the cached plan is used. Unused plans are discarded after some time.[11][33]

SQL Server also allows stored procedures to be defined. Stored procedures are parameterized T-SQL queries, that are stored in the server itself (and not issued by the client application as is the case with general queries). Stored procedures can accept values sent by the client as input parameters, and send back results as output parameters. They can call defined functions, and other stored procedures, including the same stored procedure (up to a set number of times). They can be selectively provided access to. Unlike other queries, stored procedures have an associated name, which is used at runtime to resolve into the actual queries. Also because the code need not be sent from the client every time (as it can be accessed by name), it reduces network traffic and somewhat improves performance.[34] Execution plans for stored procedures are also cached as necessary.

T-SQL

edit

T-SQL (Transact-SQL) is Microsoft's proprietary procedural language extension for SQL Server. It provides REPL (Read-Eval-Print-Loop) instructions that extend standard SQL's instruction set for Data Manipulation (DML) and Data Definition (DDL) instructions, including SQL Server-specific settings, security and database statistics management.

It exposes keywords for the operations that can be performed on SQL Server, including creating and altering database schemas, entering and editing data in the database as well as monitoring and managing the server itself. Client applications that consume data or manage the server will leverage SQL Server functionality by sending T-SQL queries and statements which are then processed by the server and results (or errors) returned to the client application. For this it exposes read-only tables from which server statistics can be read. Management functionality is exposed via system-defined stored procedures which can be invoked from T-SQL queries to perform the management operation. It is also possible to create linked Servers using T-SQL. Linked servers allow a single query to process operations performed on multiple servers.[35]

SQL Server Native Client (a.k.a. SNAC)

edit

SQL Server Native Client is the native client side data access library for Microsoft SQL Server, version 2005 onwards. It natively implements support for the SQL Server features including the Tabular Data Stream implementation, support for mirrored SQL Server databases, full support for all data types supported by SQL Server, asynchronous operations, query notifications, encryption support, as well as receiving multiple result sets in a single database session. SQL Server Native Client is used under the hood by SQL Server plug-ins for other data access technologies, including ADO or OLE DB. The SQL Server Native Client can also be directly used, bypassing the generic data access layers.[36]

On November 28, 2011, a preview release of the SQL Server ODBC driver for Linux was released.[37]

SQL CLR

edit

Microsoft SQL Server 2005 includes a component named SQL CLR ("Common Language Runtime") via which it integrates with .NET Framework. Unlike most other applications that use .NET Framework, SQL Server itself hosts the .NET Framework runtime, i.e., memory, threading and resource management requirements of .NET Framework are satisfied by SQLOS itself, rather than the underlying Windows operating system. SQLOS provides deadlock detection and resolution services for .NET code as well. With SQL CLR, stored procedures and triggers can be written in any managed .NET language, including C# and VB.NET. Managed code can also be used to define UDT's (user defined types), which can persist in the database. Managed code is compiled to CLI assemblies and after being verified for type safety, registered at the database. After that, they can be invoked like any other procedure.[38] However, only a subset of the Base Class Library is available, when running code under SQL CLR. Most APIs relating to user interface functionality are not available.[38]

When writing code for SQL CLR, data stored in SQL Server databases can be accessed using the ADO.NET APIs like any other managed application that accesses SQL Server data. However, doing that creates a new database session, different from the one in which the code is executing. To avoid this, SQL Server provides some enhancements to the ADO.NET provider that allows the connection to be redirected to the same session which already hosts the running code. Such connections are called context connections and are set by setting context connection parameter to true in the connection string. SQL Server also provides several other enhancements to the ADO.NET API, including classes to work with tabular data or a single row of data as well as classes to work with internal metadata about the data stored in the database. It also provides access to the XML features in SQL Server, including XQuery support. These enhancements are also available in T-SQL Procedures in consequence of the introduction of the new XML Datatype (query, value, nodes functions).[39]

Service

edit

SQL Server also includes an assortment of add-on services. While these are not essential for the operation of the database system, they provide value added services on top of the core database management system. These services either run as a part of some SQL Server component or out-of-process as Windows Service and presents their own API to control and interact with them.

Machine Learning Services

edit

The SQL Server Machine Learning services operates within the SQL server instance, allowing people to do machine learning and data analytics without having to send data across the network or be limited by the memory of their own computers. The services come with Microsoft's R and Python distributions that contain commonly used packages for data science, along with some proprietary packages (e.g. revoscalepy, RevoScaleR, microsoftml) that can be used to create machine models at scale.

Analysts can either configure their client machine to connect to a remote SQL server and push the script executions to it, or they can run a R or Python scripts as an external script inside a T-SQL query. The trained machine learning model can be stored inside a database and used for scoring.[40]

Service Broker

edit

Used inside an instance, programming environment. For cross-instance applications, Service Broker communicates over TCP/IP and allows the different components to be synchronized, via exchange of messages. The Service Broker, which runs as a part of the database engine, provides a reliable messaging and message queuing platform for SQL Server applications.[41]

Service broker services consists of the following parts:[42]

  • message types
  • contracts
  • queues
  • service programs
  • routes

The message type defines the data format used for the message. This can be an XML object, plain text or binary data, as well as a null message body for notifications. The contract defines which messages are used in an conversation between services and who can put messages in the queue. The queue acts as storage provider for the messages. They are internally implemented as tables by SQL Server, but do not support insert, update, or delete functionality. The service program receives and processes service broker messages. Usually the service program is implemented as stored procedure or CLR application. Routes are network addresses where the service broker is located on the network.[42]

Also, service broker supports security features like network authentication (using NTLM, Kerberos, or authorization certificates), integrity checking, and message encryption.[42]

Replication Services

edit

SQL Server Replication Services are used by SQL Server to replicate and synchronize database objects, either in entirety or a subset of the objects present, across replication agents, which might be other database servers across the network, or database caches on the client side. Replication Services follows a publisher/subscriber model, i.e., the changes are sent out by one database server ("publisher") and are received by others ("subscribers"). SQL Server supports three different types of replication:[43]

Transaction replication
Each transaction made to the publisher database (master database) is synced out to subscribers, who update their databases with the transaction. Transactional replication synchronizes databases in near real time.[44]
Merge replication
Changes made at both the publisher and subscriber databases are tracked, and periodically the changes are synchronized bi-directionally between the publisher and the subscribers. If the same data has been modified differently in both the publisher and the subscriber databases, synchronization will result in a conflict which has to be resolved, either manually or by using pre-defined policies.Rowguid needs to be configured on a column if merge replication is configured.[45]
Snapshot replication
Snapshot replication publishes a copy of the entire database (the then-snapshot of the data) and replicates out to the subscribers. Further changes to the snapshot are not tracked.[46]

Analysis Services

edit

SQL Server Analysis Services (SSAS) adds OLAP and data mining capabilities for SQL Server databases. The OLAP engine supports MOLAP, ROLAP and HOLAP storage modes for data. Analysis Services supports the XML for Analysis standard as the underlying communication protocol. The cube data can be accessed using MDX and LINQ[47] queries.[48] Data mining specific functionality is exposed via the DMX query language. Analysis Services includes various algorithms—Decision trees, clustering algorithm, Naive Bayes algorithm, time series analysis, sequence clustering algorithm, linear and logistic regression analysis, and neural networks—for use in data mining.[49]

Reporting Services

edit

SQL Server Reporting Services (SSRS) is a report generation environment for data gathered from SQL Server databases. It is administered via a web interface. Reporting services features a web services interface to support the development of custom reporting applications. Reports are created as RDL files.[50]

Reports can be designed using recent versions of Microsoft Visual Studio (Visual Studio.NET 2003, 2005, and 2008)[51] with Business Intelligence Development Studio, installed or with the included Report Builder. Once created, RDL files can be rendered in a variety of formats,[52][53] including Excel, PDF, CSV, XML, BMP, EMF, GIF, JPEG, PNG, and TIFF,[54] and HTML Web Archive.

Notification Services

edit

Originally introduced as a post-release add-on for SQL Server 2000,[55] Notification Services was bundled as part of the Microsoft SQL Server platform for the first and only time with SQL Server 2005.[56][57] SQL Server Notification Services is a mechanism for generating data-driven notifications, which are sent to Notification Services subscribers. A subscriber registers for a specific event or transaction (which is registered on the database server as a trigger); when the event occurs, Notification Services can use one of three methods to send a message to the subscriber informing about the occurrence of the event. These methods include SMTP, SOAP, or by writing to a file in the filesystem.[58] Notification Services was discontinued by Microsoft with the release of SQL Server 2008 in August 2008, and is no longer an officially supported component of the SQL Server database platform.

Integration Services

edit

SQL Server Integration Services (SSIS) provides ETL capabilities for SQL Server for data import, data integration and data warehousing needs. Integration Services includes GUI tools to build workflows such as extracting data from various sources, querying data, transforming data—including aggregation, de-duplication, de-/normalization and merging of data—and then exporting the transformed data into destination databases or files.[59]

Full Text Search Service

edit
?
The SQL Server Full Text Search service architecture

SQL Server Full Text Search service is a specialized indexing and querying service for unstructured text stored in SQL Server databases. The full text search index can be created on any column with character based text data. It allows for words to be searched for in the text columns. While it can be performed with the SQL LIKE operator, using SQL Server Full Text Search service can be more efficient. Full allows for inexact matching of the source string, indicated by a Rank value which can range from 0 to 1000—a higher rank means a more accurate match. It also allows linguistic matching ("inflectional search"), i.e., linguistic variants of a word (such as a verb in a different tense) will also be a match for a given word (but with a lower rank than an exact match). Proximity searches are also supported, i.e., if the words searched for do not occur in the sequence they are specified in the query but are near each other, they are also considered a match. T-SQL exposes special operators that can be used to access the FTS capabilities.[60][61]

The Full Text Search engine is divided into two processes: the Filter Daemon process (msftefd.exe) and the Search process (msftesql.exe). These processes interact with the SQL Server. The Search process includes the indexer (that creates the full text indexes) and the full text query processor. The indexer scans through text columns in the database. It can also index through binary columns, and use iFilters to extract meaningful text from the binary blob (for example, when a Microsoft Word document is stored as an unstructured binary file in a database). The iFilters are hosted by the Filter Daemon process. Once the text is extracted, the Filter Daemon process breaks it up into a sequence of words and hands it over to the indexer. The indexer filters out noise words, i.e., words like A, And, etc., which occur frequently and are not useful for search. With the remaining words, an inverted index is created, associating each word with the columns they were found in. SQL Server itself includes a Gatherer component that monitors changes to tables and invokes the indexer in case of updates.[62]

When a full text query is received by the SQL Server query processor, it is handed over to the FTS query processor in the Search process. The FTS query processor breaks up the query into the constituent words, filters out the noise words, and uses an inbuilt thesaurus to find out the linguistic variants for each word. The words are then queried against the inverted index and a rank of their accurateness is computed. The results are returned to the client via the SQL Server process.[62]

SQLCMD

edit

SQLCMD is a command line application that comes with Microsoft SQL Server, and exposes the management features of SQL Server. It allows SQL queries to be written and executed from the command prompt. It can also act as a scripting language to create and run a set of SQL statements as a script. Such scripts are stored as a .sql file, and are used either for management of databases or to create the database schema during the deployment of a database.

SQLCMD was introduced with SQL Server 2005 and has continued through SQL Server versions 2008, 2008 R2, 2012, 2014, 2016 and 2019. Its predecessor for earlier versions was OSQL and ISQL, which were functionally equivalent as it pertains to T-SQL execution, and many of the command line parameters are identical, although SQLCMD adds extra versatility.

Visual Studio

edit

Microsoft Visual Studio includes native support for data programming with Microsoft SQL Server. It can be used to write and debug code to be executed by SQL CLR. It also includes a data designer that can be used to graphically create, view or edit database schemas. Queries can be created either visually or using code. SSMS 2008 onwards, provides intellisense for SQL queries as well.

SQL Server Management Studio

edit

SQL Server Management Studio is a GUI tool included with SQL Server 2005 and later for configuring, managing, and administering all components within Microsoft SQL Server. The tool includes both script editors and graphical tools that work with objects and features of the server.[63] SQL Server Management Studio replaces Enterprise Manager as the primary management interface for Microsoft SQL Server since SQL Server 2005. A version of SQL Server Management Studio is also available for SQL Server Express Edition, for which it is known as SQL Server Management Studio Express (SSMSE).[64]

A central feature of SQL Server Management Studio is the Object Explorer, which allows the user to browse, select, and act upon any of the objects within the server.[65] It can be used to visually observe and analyze query plans and optimize the database performance, among others.[66] SQL Server Management Studio can also be used to create a new database, alter any existing database schema by adding or modifying tables and indexes, or analyze performance. It includes the query windows which provide a GUI based interface to write and execute queries.[11]

Azure Data Studio

edit

Azure Data Studio is a cross platform query editor available as an optional download. The tool allows users to write queries; export query results; commit SQL scripts to Git repositories and perform basic server diagnostics. Azure Data Studio supports Windows, Mac and Linux systems.[67]

It was released to General Availability in September 2018. Prior to release the preview version of the application was known as SQL Server Operations Studio.

Business Intelligence Development Studio

edit

Business Intelligence Development Studio (BIDS) is the IDE from Microsoft used for developing data analysis and Business Intelligence solutions utilizing the Microsoft SQL Server Analysis Services, Reporting Services and Integration Services. It is based on the Microsoft Visual Studio development environment but is customized with the SQL Server services-specific extensions and project types, including tools, controls and projects for reports (using Reporting Services), Cubes and data mining structures (using Analysis Services).[68] For SQL Server 2012 and later, this IDE has been renamed SQL Server Data Tools (SSDT).

See also

edit

References

edit
  1. ^ "Explore SQL Server 2022 capabilities". Retrieved January 6, 2023.
  2. ^ Latest updates and version history for SQL Server
  3. ^ Lextrait, Vincent (July 2010). "The Programming Languages Beacon, v10.3". Archived from the original on May 30, 2012. Retrieved September 5, 2010.
  4. ^ "Download Microsoft SQL Server 2008 R2". Microsoft Evaluation Center. Microsoft Corporation. Retrieved July 18, 2011.
  5. ^ "Installation guidance for SQL Server on Linux". microsoft.com. December 21, 2017. Retrieved February 1, 2018.
  6. ^ "What's new in SQL Server 2019 (15.x)". microsoft.com/. April 6, 2022. Retrieved May 11, 2022.
  7. ^ "SQL Server end of support options". learn.microsoft.com. learn.microsoft.com. January 2, 2025. Retrieved January 18, 2025.
  8. ^ "Requirements for Installing SQL Server 2016". docs.microsoft.com. msdn.microsoft.com. May 2, 2016. Retrieved July 28, 2016.
  9. ^ "SQL Server 2022 release notes". learn.microsoft.com. Retrieved February 14, 2023.
  10. ^ "Compare Editions". SQL Server homepage. Microsoft Corporation. Retrieved December 3, 2007.
  11. ^ a b c d e f g h i Kalen Delaney (2007). Inside Microsoft SQL Server 2005: The Storage Engine. Microsoft Press. ISBN?978-0-7356-2105-3.
  12. ^ "SQL Server 2008: Editions". Microsoft. Retrieved July 21, 2011.
  13. ^ "Database System | Performance & Scalability | SQL Server 2012 Business Intelligence Editions". Microsoft.com. Retrieved June 15, 2013.
  14. ^ a b SQL Server 2012 Licensing Datasheet and FAQ (March 2012)
  15. ^ "SQL Server 2008 R2 Express Database Size Limit Increased to 10GB". Retrieved April 23, 2010.
  16. ^ "What's up with SQL Server 2008 Express editions". Retrieved August 15, 2008.
  17. ^ "Developer Edition". SQL Server home. Microsoft Corporation. Retrieved July 18, 2011.
  18. ^ "SQL Server 2008 Trial Software". Microsoft. Retrieved March 26, 2009.
  19. ^ "Microsoft SQL Server 2008: Fast Track Data Warehouse". Microsoft. Retrieved March 26, 2009.
  20. ^ "SQL Server Express LocalDB". SQL Server. Microsoft Docs. Retrieved August 2, 2021.
  21. ^ "Introducing LocalDB, an improved SQL Express". SQL Server Express WebLog. Microsoft Docs. July 12, 2011. Retrieved August 2, 2021.
  22. ^ "Microsoft Analytics Platform System". Microsoft. Retrieved April 29, 2015.
  23. ^ Choosing an Edition of SQL Server 2000
  24. ^ a b "IT Pro".
  25. ^ Features Supported by the Editions of SQL Server 2000[usurped]
  26. ^ "Choosing a StreamInsight Edition". MSDN. Microsoft Corporation. Retrieved July 18, 2011.
  27. ^ "Chapter 3 - Choosing an Edition of SQL Server 2000". November 1, 2010. Archived from the original on November 1, 2010. Retrieved November 4, 2022.
  28. ^ SQL Server 2000 - Downloads[usurped]
  29. ^ SQL Server 2000 Product Documentation[usurped]
  30. ^ "Pages and Extents". Retrieved December 2, 2007.
  31. ^ "Table and Index Organization". Retrieved December 2, 2007.
  32. ^ "Buffer Management". Retrieved December 2, 2007.
  33. ^ "Single SQL Statement Processing". Retrieved December 3, 2007.
  34. ^ "Stored Procedure Basics". Retrieved December 3, 2007.
  35. ^ "Transact-SQL Reference". Retrieved December 3, 2007.
  36. ^ "Features of SQL Server Native Client". Retrieved December 3, 2007.
  37. ^ "Available Today: Preview Release of the SQL Server ODBC Driver for Linux". SQL Server Team Blog. November 28, 2011. Retrieved June 15, 2013.
  38. ^ a b "Overview of CLR integration". Retrieved December 3, 2007.
  39. ^ "XML Support in SQL Server". Retrieved September 5, 2008.
  40. ^ "What is SQL Server Machine Learning Services". SQL Server homepage. Microsoft Corporation. Retrieved April 10, 2018.
  41. ^ "Introducing Service Broker". Retrieved December 3, 2007.
  42. ^ a b c Klaus Aschenbrenner (2011). "Introducing Service Broker". Pro SQL Server 2008 Service Broker (1st?ed.). Vienna: Apress. pp.?17–31. ISBN?978-1-4302-0865-5. Retrieved December 15, 2019.
  43. ^ "Types of Replication Overview". Retrieved December 3, 2007.
  44. ^ "Transactional Replication Overview". Retrieved December 3, 2007.
  45. ^ "Merge Replication Overview". Retrieved December 3, 2007.
  46. ^ "Snapshot replication Overview". Retrieved December 3, 2007.
  47. ^ "SSAS Entity Framework Provider". Archived from the original on September 29, 2011. Retrieved September 29, 2011.
  48. ^ "Analysis Services Architecture". Retrieved December 3, 2007.
  49. ^ "Data Mining Concepts". Retrieved December 3, 2007.
  50. ^ "SQL Server Reporting Services". Retrieved December 3, 2007.
  51. ^ "Cannot open a SQL Reporting Services .rptproj file | Microsoft Connect". Connect.microsoft.com. Archived from the original on February 3, 2012. Retrieved September 4, 2011.
  52. ^ MSDN Library: Reporting Services Render Method
  53. ^ Device Information Settings
  54. ^ Image Device Information Settings
  55. ^ "An Introduction to SQL Server Notification Services". September 3, 2002. Retrieved November 14, 2008.
  56. ^ "SQL Server Notification Services Removed from SQL Server 2008". Archived from the original on October 16, 2008. Retrieved September 17, 2008.
  57. ^ "Discontinued Functionality in SQL Server 2008 Reporting Services". Retrieved September 17, 2008.
  58. ^ "Introducing SQL Server Notification Services". Retrieved December 3, 2007.
  59. ^ "Integration Services Overview". Retrieved December 3, 2007.
  60. ^ "Introduction to Full-Text Search". November 19, 2007. Retrieved December 3, 2007.
  61. ^ "Querying SQL Server using Full-Text Search". Retrieved December 3, 2007.
  62. ^ a b "Full-Text Search Architecture". Retrieved December 3, 2007.
  63. ^ "MSDN: Introducing SQL Server Management Studio". Msdn.microsoft.com. Retrieved September 4, 2011.
  64. ^ "SQL Server Management Studio Express". Microsoft.com. April 18, 2006. Retrieved September 4, 2011.
  65. ^ "MSDN: Using Object Explorer". Msdn.microsoft.com. Retrieved September 4, 2011.
  66. ^ "SQL Server 2005 Management Tools". Sqlmag.com. July 19, 2005. Retrieved September 4, 2011.
  67. ^ "What is Microsoft SQL Operations Studio (preview)?". docs.microsoft.com. Retrieved January 19, 2018.
  68. ^ "Introducing Business Intelligence Development Studio". Retrieved December 3, 2007.

Further reading

edit
  • Lance Delano, Rajesh George et al. (2005). Wrox's SQL Server 2005 Express Edition Starter Kit (Programmer to Programmer). Microsoft Press. ISBN?0-7645-8923-7.
  • Delaney, Kalen, et al. (2007). Inside SQL Server 2005: Query Tuning and Optimization. Microsoft Press. ISBN?0-7356-2196-9.
  • Ben-Gan, Itzik, et al. (2006). Inside Microsoft SQL Server 2005: T-SQL Programming. Microsoft Press. ISBN?0-7356-2197-7.
  • Klaus Elk (2018). SQL Server with C#. ISBN?1-7203-5867-2.
edit
非赘生性囊肿什么意思 吕布的马叫什么 sv是什么意思 咳嗽可以吃什么水果 眉什么眼什么
过三关 是什么意思 吃毛蛋有什么好处 肛门瘙痒用什么药 脚心痒是什么原因 水钻是什么材质
共建是什么意思 什么美白效果最好最快 口臭挂什么科 见到黑猫代表什么预兆 家是什么生肖
为什么过敏反复发作 为什么会有子宫肌瘤 捭阖是什么意思 皮下出血小红点是什么原因造成的 什么能增强免疫力
正常白带是什么样的dajiketang.com 签证是什么hcv9jop7ns0r.cn 中秋节送什么好hcv8jop5ns8r.cn 子宫肌瘤做什么检查hcv9jop1ns8r.cn 山地自行车什么牌子好hcv9jop7ns1r.cn
葱郁的什么hcv9jop5ns0r.cn 喇蛄和小龙虾什么区别hcv7jop9ns4r.cn 天的反义词是什么hcv9jop7ns3r.cn 别人梦见我死了是什么意思hcv7jop6ns1r.cn 睾丸痒是什么原因hcv7jop5ns1r.cn
扁桃体肥大吃什么药好得快hcv8jop5ns0r.cn 女人右手中指有痣代表什么hcv8jop6ns6r.cn 美国fda认证是什么bjhyzcsm.com 碰到蛇是什么征兆xjhesheng.com 抽血能查出什么qingzhougame.com
才思敏捷是什么意思hcv7jop9ns3r.cn 神经衰弱吃什么药最好0735v.com 超细旦是什么面料zhongyiyatai.com 箔是什么意思hcv9jop0ns5r.cn 肛门痒什么原因hcv9jop0ns6r.cn
百度