You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced-analytics/install/sql-ml-component-commandline-install.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ manager: cgronlun
14
14
15
15
This article provides instructions for intalling SQL Server machine learning components from a command line:
16
16
17
-
+[In-database instance](#indb)
17
+
+[New In-Database instance](#indb)
18
18
+[Add to an existing database engine instance](#add-existing)
19
19
+[Silent install](#silent)
20
-
+[Standalone server](#shared-feature)
20
+
+[New standalone server](#shared-feature)
21
21
22
22
You can specify silent, basic, or full interaction with the Setup user interface. This article supplements [Install SQL Server from the Command Prompt](../../database-engine/install-windows/install-sql-server-from-the-command-prompt.md), covering the parameters unique to R and Python machine learning components.
This article describes how to install new R packages to an instance of SQL Server where machine learning is enabled. There are multiple methods for installing new R packages, depending on which version of SQL Server you have, and whether the server has an internet connection.
17
+
This article describes how to install new R packages to an instance of SQL Server where machine learning is enabled. There are multiple methods for installing new R packages, depending on which version of SQL Server you have, and whether the server has an internet connection. The following approaches for new package installation are possible.
|[Use conventional R package managers](#bkmk_rInstall)| Admin | Local |
22
+
|[Use RevoScaleR](use-revoscaler-to-manage-r-packages.md)| Admin | Local |
23
+
| [Use T-SQL (CREATE EXTERNAL LIBRARY)](install-r-packages-tsql.md) | Admin to setup, database roles afterwards | both
24
+
|[Use a miniCRAN to create a local repository](create-a-local-package-repository-using-minicran.md)| Admin to setup, database roles afterwards | both |
18
25
19
26
## <aname="bkmk_rInstall"></a> Install R packages over an Internet connection
20
27
@@ -74,51 +81,6 @@ This procedure assumes that you have prepared all the packages that you need, in
The [CREATEEXTERNALLIBRARY](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql) statementmakesitpossibletoaddapackageorsetofpackagestoaninstanceoraspecificdatabasewithoutrunningRorPythoncodedirectly.However, thismethodrequirespackagepreparationandadditionaldatabasepermissions.
Ifyoudonothaveaccesstothefilesystemontheserver, youcanalsopassacompletepackageasavariable, usingabinaryformat.Formoreinformation, see [CREATEEXTERNALLIBRARY](../../t-sql/statements/create-external-library-transact-sql.md).
+Youmusthavethenecessarypermissionsonthedatabase.Fordetails, see [CREATEEXTERNALLIBRARY](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql).
This article describes how to install new R packages to an instance of SQL Server where machine learning is enabled. There are multiple approaches to choose from. This approach works best for server administrators who are unfamiliar with R.
The [CREATE EXTERNAL LIBRARY](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql) statement makes it possible to add a package or set of packages to an instance or a specific database without running R or Python code directly. However, this method requires package preparation and additional database permissions.
22
+
23
+
+ All packages must be be available as a local zipped file, rather than downloaded on demand from the internet.
24
+
25
+
+ All dependencies must be identified by name and version, and included in the zip file. The statement fails if required packages are not available, including downstream package dependencies.
26
+
27
+
+ You must have the necessary permissions on the database. For details, see [CREATE EXTERNAL LIBRARY](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql).
28
+
29
+
## Download packages in archive format
30
+
31
+
If you are installing a single package, download the package in zipped format.
32
+
33
+
If the package requires any other packages, you must verify that the required packages are available. You can use miniCRAN to analyze the target package and identify all its dependencies. We recommend using [**miniCRAN**](create-a-local-package-repository-using-minicran.md) or [**igraph**](http://igraph.org/r/) for analyzing packages dependencies. Installing the wrong version of package or package dependency can also cause the statement to fail.
34
+
35
+
## Copy the file to a local folder
36
+
37
+
Copy the zipped file containing all packages to a local folder on the server. If you do not have access to the file system on the server, you can also pass a complete package as a variable, using a binary format. For more information, see [CREATE EXTERNAL LIBRARY](../../t-sql/statements/create-external-library-transact-sql.md).
38
+
39
+
## Run the statement to upload packages
40
+
41
+
Open a **Query** window, using an account with administrative privileges.
42
+
43
+
Run the T-SQL statement `CREATE EXTERNAL LIBRARY` to upload the zipped package collection to the database.
44
+
45
+
For example, the following statement names as the package source a miniCRAN repository containing the **randomForest** package, together with its dependencies.
46
+
47
+
```R
48
+
CREATE EXTERNAL LIBRARY randomForest
49
+
FROM (CONTENT = 'C:\Temp\Rpackages\randomForest_4.6-12.zip')
50
+
WITH (LANGUAGE = 'R');
51
+
```
52
+
53
+
You cannot use an arbitrary name; the external library name must have the same name that you expect to use when loading or calling the package.
54
+
55
+
## Verify package installation
56
+
57
+
If the library is successfully created, you can run the package in SQL Server, by calling it inside a stored procedure.
Copy file name to clipboardExpand all lines: docs/advanced-analytics/r/use-sqlbindr-exe-to-upgrade-an-instance-of-sql-server.md
+30-31Lines changed: 30 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,37 +257,6 @@ Alternatively, this is more work, but you could also fully uninstall and reinsta
257
257
258
258
You might have added other open-source or third-party packages to your package library. Since reversing the binding switches the location of the default package library, you must reinstall the packages to the library that R and Python are now using. For more information, see [Default packages](installing-and-managing-r-packages.md), [Install new R packages](install-additional-r-packages-on-sql-server.md), and [Install new Python packages](../python/install-additional-python-packages-on-sql-server.md).
259
259
260
-
## Known issues
261
-
262
-
This section lists known issues specific to use of the SqlBindR.exe utility, or to upgrades of Machine Learning Server that might affect SQL Server instances.
263
-
264
-
### Restoring packages that were previously installed
265
-
266
-
If you upgraded to Microsoft R Server 9.0.1, the version of SqlBindR.exe for that version failed to restore the original packages or R components completely, requiring that the user run SQL Server repair on the instance, apply all service releases, and then restart the instance.
267
-
268
-
Later version of SqlBindR automatically restore the original R features, eliminating the need for reinstallation of R components or re-patch the server. However, you must install any R package updates that might have been added after the initial installation.
269
-
270
-
If you have used the package management roles to install and share package, this task is much easier: you can use R commands to synchronize installed packages to the file system using records in the database, and vice versa. For more information, see [R package management for SQL Server](r-package-management-for-sql-server-r-services.md).
271
-
272
-
### Problems with multiple upgrades from SQL Server
273
-
274
-
If you have previously upgraded an instance of SQL Server 2016 R Services to 9.0.1, when you run the new installer for Microsoft R Server 9.1.0, it displays a list of all valid instances, and then by default selects previously bound instances. If you continue, the previously bound instances are unbound. As a result, the earlier 9.0.1 installation is removed, including any related packages, but the new version of Microsoft R Server (9.1.0) is not installed.
275
-
276
-
As a workaround, you can modify the existing R Server installation as follows:
277
-
1. In Control Panel, open **Add or Remove Programs**.
278
-
2. Locate Microsoft R Server, and click **Change/Modify**.
279
-
3. When the installer starts, select the instances you want to bind to 9.1.0.
280
-
281
-
Microsoft Machine Learning Server 9.2.1 and 9.3 do not have this issue.
282
-
283
-
### Binding or unbinding leaves multiple temporary folders
284
-
285
-
Sometimes the binding and unbinding operations fail to clean up temporary folders.
286
-
If you find folders with a name like this, you can remove it after installation is complete: R_SERVICES_<guid>
287
-
288
-
> [!NOTE]
289
-
> Be sure to wait until installation is complete. It can take a long time to remove R libraries associated with one version and then add the new R libraries. When the operation completes, temporary folders are removed.
290
-
291
260
## SqlBindR.exe command syntax
292
261
293
262
### Usage
@@ -321,6 +290,36 @@ MLS Installer and SqlBindR both return the following error codes and messages.
321
290
|Bind error 8 | Unbind failed | An error occurred while unbinding the instance. |
322
291
|Bind error 9 | No instances found | No database engine instances were found on this computer. |
323
292
293
+
## Known issues
294
+
295
+
This section lists known issues specific to use of the SqlBindR.exe utility, or to upgrades of Machine Learning Server that might affect SQL Server instances.
296
+
297
+
### Restoring packages that were previously installed
298
+
299
+
If you upgraded to Microsoft R Server 9.0.1, the version of SqlBindR.exe for that version failed to restore the original packages or R components completely, requiring that the user run SQL Server repair on the instance, apply all service releases, and then restart the instance.
300
+
301
+
Later version of SqlBindR automatically restore the original R features, eliminating the need for reinstallation of R components or re-patch the server. However, you must install any R package updates that might have been added after the initial installation.
302
+
303
+
If you have used the package management roles to install and share package, this task is much easier: you can use R commands to synchronize installed packages to the file system using records in the database, and vice versa. For more information, see [R package management for SQL Server](r-package-management-for-sql-server-r-services.md).
304
+
305
+
### Problems with multiple upgrades from SQL Server
306
+
307
+
If you have previously upgraded an instance of SQL Server 2016 R Services to 9.0.1, when you run the new installer for Microsoft R Server 9.1.0, it displays a list of all valid instances, and then by default selects previously bound instances. If you continue, the previously bound instances are unbound. As a result, the earlier 9.0.1 installation is removed, including any related packages, but the new version of Microsoft R Server (9.1.0) is not installed.
308
+
309
+
As a workaround, you can modify the existing R Server installation as follows:
310
+
1. In Control Panel, open **Add or Remove Programs**.
311
+
2. Locate Microsoft R Server, and click **Change/Modify**.
312
+
3. When the installer starts, select the instances you want to bind to 9.1.0.
313
+
314
+
Microsoft Machine Learning Server 9.2.1 and 9.3 do not have this issue.
315
+
316
+
### Binding or unbinding leaves multiple temporary folders
317
+
318
+
Sometimes the binding and unbinding operations fail to clean up temporary folders.
319
+
If you find folders with a name like this, you can remove it after installation is complete: R_SERVICES_<guid>
320
+
321
+
> [!NOTE]
322
+
> Be sure to wait until installation is complete. It can take a long time to remove R libraries associated with one version and then add the new R libraries. When the operation completes, temporary folders are removed.
0 commit comments