The major advantages offered by Microsoft SQL Server R Services include easy scalability and strong security protections. For these reasons, using SQL Server R Services is preferable to running R scripts in your SQL server with a standalone R client.

Here’s how it works.

How R SQL offers robust security.

As discussed in part 1 of this series, the architecture of SQL Server R Services is designed to protect SQL data while R scripts are being run. These features help secure your data while R scripts operate:

  • Launchpad, which creates satellite processes, reduces the total surface area. R processes are isolated when they run, and all R scripts take place outside of the SQL server.
  • The satellite processes themselves have limited privileges. By default, SQL Server R Services installs 20 user accounts with very low user privileges. Whenever a user runs an R script, they are essentially using one of these low privileges account (even if the user has high privileges on Microsoft SQL).
  • Running R scripts requires explicit permissions. The system allows administrators to assign non-administrators permission to run R scripts, but those users do not have full privileges. And all users must have an SQL Server login access to run access—meaning that SQL Server R Services uses the security protections provided by Microsoft SQL Server itself.
  • If the system is idle for a specified period of time, programs will automatically be terminated.
  • The environment is automatically configured to use Windows firewall rules to block potentially dangerous outbound traffic.

How R SQL provides easy scalability.

The SQL Server R Services architecture enables users to run many more R scripts simultaneously and concurrently than would otherwise be possible with standalone R clients. Here are a few comparisons:

  • With a standalone R client, users must transfer all relevant SQL data to a machine before performing an R script. This system is much more efficient, sending an R script to the SQL server without having to go through the onerous process of data transfer.
  • While many R open functions are single threaded, the APIs provided through SQL Server R are designed to become multi-threaded on an SQL Server computer.
  • SQL Server R Services users can stream data in batches or parallel from SQL Server. So instead of having to process data bit by bit, 1000 rows can be processed at the same time. This naturally allows for faster processing of data.

SQL Server R Services operates on the principle that it’s easier and more secure to run R scripts on the server closest to the data. This eliminates the risky, time-consuming process of transferring data between servers and machines, enabling organizations to run more R scripts at a faster pace. With strong support for developing, testing and deploying R scripts, SQL Server R Services gives organizations strategic, data-driven insights, otherwise unattainable.

Contact Ntirety to learn more.