Microsoft released SQL Server 2016 mid 2016 and with the release came quite a few new features:
- Query Store.
- Temporal tables.
- JSON support.
- Other “cool stuff”.
Among the other “cool stuff” was the introduction of SQL Server 2016 R Services, an in-database analytics engine for processing R script on resident data within a database engine instance.
NOTE: Since the introduction of Microsoft SQL Server 2016 R Services, the functionality has been renamed to Microsoft SQL Server Machine Learning Services. Also, SQL Server 2017 introduced Python as an additional supported language.
At around the same time when SQL Server 2016 was released I had become interested in Data science and R, so SQL Server R Services intrigued me. I decided to try and figure out how the R integration worked, and at the same time - through blog-posts - document what I found out. I started the “journey” in the beginning of 2017 and I thought I might be able to come up with a couple of blog-posts, maybe maximum five or six. Boy was I wrong - over a year and 23 posts later I decided “enough was enough” and wrote the final post.
Table of Content
- Microsoft SQL Server 2016 R Services Installation - Installation of SQL server R Services.
- Microsoft SQL Server R Services - Internals I - What happens in the SQL Server engine when we execute
sp_execute_external_script
. - Microsoft SQL Server R Services - Internals II - We look at what goes on inside the launchpad service when we execute
sp_execute_external_script
. - Microsoft SQL Server R Services - Internals III - Creation of processes in the Launchpad service.
- Microsoft SQL Server R Services - Internals IV - More about process creation in the Launchpad service; number of processes etc.
- Microsoft SQL Server R Services - Internals V - The Launchpad service and RTerm processes in relation to parallelism in SQL Server R Services.
- Microsoft SQL Server R Services - Internals VI - This post looks at the directories created by the Launchpad service in SQL Server R Services when executing an external script.
- Microsoft SQL Server R Services - Internals VII - We look at the files and sub-directories created when we execute
sp_execute_external_script
. - Microsoft SQL Server R Services - Internals VIII - Here we look at some of the components the launchpad service loads;
Rterm.exe
,BxlServer.exe
, etc. - Microsoft SQL Server R Services - Internals IX - We look at SqlSatellite and communication between SQL Server R Services components.
- Microsoft SQL Server R Services - Internals X - In this post we look at how SQL server sends data to the SqlSatellite.
- Microsoft SQL Server R Services - Internals XI - What are the two strange TCP/IP packets SQL Server sends to SqlSatellite?
- Microsoft SQL Server R Services - Internals XII - More about the TCP/IPpackets sent from SQL Server to SqlSatellite.
- Microsoft SQL Server R Services - Internals XIII - In this post we look at when SQL statements are executed when executing external scripts?
- Microsoft SQL Server R Services - Internals XIV - The first post of a couple looking at the Binary eXchange Language (BXL) format.
- Microsoft SQL Server R Services - Internals XV - More about Binary eXchange Language and packet sizes.
- Microsoft SQL Server R Services - Internals XVI - Binary eXchange Language format and data coming back to SQL Server from SqlSatellite.
- Microsoft SQL Server R Services - Internals XVII - We look at what happens inside SQL Server when data is returned from SqlSatellite.
- Microsoft SQL Server R Services - Internals XVIII - A look at how output parameters are handled in SQL Server R Services.
- Microsoft SQL Server R Services - Internals XIX - Here we look at how print statements in the external engine together with ack messages comes back to SQL Server.
- Microsoft SQL Server R Services - Internals XX - This post drills down into how error messages in the external engine is handled by SQL Server.
- Microsoft SQL Server R Services: sp_execute_external_script - I - The first post of three looking at parameters for
sp_execute_external_script
. - Microsoft SQL Server R Services - sp_execute_external_script - II - In this post we look at the
@params
and@parameter1
parameters insp_execute_external_script
. - Microsoft SQL Server R Services: sp_execute_external_script - III - In this final post in the series we look at the
@parallel
and@r_rowsPerRead
parameters, as well as discussing the SQL server Compute Context.