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/machine-learning/security/user-permission.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,17 @@ title: Grant permissions to execute Python and R scripts
3
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.
# Grant users permission to execute Python and R scripts with SQL Server Machine Learning Services
13
+
# Grant database users permission to execute Python and R scripts with SQL Server Machine Learning Services
14
14
[!INCLUDE [SQL Server 2016 SQL MI](../../includes/applies-to-version/sqlserver2016-asdbmi.md)]
15
15
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.
16
+
Learn how you can give a [database user](../../relational-databases/security/authentication-access/create-a-database-user.md) 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.
17
17
18
18
For more information, see the permissions section in [Security overview for the extensibility framework](../../machine-learning/concepts/security.md#permissions).
19
19
@@ -23,7 +23,7 @@ For more information, see the permissions section in [Security overview for the
23
23
24
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.
25
25
26
-
To grant permission to execute external script, run the following script:
26
+
To grant permission to a [database user](../../relational-databases/security/authentication-access/create-a-database-user.md) to execute external script, run the following script:
27
27
28
28
```sql
29
29
USE <database_name>
@@ -38,15 +38,15 @@ GRANT EXECUTE ANY EXTERNAL SCRIPT TO [UserName]
38
38
39
39
## Grant databases permissions
40
40
41
-
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.
41
+
While a database user is running scripts, the database user might need to read data from other databases. The database user might also need to create new tables to store results, and write data into tables.
42
42
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:
43
+
For each database user account or SQL login that is running R or Python scripts, ensure that it has the appropriate permissions on the specific database:
44
44
45
45
+`db_datareader` to read data.
46
46
+`db_datawriter` to save objects to the database.
47
47
+`db_ddladmin` to create objects such as stored procedures or tables containing trained and serialized data.
48
48
49
-
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.
49
+
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. For more information, see [sp_addrolemember (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-addrolemember-transact-sql.md).
0 commit comments