Skip to content

Commit 7816657

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/sql-docs-pr into GHI
2 parents c7bbc9d + 77496bc commit 7816657

26 files changed

Lines changed: 207 additions & 202 deletions

docs/big-data-cluster/deploy-offline.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ The following steps describe how to pull the big data cluster container images f
4949
```PowerShell
5050
docker push <TARGET_DOCKER_REGISTRY>/<TARGET_DOCKER_REPOSITORY>/<SOURCE_IMAGE_NAME>:<TARGET_DOCKER_TAG>
5151
```
52+
53+
> [!WARNING]
54+
> Do not modify the big data cluster images once they are pushed into your private repository. Performing a deployment with modified images will result in an unsupported big data cluster setup.
55+
5256

5357
### <a id="images"></a> Big data cluster container images
5458

docs/database-engine/availability-groups/windows/enhanced-database-failover.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
title: "Enhanced failover for an availability group"
33
description: "Steps to enable enhanced database failover, which triggers a failover if a database in an Always On availability group is no longer able to write transactions."
44
ms.custom: "seodec18"
5-
ms.date: "09/25/2017"
5+
ms.date: 06/03/2020
66
ms.prod: sql
7-
ms.reviewer: ""
87
ms.technology: high-availability
98
ms.topic: conceptual
109
helpviewer_keywords:

docs/machine-learning/install/sql-r-services-windows-install.md

Lines changed: 60 additions & 66 deletions
Large diffs are not rendered by default.

docs/machine-learning/known-issues-for-sql-server-machine-learning-services.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
22
title: Known issues for Python and R
3+
description: This article describes known problems or limitations with the Python and R components that are provided in SQL Server Machine Learning Services and SQL Server 2016 R Services.
34
ms.prod: sql
45
ms.technology: machine-learning
5-
ms.date: 04/06/2020
6+
ms.date: 06/03/2020
67
ms.topic: conceptual
8+
#ms.topic: troubleshooting
79
author: dphansen
810
ms.author: davidph
11+
ms.custom: contperfq4
912
monikerRange: ">=sql-server-2016||>=sql-server-linux-ver15||=sqlallproducts-allversions"
1013
---
1114
# Known issues in SQL Server Machine Learning Services
1215
[!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)]
1316

14-
This article describes known problems or limitations with machine learning components that are provided as an option in [SQL Server Machine Learning Services](sql-server-machine-learning-services.md) and [SQL Server 2016 R Services](r/sql-server-r-services.md).
17+
This article describes known problems or limitations with the Python and R components that are provided in [SQL Server Machine Learning Services](sql-server-machine-learning-services.md) and [SQL Server 2016 R Services](r/sql-server-r-services.md).
1518

1619
## Setup and configuration issues
1720

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
---
2-
title: Grant permissions for scripts
3-
description: How to grant database user permissions for R and Python script execution on SQL Server Machine Learning Services.
2+
title: Grant permissions to execute Python and R scripts
3+
description: Learn how you can give users permission to run external Python and R scripts in SQL Server Machine Learning Services and give read, write, or data definition language (DDL) permissions to databases.
44
ms.prod: sql
55
ms.technology: machine-learning
6-
7-
ms.date: 10/17/2018
6+
ms.date: 06/03/2020
87
ms.topic: conceptual
98
author: dphansen
109
ms.author: davidph
11-
ms.custom: seo-lt-2019
10+
ms.custom: seo-lt-2019, contperfq4
1211
monikerRange: ">=sql-server-2016||>=sql-server-linux-ver15||=sqlallproducts-allversions"
1312
---
14-
# Give users permission to SQL Server Machine Learning Services
13+
# Grant users permission to execute Python and R scripts with SQL Server Machine Learning Services
1514
[!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)]
1615

17-
This article describes how you can give users permission to run external scripts in SQL Server Machine Learning Services and give read, write, or data definition language (DDL) permissions to databases.
16+
Learn how you can give users permission to run external Python and R scripts in [SQL Server Machine Learning Services](../sql-server-machine-learning-services.md) and give read, write, or data definition language (DDL) permissions to databases.
1817

1918
For more information, see the permissions section in [Security overview for the extensibility framework](../../machine-learning/concepts/security.md#permissions).
2019

2120
<a name="permissions-external-script"></a>
2221

2322
## Permission to run scripts
2423

25-
If you installed [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] yourself, and you are running R or Python scripts in your own instance, you typically execute scripts as an administrator. Thus, you have implicit permission over various operations and all data in the database.
24+
For each user who runs Python or R scripts with SQL Server Machine Learning Services, and who are not an administrator, you must grant them the permission to run external scripts in each database where the language is used.
2625

27-
Most users, however, do not have such elevated permissions. For example, users in an organization who use SQL logins to access the database generally do not have elevated permissions. Therefore, for each user who is using R or Python, you must grant users of Machine Learning Services the permission to run external scripts in each database where the language is used. Here's how:
26+
To grant permission to execute external script, run the following script:
2827

2928
```sql
3029
USE <database_name>
@@ -33,15 +32,19 @@ GRANT EXECUTE ANY EXTERNAL SCRIPT TO [UserName]
3332
```
3433

3534
> [!NOTE]
36-
> Permissions are not specific to the supported script language. In other words, there are not separate permission levels for R script versus Python script. If you need to maintain separate permissions for these languages, install R and Python on separate instances.
35+
> Permissions are not specific to the supported script language. In other words, there are not separate permission levels for R script versus Python script.
3736
38-
<a name="permissions-db"></a>
37+
<a name="permissions-db"></a>
3938

4039
## Grant databases permissions
4140

4241
While a user is running scripts, the user might need to read data from other databases. The user might also need to create new tables to store results, and write data into tables.
4342

44-
For each Windows user account or SQL login that is running R or Python scripts, ensure that it has the appropriate permissions on the specific database: `db_datareader` to read data, `db_datawriter` to save objects to the database, or `db_ddladmin` to create objects such as stored procedures or tables containing trained and serialized data.
43+
For each Windows user account or SQL login that is running R or Python scripts, ensure that it has the appropriate permissions on the specific database:
44+
45+
+ `db_datareader` to read data.
46+
+ `db_datawriter` to save objects to the database.
47+
+ `db_ddladmin` to create objects such as stored procedures or tables containing trained and serialized data.
4548

4649
For example, the following [!INCLUDE[tsql](../../includes/tsql-md.md)] statement gives the SQL login *MySQLLogin* the rights to run T-SQL queries in the *ML_Samples* database. To run this statement, the SQL login must already exist in the security context of the server.
4750

@@ -53,4 +56,4 @@ EXEC sp_addrolemember 'db_datareader', 'MySQLLogin'
5356

5457
## Next steps
5558

56-
For more information about the permissions included in each role, see [Database-level roles](../../relational-databases/security/authentication-access/database-level-roles.md).
59+
For more information about the permissions included in each role, see [Database-level roles](../../relational-databases/security/authentication-access/database-level-roles.md).

docs/odbc/reference/dynamic-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Dynamic SQL | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "01/19/2017"
4+
ms.date: "06/03/2020"
55
ms.prod: sql
66
ms.prod_service: connectivity
77
ms.reviewer: ""
@@ -33,4 +33,4 @@ Although static SQL works well in many situations, there is a class of applicati
3333

3434
3. The program can use the EXECUTE statement repeatedly, supplying different parameter values each time the dynamic statement is executed.
3535

36-
Prepared execution is still not the same as static SQL. In static SQL, the first four steps of processing an SQL statement take place at compile time. In prepared execution, these steps still take place at run time, but they are performed only once; execution of the plan takes place only when EXECUTE is called. This helps eliminate some of the performance disadvantages inherent in the architecture of dynamic SQL. The next illustration shows the differences between static SQL, dynamic SQL with immediate execution, and dynamic SQL with prepared execution.
36+
Prepared execution is still not the same as static SQL. In static SQL, the first four steps of processing an SQL statement take place at compile time. In prepared execution, these steps still take place at run time, but they are performed only once; execution of the plan takes place only when EXECUTE is called. This helps eliminate some of the performance disadvantages inherent in the architecture of dynamic SQL.

docs/relational-databases/data-collection/add-a-collection-item-to-a-collection-set-transact-sql.md

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Add Collection Item to Collection Set (T-SQL)"
3-
ms.custom: ""
4-
ms.date: "03/07/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability
@@ -25,13 +24,15 @@ ms.custom: "seo-lt-2019"
2524
1. Stop the collection set that you want to add the item to by running the **sp_syscollector_stop_collection_set** stored procedure. For example, to stop a collection set that is named "Test Collection Set", run the following statements:
2625

2726
```sql
28-
USE msdb
29-
DECLARE @csid int
27+
USE msdb;
28+
DECLARE @csid int;
29+
3030
SELECT @csid = collection_set_id
31-
FROM syscollector_collection_sets
32-
WHERE name = 'Test Collection Set'
33-
SELECT @csid
34-
EXEC dbo.sp_syscollector_stop_collection_set @collection_set_id = @csid
31+
FROM syscollector_collection_sets
32+
WHERE name = 'Test Collection Set';
33+
34+
SELECT @csid;
35+
EXEC dbo.sp_syscollector_stop_collection_set @collection_set_id = @csid;
3536
```
3637

3738
> [!NOTE]
@@ -40,53 +41,60 @@ ms.custom: "seo-lt-2019"
4041
2. Declare the collection set that you want to add the collection item to. The following code provides an example of how to declare the collection set ID.
4142

4243
```sql
43-
DECLARE @collection_set_id_1 int
44-
SELECT @collection_set_id_1 = collection_set_id FROM [msdb].[dbo].[syscollector_collection_sets]
45-
WHERE name = N'Test Collection Set'; -- name of collection set
44+
DECLARE @collection_set_id_1 int;
45+
46+
SELECT @collection_set_id_1 = collection_set_id
47+
FROM [msdb].[dbo].[syscollector_collection_sets]
48+
WHERE name = N'Test Collection Set'; -- name of collection set
4649
```
4750

4851
3. Declare the collector type. The following code provides an example of how to declare the Generic T-SQL Query collector type.
4952

5053
```sql
51-
DECLARE @collector_type_uid_1 uniqueidentifier
52-
SELECT @collector_type_uid_1 = collector_type_uid FROM [msdb].[dbo].[syscollector_collector_types]
54+
DECLARE @collector_type_uid_1 uniqueidentifier;
55+
56+
SELECT @collector_type_uid_1 = collector_type_uid
57+
FROM [msdb].[dbo].[syscollector_collector_types]
5358
WHERE name = N'Generic T-SQL Query Collector Type';
5459
```
5560

5661
You can run the following code to obtain a list of the installed collector types:
5762

5863
```sql
59-
USE msdb
60-
SELECT * from syscollector_collector_types
64+
USE msdb;
65+
SELECT * from syscollector_collector_types;
6166
GO
6267
```
6368

6469
4. Run the **sp_syscollector_create_collection_item** stored procedure to create the collection item. You must declare the schema for the collection item so that it maps to the required schema for the desired collector type. The following example uses the Generic T-SQL Query input schema.
6570

6671
```sql
6772
DECLARE @collection_item_id int;
73+
6874
EXEC [msdb].[dbo].[sp_syscollector_create_collection_item]
69-
@name=N'OS Wait Stats', --name of collection item
70-
@parameters=N'
71-
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
72-
<Query>
73-
<Value>select * from sys.dm_os_wait_stats</Value>
74-
<OutputTable>os_wait_stats</OutputTable>
75-
</Query>
76-
</ns:TSQLQueryCollector>',
77-
@collection_item_id = @collection_item_id OUTPUT,
78-
@frequency = 60,
79-
@collection_set_id = @collection_set_id_1, --- Provides the collection set ID number
80-
@collector_type_uid = @collector_type_uid_1 -- Provides the collector type UID
81-
SELECT @collection_item_id
75+
@name=N'OS Wait Stats', --name of collection item
76+
@parameters=N'
77+
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
78+
<Query>
79+
<Value>select * from sys.dm_os_wait_stats</Value>
80+
<OutputTable>os_wait_stats</OutputTable>
81+
</Query>
82+
</ns:TSQLQueryCollector>',
83+
@collection_item_id = @collection_item_id OUTPUT,
84+
@frequency = 60,
85+
@collection_set_id = @collection_set_id_1, --- Provides the collection set ID number
86+
@collector_type_uid = @collector_type_uid_1; -- Provides the collector type UID
87+
88+
SELECT @collection_item_id;
8289
```
8390

8491
5. Before starting the updated collection set, run the following query to verify that the new collection item has been created:
8592

86-
```xaml
87-
USE msdb
88-
SELECT * from syscollector_collection_sets
89-
SELECT * from syscollector_collection_items
93+
```sql
94+
USE msdb;
95+
GO
96+
SELECT * from syscollector_collection_sets;
97+
SELECT * from syscollector_collection_items;
9098
GO
9199
```
92100

docs/relational-databases/data-collection/configure-data-collection-parameters-transact-sql.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Configure Data Collection Parameters (T-SQL)"
3-
ms.custom: ""
4-
ms.date: "03/04/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability

docs/relational-databases/data-collection/create-custom-collection-set-generic-t-sql-query-collector-type.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Create Custom Collection Set - Generic T-SQL Query Collector Type"
3-
ms.custom: ""
4-
ms.date: "03/07/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability
@@ -33,10 +32,12 @@ ms.custom: "seo-lt-2019"
3332

3433
1. Define a new collection set using the sp_syscollector_create_collection_set stored procedure.
3534

36-
```
35+
```sql
3736
USE msdb;
37+
GO
3838
DECLARE @collection_set_id int;
3939
DECLARE @collection_set_uid uniqueidentifier;
40+
4041
EXEC sp_syscollector_create_collection_set
4142
@name=N'DMV Test 1',
4243
@collection_mode=0,
@@ -46,6 +47,7 @@ ms.custom: "seo-lt-2019"
4647
@schedule_name=N'CollectorSchedule_Every_15min',
4748
@collection_set_id=@collection_set_id OUTPUT,
4849
@collection_set_uid=@collection_set_uid OUTPUT;
50+
4951
SELECT @collection_set_id, @collection_set_uid;
5052
```
5153

@@ -75,8 +77,11 @@ ms.custom: "seo-lt-2019"
7577

7678
```sql
7779
DECLARE @collector_type_uid uniqueidentifier;
78-
SELECT @collector_type_uid = collector_type_uid FROM [msdb].[dbo].[syscollector_collector_types]
79-
WHERE name = N'Generic T-SQL Query Collector Type';
80+
81+
SELECT @collector_type_uid = collector_type_uid
82+
FROM [msdb].[dbo].[syscollector_collector_types]
83+
WHERE name = N'Generic T-SQL Query Collector Type';
84+
8085
DECLARE @collection_item_id int;
8186
```
8287

@@ -96,6 +101,7 @@ ms.custom: "seo-lt-2019"
96101
@frequency=5,
97102
@collection_set_id=@collection_set_id,
98103
@collector_type_uid=@collector_type_uid;
104+
99105
SELECT @collection_item_id;
100106
```
101107

@@ -105,6 +111,7 @@ ms.custom: "seo-lt-2019"
105111

106112
```sql
107113
USE msdb;
114+
GO
108115
SELECT * FROM syscollector_collection_sets;
109116
SELECT * FROM syscollector_collection_items;
110117
GO
@@ -130,28 +137,32 @@ EXEC dbo.sp_syscollector_create_collection_set
130137
@schedule_name=N'CollectorSchedule_Every_15min',
131138
@collection_set_id = @collection_set_id OUTPUT,
132139
@collection_set_uid = @collection_set_uid OUTPUT;
140+
133141
SELECT @collection_set_id,@collection_set_uid;
134142
135143
DECLARE @collector_type_uid uniqueidentifier;
136-
SELECT @collector_type_uid = collector_type_uid FROM syscollector_collector_types
137-
WHERE name = N'Generic T-SQL Query Collector Type';
144+
145+
SELECT @collector_type_uid = collector_type_uid
146+
FROM syscollector_collector_types
147+
WHERE name = N'Generic T-SQL Query Collector Type';
138148
139149
DECLARE @collection_item_id int;
150+
140151
EXEC sp_syscollector_create_collection_item
141-
@name= N'Query Stats - Test 1',
142-
@parameters=N'
143-
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
144-
<Query>
145-
<Value>select * from sys.dm_exec_query_stats</Value>
146-
<OutputTable>dm_exec_query_stats</OutputTable>
147-
</Query>
148-
</ns:TSQLQueryCollector>',
149-
@collection_item_id = @collection_item_id OUTPUT,
150-
@frequency = 5, -- This parameter is ignored in cached mode
151-
@collection_set_id = @collection_set_id,
152-
@collector_type_uid = @collector_type_uid;
152+
@name= N'Query Stats - Test 1',
153+
@parameters=N'
154+
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
155+
<Query>
156+
<Value>select * from sys.dm_exec_query_stats</Value>
157+
<OutputTable>dm_exec_query_stats</OutputTable>
158+
</Query>
159+
</ns:TSQLQueryCollector>',
160+
@collection_item_id = @collection_item_id OUTPUT,
161+
@frequency = 5, -- This parameter is ignored in cached mode
162+
@collection_set_id = @collection_set_id,
163+
@collector_type_uid = @collector_type_uid;
164+
153165
SELECT @collection_item_id;
154-
155166
GO
156167
```
157168

0 commit comments

Comments
 (0)