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/2014/relational-databases/in-memory-oltp/creating-natively-compiled-stored-procedures.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.author: carlrab
12
12
manager: craigg
13
13
---
14
14
# Creating Natively Compiled Stored Procedures
15
-
Natively compiled stored procedures do not implement the full [!INCLUDE[tsql](../../includes/tsql-md.md)] programmability and query surface area. There are certain [!INCLUDE[tsql](../../includes/tsql-md.md)] constructs that cannot be used inside natively compiled stored procedures. For more information, see [Supported Constructs in Natively Compiled Stored Procedures](..\in-memory-oltp\supported-features-for-natively-compiled-t-sql-modules.md).
15
+
Natively compiled stored procedures do not implement the full [!INCLUDE[tsql](../../includes/tsql-md.md)] programmability and query surface area. There are certain [!INCLUDE[tsql](../../includes/tsql-md.md)] constructs that cannot be used inside natively compiled stored procedures. For more information, see [Supported Constructs in Natively Compiled Stored Procedures](../in-memory-oltp/supported-features-for-natively-compiled-t-sql-modules.md).
16
16
17
17
There are, however, several [!INCLUDE[tsql](../../includes/tsql-md.md)] features that are only supported for natively compiled stored procedures:
This article describes data collection methods you should use when attempting to resolve problems on your own or with the help of Microsoft customer support.
16
+
This article describes data collection methods you should use when attempting to resolve problems on your own or with the help of Microsoft customer support.
16
17
17
18
**Applies to:** SQL Server 2016 R Services, SQL Server 2017 Machine Learning Services (R and Python)
18
19
19
-
20
20
## SQL Server version and edition
21
21
22
22
SQL Server 2016 R Services is the first release of SQL Server to include integrated R support. SQL Server 2016 Service Pack 1 (SP1) includes several major improvements, including the ability to run external scripts. If you are a SQL Server 2016 customer, you should consider installing SP1 or later.
# Retrieve properties like R.home, libPath & default packages
@@ -63,7 +63,7 @@ WITH RESULT SETS ((PropertyName nvarchar(100), PropertyValue nvarchar(4000)));
63
63
64
64
```
65
65
66
-
> [!TIP]
66
+
> [!TIP]
67
67
> If R Services is not working, try running only the R script portion from RGui.
68
68
69
69
As a last resort, you can open files on the server to determine the installed version. To do so, locate the rlauncher.config file to get the location of the R runtime and the current working directory. We recommend that you make and open a copy of the file so that you don't accidentally change any properties.
@@ -86,17 +86,15 @@ To get the R version and RevoScaleR versions, open an R command prompt, or open
The R console displays the version information on startup. For example, the following version represents the default configuration for SQL Server 2017 CTP 2.0:
91
90
92
91
*Microsoft R Open 3.3.3*
93
-
92
+
94
93
*The enhanced R distribution from Microsoft*
95
-
94
+
96
95
*Microsoft packages Copyright (C) 2017 Microsoft*
97
-
98
-
*Loading Microsoft R Server packages, version 9.1.0.*
99
96
97
+
*Loading Microsoft R Server packages, version 9.1.0.*
100
98
101
99
## Python versions
102
100
@@ -123,15 +121,14 @@ If Machine Learning Services is not running, you can determine the installed Pyt
123
121
2. Get the value for **PYTHONHOME**.
124
122
3. Get the value of the current working directory.
125
123
126
-
127
124
> [!NOTE]
128
125
> If you have installed both Python and R in SQL Server 2017, the working directory and the pool of worker accounts are shared for the R and Python languages.
129
126
130
127
## Are multiple instances of R or Python installed?
131
128
132
129
Check to see whether more than one copy of the R libraries is installed on the computer. This duplication can happen if:
133
130
134
-
* During setup you select both R Services (In-Database) and R Server (Standalone).
131
+
* During setup you select both R Services (In-Database) and R Server (Standalone).
135
132
* You install Microsoft R Client in addition to SQL Server.
136
133
* A different set of R libraries was installed by using R Tools for Visual Studio, R Studio, Microsoft R Client, or another R IDE.
137
134
* The computer hosts multiple instances of SQL Server, and more than one instance uses machine learning.
@@ -144,16 +141,16 @@ If you find that multiple libraries or runtimes are installed, make sure that yo
144
141
145
142
The errors that you see when you attempt to run R code can come from any of the following sources:
146
143
147
-
- SQL Server database engine, including the stored procedure sp_execute_external_script
148
-
- The SQL Server Trusted Launchpad
149
-
- Other components of the extensibility framework, including R and Python launchers and satellite processes
150
-
- Providers, such as Microsoft Open Database Connectivity (ODBC)
151
-
- R language
144
+
* SQL Server database engine, including the stored procedure sp_execute_external_script
145
+
* The SQL Server Trusted Launchpad
146
+
* Other components of the extensibility framework, including R and Python launchers and satellite processes
147
+
* Providers, such as Microsoft Open Database Connectivity (ODBC)
148
+
* R language
152
149
153
150
When you work with the service for the first time, it can be difficult to tell which messages originate from which services. We recommend that you capture not only the exact message text, but the context in which you saw the message. Note the client software that you're using to run machine learning code:
154
151
155
-
- Are you using Management Studio? An external application?
156
-
- Are you running R code in a remote client, or directly in a stored procedure?
152
+
* Are you using Management Studio? An external application?
153
+
* Are you running R code in a remote client, or directly in a stored procedure?
157
154
158
155
## SQL Server log files
159
156
@@ -167,13 +164,12 @@ Get the most recent SQL Server ERRORLOG. The complete set of error logs consists
> The exact folder name differs based on the instance name. Depending on your configuration, the folder might be on a different drive.
216
212
217
213
For example, the following log messages are related to the extensibility framework:
@@ -220,26 +216,26 @@ For example, the following log messages are related to the extensibility framewo
220
216
221
217
This might indicate that the worker accounts that run external scripts cannot access the instance.
222
218
223
-
**InitializePhysicalUsersPool Failed*
219
+
**InitializePhysicalUsersPool Failed*
224
220
225
221
This message might mean that your security settings are preventing setup from creating the pool of worker accounts that are needed to run external scripts.
1. Open Windows Event Viewer, and search the **System Event** log for messages that include the string *Launchpad*.
229
+
1. Open Windows Event Viewer, and search the **System Event** log for messages that include the string *Launchpad*.
234
230
2. Open the ExtLaunchErrorlog file, and look for the string *ErrorCode*. Review the message that's associated with the ErrorCode.
235
231
236
-
For example, the following messages are common system errors that are related to the SQL Server extensibility framework:
232
+
For example, the following messages are common system errors that are related to the SQL Server extensibility framework:
237
233
238
234
**The SQL Server Launchpad (MSSQLSERVER) service failed to start due to the following error: <text>*
239
235
240
-
**The service did not respond to the start or control request in a timely fashion.*
236
+
**The service did not respond to the start or control request in a timely fashion.*
241
237
242
-
**A timeout was reached (120000 milliseconds) while waiting for the SQL Server Launchpad (MSSQLSERVER) service to connect.*
238
+
**A timeout was reached (120000 milliseconds) while waiting for the SQL Server Launchpad (MSSQLSERVER) service to connect.*
243
239
244
240
## Dump files
245
241
@@ -249,8 +245,7 @@ If you are knowledgeable about debugging, you can use the dump files to analyze
249
245
2. Open the bootstrap log subfolder that is specific to extensibility.
250
246
3. If you need to submit a support request, add the entire contents of this folder to a zipped file. For example, C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\LOG\ExtensibilityLog.
251
247
252
-
The exact location might differ on your system, and it might be on a drive other than your C drive. Be sure to get the logs for the instance where machine learning is installed.
253
-
248
+
The exact location might differ on your system, and it might be on a drive other than your C drive. Be sure to get the logs for the instance where machine learning is installed.
254
249
255
250
## Configuration settings
256
251
@@ -281,11 +276,11 @@ For individual user accounts:
281
276
3. To enable script execution, create roles or add users to the following roles, as necessary:
282
277
283
278
- All but *db_owner*: Require EXECUTE ANY EXTERNAL SCRIPT.
284
-
-*db_datawriter*: To write results from R or Python.
285
-
-*db_ddladmin*: To create new objects.
286
-
-*db_datareader*: To read data that's used by R or Python code.
279
+
-*db_datawriter*: To write results from R or Python.
280
+
-*db_ddladmin*: To create new objects.
281
+
-*db_datareader*: To read data that's used by R or Python code.
287
282
4. Note whether you changed any default startup accounts when you installed SQL Server 2016.
288
-
5. If a user needs to install new R packages or use R packages that were installed by other users, you might need to enable package management on the instance and then assign additional permissions. For more information, see [Enable or disable R package management](r\r-package-how-to-enable-or-disable.md).
283
+
5. If a user needs to install new R packages or use R packages that were installed by other users, you might need to enable package management on the instance and then assign additional permissions. For more information, see [Enable or disable R package management](r/r-package-how-to-enable-or-disable.md).
289
284
290
285
### What folders are subject to locking by antivirus software?
291
286
@@ -303,7 +298,6 @@ Because it might not be possible to exclude all folders that are needed by the S
303
298
304
299
2. Determine whether a firewall rule has been created for SQL Server. For security reasons, in a default installation, it might not be possible for remote R or Python client to connect to the instance. For more information, see [Troubleshooting connecting to SQL Server](../database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine.md).
305
300
306
-
307
301
## See also
308
302
309
303
[Troubleshoot machine learning in SQL Server](machine-learning-troubleshooting-faq.md)
Copy file name to clipboardExpand all lines: docs/advanced-analytics/known-issues-for-sql-server-machine-learning-services.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
@@ -267,9 +267,9 @@ If you need to use larger models, the following workarounds are available:
267
267
+ Use feature selection to remove unnecessary columns.
268
268
+ If you are using an open source algorithm, consider a similar implementation using the corresponding algorithm in MicrosoftML or RevoScaleR. These packages have been optimized for deployment scenarios.
269
269
+ After the model has been rationalized and the size reduced using the preceding steps, see if the [memCompress](https://www.rdocumentation.org/packages/base/versions/3.4.1/topics/memCompress) function in base R can be used to reduce the size of the model before passing it to SQL Server. This option is best when the model is close to the 2 GB limit.
270
-
+ For larger models, you can use the SQL Server [FileTable](..\relational-databases\blob\filetables-sql-server.md) feature to store the models, rather than using a varbinary column.
270
+
+ For larger models, you can use the SQL Server [FileTable](../relational-databases/blob/filetables-sql-server.md) feature to store the models, rather than using a varbinary column.
271
271
272
-
To use FileTables, you must add a firewall exception, because data stored in FileTables is managed by the Filestream filesystem driver in SQL Server, and default firewall rules block network file access. For more information, see [Enable Prerequisites for FileTable](../relational-databases/blob/enable-the-prerequisites-for-filetable.md).
272
+
To use FileTables, you must add a firewall exception, because data stored in FileTables is managed by the Filestream filesystem driver in SQL Server, and default firewall rules block network file access. For more information, see [Enable Prerequisites for FileTable](../relational-databases/blob/enable-the-prerequisites-for-filetable.md).
273
273
274
274
After you have enabled FileTable, to write the model, you get a path from SQL using the FileTable API, and then write the model to that location from your code. When you need to read the model, you get the path from SQL and then call the model using the path from your script. For more information, see [Access FileTables with File Input-Output APIs](../relational-databases/blob/access-filetables-with-file-input-output-apis.md).
Copy file name to clipboardExpand all lines: docs/advanced-analytics/r/converting-r-code-for-use-in-sql-server.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
@@ -128,8 +128,8 @@ How much you change your code depends on whether you intend to submit the R code
128
128
129
129
+ If your code is relatively simple, you can embed it in a T-SQL user-defined function without modification, as described in these samples:
130
130
131
-
+ [Create an R function that runs in rxExec](..\tutorials\deepdive-create-a-simple-simulation.md)
132
-
+ [Feature engineering using T-SQL and R](..\tutorials\sqldev-create-data-features-using-t-sql.md)
131
+
+ [Create an R function that runs in rxExec](../tutorials/deepdive-create-a-simple-simulation.md)
132
+
+ [Feature engineering using T-SQL and R](../tutorials/sqldev-create-data-features-using-t-sql.md)
133
133
134
134
+ If the code is more complex, use the R package **sqlrutils** to convert your code. This package is designed to help experienced R users write good stored procedure code.
Copy file name to clipboardExpand all lines: docs/advanced-analytics/r/create-a-local-package-repository-using-minicran.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
@@ -27,7 +27,7 @@ The goal of creating a local package repository is to provide a single location
27
27
28
28
Package repositories are useful in these scenarios:
29
29
30
-
-**Security**: Many R users are accustomed to downloading and installing new R packages at will, from CRAN or one of its mirror sites. However, for security reasons, production servers running [!INCLUDE[ssNoVersion_md](..\..\includes\ssnoversion-md.md)] typically do not have internet connectivity.
30
+
-**Security**: Many R users are accustomed to downloading and installing new R packages at will, from CRAN or one of its mirror sites. However, for security reasons, production servers running [!INCLUDE[ssNoVersion_md](../../includes/ssnoversion-md.md)] typically do not have internet connectivity.
31
31
32
32
-**Easier offline installation**: To install package to an offline server requires that you also download all package dependencies, Using miniCRAN makes it easier to get all dependencies in the correct format.
33
33
@@ -94,7 +94,7 @@ Do **not** add dependencies to this initial list. The **igraph** package used by
Copy file name to clipboardExpand all lines: docs/advanced-analytics/r/determine-which-packages-are-installed-on-sql-server.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ There are multiple ways that you can get a complete list of the packages current
86
86
87
87
### R
88
88
89
-
The following example uses the R function `installed.packages()` in a [!INCLUDE[tsql](..\..\includes\tsql-md.md)] stored procedure to get a matrix of packages that have been installed in the R_SERVICES library for the current instance. This script returns package name and version fields in the DESCRIPTION file, only the name is returned.
89
+
The following example uses the R function `installed.packages()` in a [!INCLUDE[tsql](../../includes/tsql-md.md)] stored procedure to get a matrix of packages that have been installed in the R_SERVICES library for the current instance. This script returns package name and version fields in the DESCRIPTION file, only the name is returned.
Copy file name to clipboardExpand all lines: docs/advanced-analytics/r/sql-server-r-services-performance-tuning.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,18 +78,18 @@ Configuration and tuning for performance requires creating a solid base, on whic
78
78
79
79
## Articles in this series
80
80
81
-
+[Performance tuning for R in SQL Server - hardware](..\r\sql-server-configuration-r-services.md)
81
+
+[Performance tuning for R in SQL Server - hardware](../r/sql-server-configuration-r-services.md)
82
82
83
-
Provides guidance for configuring the hardware that [!INCLUDE[ssNoVersion_md](..\..\includes\ssnoversion-md.md)] is installed on, and for configuring the SQL Server instance to better support external scripts. It is particularly useful for **database administrators**.
83
+
Provides guidance for configuring the hardware that [!INCLUDE[ssNoVersion_md](../../includes/ssnoversion-md.md)] is installed on, and for configuring the SQL Server instance to better support external scripts. It is particularly useful for **database administrators**.
84
84
85
-
+[Performance tuning for R in SQL Server - code and data optimization](..\r\r-and-data-optimization-r-services.md)
85
+
+[Performance tuning for R in SQL Server - code and data optimization](../r/r-and-data-optimization-r-services.md)
86
86
87
87
Provides specific tips on how to optimize the external script to avoid known problems. It is most useful to **data scientists**.
88
88
89
89
> [!NOTE]
90
90
> While much of the information in this section applies to R in general, some information is specific to RevoScaleR analytic functions. Detailed performance guidance is not available for **revoscalepy** and other supported Python libraries.
91
91
>
92
92
93
-
+[Performance tuning for R in SQL Server - methods and results](..\r\performance-case-study-r-services.md)
93
+
+[Performance tuning for R in SQL Server - methods and results](../r/performance-case-study-r-services.md)
94
94
95
95
Summarizes what data was used the two case studies, how performance was tested, and how the optimizations affected results.
0 commit comments