Upgrade SQL Server 2016 R Service (in-database)

I faced the very same problem (when trying to follow the steps described in Use sqlBindR.exe to Upgrade an Instance of R Services). I could not find any SQLBindR.exe.

A friend of mine pointed out to me, that I had to explicitly install "Microsoft R Server", not as part of the SQL Server install bits and pieces, but as a separate download.

All options about how you can download Microsoft R Server are described in a blog post at MSDN, Run Microsoft R Server for Windows by Heidi Steen.

Download and install was done in some minutes. SQLBindR took some more minutes. Voilá: Now the following script is showing me, what I was looking for. :-)

declare @v varchar(100);
exec sp_execute_external_script @language=N'R'
, @script = N'v <- toString(getRversion())'
, @params = N'@v varchar(100) output'
, @v = @v out;

print @v;

-- returns 3.3.2

SQL Server 2016 CU14 and later will upgrade R Services (in database) to 3.5.2 or later. You can download CU14 here: catalog.update.microsoft.com/....

You will then need to Change the default R language runtime version. This can be done using the C:\Program Files\Microsoft SQL Server\MSSQL13.xx\R_SERVICES.x.x\library\RevoScaleR\rxLibs\x64\RegisterRext.exe command line program. Be sure to use the RegisterRext.exe program in the folder that contains the newest version of R_SERVICES. Here's an example that assumes a default instance of SQL Server is installed and that R_SERVICES is version 3.5:

cd "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\R_SERVICES.3.5\library\RevoScaleR\rxLibs\x64"

.\RegisterRext.exe /configure /rhome:"C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\R_SERVICES.3.5" /instance:MSSQLSERVER

You can also remove the previous runtime version with the /cleanup option.

The tutorial from the Microsoft Documentation also applies to SQL Server 2017 (CU22 and later), for both Python (2017 only) and R.