Close menu

SQL/R Installation on Windows

This document contains installation instructions specific to the Windows platform.

Supported Windows versions

SQL/R is available for 64-bit (x64) Windows.

On 32-bit Windows, only the 32-bit SQL/R ODBC drivers can be installed. The SQL/R Server as well as the sqlrexec and Sqlr.DLL client components are not available on 32-bit Windows.

On 64-bit Windows, both the 32-bit and the 64-bit SQL/R ODBC drivers are installed.

Required minimum Windows version:

Installation directory

The default installation directory is: Program Files (x86)\Marxmeier\SQLR\4.0

Installed subdirectories

bin
Binary files and shared libraries

etc
Configuration files
(new SQL/R configuration template files are installed in the newconfig\config subdirectory)

lib
Related files

newconfig\config
New SQL/R configuration template files
(template files are copied to the etc directory if not present, the sqlrodbc.ini ODBC driver configuration file is copied to the Windows directory, %WINDIR%, default: C:\Windows\sqlrodbc.ini)

share
The SQLR.PROG Eloquence example program is installed in the share\example subdirectory. It demonstrates the use of the Sqlr.DLL client component.

System requirements

A default SQL/R installation requires disk space as indicated below:

64-bit Windows (x64)
"C:\Program Files (x86)" less than 3 MB

32-bit Windows (x86)
"C:\Program Files" less than 1 MB (only the 32-bit ODBC drivers are installed)

Note that SQL/R must be installed to a local disk (not a network drive) because some binaries are registered with Windows and may be required even if the network storage is not available.

Prerequisites

SQL/R requires the Microsoft Visual C++ 2015 runtime libraries, available for download on the Marxmeier web site at: https://www.marxmeier.com/download/sqlr/A0400/windows/vc/

vcredist_x86.exe
Microsoft Visual C++ 2015 Redistributable (x86)
Minimum version: 14.0.24210 (Update 3)
Required on any system where SQL/R is installed.
vcredist_x64.exe
Microsoft Visual C++ 2015 Redistributable (x64)
Minimum version: 14.0.24210 (Update 3)
Required in addition on 64-bit Windows if the ODBC driver is installed.

License note

SQL/R A.04.XX requires a license key version A.04.00 or above.

For a new SQL/R installation or when upgrading from SQL/R before version A.04.00 a new license key must be obtained to use the SQL/R Server.

Please use the license web form to obtain a license key.

Updating a previous SQL/R installation

An existing SQL/R installation having the same major version as the version to be installed is replaced. The existing configuration files of the previous SQL/R version are retained.

If an existing SQL/R installation is detected having a major version prior than the version to be installed, the installation program provides two additional options in the Custom Setup dialog which are selected by default:

Migrate previous SQL/R

If selected, the installation program will migrate the existing configuration files of a previous SQL/R version to the new SQL/R version.

A backup copy is created if a migrated configuration file already exists in the SQL/R etc configuration directory.

If the "Uninstall" option below is selected in addition, any migrated configuration file is deleted in the previous SQL/R etc configuration directory.

The previous SQL/R version is not touched if this option is deselected, allowing for parallel installation of the previous and the new SQLR versions.

Uninstall previous SQL/R

If selected, an existing previous SQL/R version is uninstalled.

Installation instructions

To install SQL/R, administrative privileges are required. Windows versions starting with Windows Vista will automatically request administrative privileges.

In the Destination Folder dialog the default installation directory may be confirmed or modified.

In the Custom Setup dialog, the SQL/R component categories may be selectively enabled or disabled for installation.

You may later use the installation program in Modify maintenance mode to modify the selection at any time.

SQL/R ODBC Driver

Selecting this category installs the SQL/R ODBC driver. Both the 32-bit and the 64-bit ODBC drivers are installed. (On 32-bit Windows only the 32-bit ODBC drivers are installed.)

On a parallel installation with a previous SQL/R version, if this option is deselected the ODBC drivers of the previous SQL/R version are retained.

SQL/R Server

Selecting this category installs the SQL/R Server.

On a parallel installation with a previous SQL/R version, if this option is deselected the SQL/R Server of the previous SQL/R version is retained.

SQL/R Client Components

Selecting this category installs the sqlrexec and Sqlr.DLL components.

Migrate previous SQL/R

This option is only available if an existing SQL/R installation is detected having a major version prior than the version to be installed.

If selected, the installation program will migrate the existing configuration files of a previous SQL/R version to the new SQL/R version.

A backup copy is created if a migrated configuration file already exists in the SQL/R etc configuration directory.

If the "Uninstall" option below is selected in addition, any migrated configuration file is deleted in the previous SQL/R etc configuration directory.

The previous SQL/R version is not touched if this option is deselected, allowing for parallel installation of the previous and the new SQLR versions.

If you don't select the "Uninstall" option below, you may later use the "Migrate" option by starting the installation program in Modify maintenance mode. In this case, this option is not selected by default but must be manually enabled.

Uninstall previous SQL/R

This option is only available if an existing SQL/R installation is detected having a major version prior than the version to be installed, and if this is the initial installation (i.e., this option is not available in Modify maintenance mode).

If selected, an existing previous SQL/R version is uninstalled.

This option cannot be selected if the "Migrate" option is deselected.

Accessing SQL/R configuration files

On Windows versions starting with Windows Vista, a local group named "SQLR Administrators" is created which has modify/delete permissions on the SQL/R etc configuration directory and files.

The installing user is automatically made a member of this group.

After the installation has finished, it may be necessary to log off and log on again to activate this new group membership and also to activate the modified PATH environment variable where the SQL/R bin directory was added.

To add other users to the "SQLR Administrators" group:

  1. Open the Computer Management Console

    From the Start Menu, navigate to:
    Control Panel » Administrative Tools » Computer Management

    Alternatively, from the Start Menu, open:
    All Programs » Accessories » Run
    Then enter "compmgmt.msc" and click OK.

  2. In the left pane, choose:
    Local Users and Groups » Groups

  3. In the right pane, locate the "SQLR Administrators" group and open its properties with a doubleclick. The properties dialog allows to change the group's list of members.

Users added to the "SQLR Administrators" group may need to log off and log on again to activate this new group membership.

32-bit and 64-bit ODBC drivers

On 64-bit Windows, choosing to install the SQL/R ODBC driver installs both the 32-bit and the 64-bit ODBC drivers.

The sqlro32.dll (32-bit) and sqlro64.dll (64-bit) ODBC driver DLLs are installed to the SQL/R bin directory.

32-bit programs use the 32-bit ODBC driver. 64-bit programs use the 64-bit ODBC driver.

Please note: 64-bit Windows has separate ODBC control panels for 32-bit and 64-bit ODBC drivers and data sources.

Using multiple SQL/R Server instances

The installation program sets up a default SQL/R Server instance named SQLRODBC. Additional instances may be setup using the sqlrodbcd.exe -install command line option, for example:

sqlrodbcd -install SQLR-SRV1 -c "C:\path\to\odbc.cfg"

This sets up the SQL/R Server instance named SQLR-SRV1.

As shown in the example, the -c command line option is used to specify an instance-specific configuration file. This command line is saved to be used whenever this instance is started.

This can also be configured using the Windows Services control panel.

On a parallel installation with a previous SQL/R version, sqlrodbcd.exe should be invoked using an absolute path to ensure that the intended SQL/R Server version is used. For example:

"C:\Program Files (x86)\Marxmeier\SQLR\4.0\bin\sqlrodbcd" -install ...

To remove an instance, the sqlrodbcd.exe -remove command line option may be used. For example:

sqlrodbcd -remove SQLR-SRV1

If the instance name is omitted, the SQLRODBC default instance name is used. For example, to remove the SQLRODBC default instance:

sqlrodbcd -remove

Configuring the SQL/R Server service

The SQL/R Server service is configured using the Windows Services control panel.

From the Start Menu, navigate to:
Control Panel » Administrative Tools » Services

Alternatively, from the Start Menu, open:
All Programs » Accessories » Run
Then enter "services.msc" and click OK.

Select the entry in the list matching the name of the SQL/R Server instance to be configured. The name of the default instance is SQLRODBC. Open its Properties dialog, either from the menu or using the context menu (right mouse button):

Along with the Startup Options, additional arguments for the SQL/R Server may be specified. This is typically required for additional SQL/R Server instances.

Supported arguments are:

Option Description Equiv.*
-c name Specifies the location of the odbc.cfg configuration file used for this SQL/R Server instance.
If omitted, the default odbc.cfg file in the SQL/R installation directory is used.
 
-d flags Specifies the SQL/R Server debugging log flags. LogFlags
-l name Specifies the SQL/R Server log file. LogFile
-s name The service name (as defined in the SERVICES file) or the port number where the SQL/R Server should listen for requests. The default value is sqlrodbc. Service
-h name To enable the HTTP status display feature of the SQL/R Server this option may be used to specify the service name or port number where the SQL/R Server should listen for HTTP requests. HttpService
(* equivalent configuration file directive)

For example, to specify an instance-specific configuration file you could enter the following into the Startup Parameters field:

-c "C:\path\to\odbc.cfg"

Please note: The Startup Parameters are persistently saved when the Start button is clicked. To reset, clear the Startup Parameters, then restart the SQL/R Server.

At this point, everything is configured and the SQL/R Server can be started:

Unless a log file is specified, the SQL/R Server will write log messages to the Windows Event Log. In case the SQL/R Server does not start the Event Log should provide an error message pointing out the cause of the problem.

From the Start Menu, navigate to:
Control Panel » Administrative Tools » Event Viewer

Alternatively, from the Start Menu, open:
All Programs » Accessories » Run
Then enter "eventvwr.msc" and click OK.

In the Event Viewer, select Windows Logs » Application. The SQL/R Server messages are labeled "SQLRODBC" in the Source column.

Starting and stopping the SQL/R Server

The net start and net stop system commands may be used to start and stop the SQL/R Server from the command line.

The SQL/R Server instance name needs to be specified. The name of the default instance is SQLRODBC.

This is equivalent to starting and stopping the SQL/R Server using the Windows Services control panel as explained in the previous section.

For example:

net start SQLRODBC
net start SQLR-SRV1
net stop sqlrodbc
(The service name is not case sensitive.)

The SQL/R Server HTTP status display

When the HttpService is defined in the odbc.cfg configuration file, a web browser may be used to view the configuration and current use of the SQL/R Server process in your network.

To access the SQL/R Server HTTP status, you provide an URL like this:

http://server:port/

where server is the host name or IP address of the system running the SQL/R Server and port is the port number used for HttpService in the odbc.cfg configuration file.

Find an example of these http status pages for SQL/R here.

Automated SQL/R installation (silent install)

SQL/R can be installed silently using the command below:
SQLR-A0400-1-win32.exe /s /v"/q INSTALLLEVEL=100"
The /s command line switch causes a silent installation. The quoting after /v is important.

To silently uninstall, use the /x command line switch:
SQLR-A0400-1-win32.exe /x /s
Available command line options are output with:
SQLR-A0400-1-win32.exe /?
Available MsiExec command line options (as used in double-quotes after the /v command line switch above) are output with:
msiexec /?
Please note that, depending on your operating system version, you may need to install Microsoft Runtime packages in addition (vcredist_x86.exe and/or vcredist_x64.exe).

These are available in the SQL/R download directory. To install silently, use the commands below:

vcredist_x86.exe /install /quiet /norestart
vcredist_x64.exe /install /quiet /norestart
Nothing happens if these packages are already installed. Available command line options are output with:
vcredist_x86.exe /?