Skip to content

Commit 2741edb

Browse files
committed
Permissions update.
1 parent 7a627e2 commit 2741edb

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

docs/t-sql/functions/openrowset-bulk-transact-sql.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dev_langs:
1212
- "TSQL"
1313
monikerRange: "=azuresqldb-mi-current || >=sql-server-2016 || =azuresqldb-current || >=sql-server-linux-2017 || =fabric"
1414
---
15+
1516
# OPENROWSET BULK (Transact-SQL)
1617

1718
::: moniker range="=azuresqldb-mi-current||=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017"
@@ -63,13 +64,21 @@ OPENROWSET( BULK 'data_file' ,
6364
[ , ROWS_PER_BATCH = rows_per_batch ]
6465
[ , ORDER ( { column [ ASC | DESC ] } [ , ...n ] ) [ UNIQUE ] ]
6566
```
67+
6668
## Permissions
67-
To use the `OPENROWSET` function with external data sources, the following permissions are required:
6869

69-
`ADMINISTER DATABASE BULK OPERATIONS` must be granted to the executing principal:
70+
`OPENROWSET` with external data sources, requires the following permissions:
71+
72+
- `ADMINISTER DATABASE BULK OPERATIONS`
73+
74+
or
75+
76+
- `ADMINISTER BULK OPERATIONS`
7077

71-
```sql
72-
GRANT ADMINISTER DATABASE BULK OPERATIONS TO [<principal_name>];
78+
The following example grants `ADMINISTEER DATABASE BULK OPERATIONS` to a principal.
79+
80+
```sql
81+
GRANT ADMINISTER DATABASE BULK OPERATIONS TO [<principal_name>];
7382
```
7483

7584
If the target storage account is private, the principal must also have the **Storage Blob Data Reader** role (or higher) assigned at the container or storage account level.
@@ -289,10 +298,6 @@ To bulk export or import SQLXML data, use one of the following data types in you
289298
| `SQLNCHAR` or `SQLNVARCHAR` | The data is sent as Unicode. |
290299
| `SQLBINARY` or `SQLVARYBIN` | The data is sent without any conversion. |
291300

292-
## Permissions
293-
294-
`OPENROWSET` permissions are determined by the permissions of the user name that is being passed to the data provider. To use the `BULK` option requires `ADMINISTER BULK OPERATIONS` or `ADMINISTER DATABASE BULK OPERATIONS` permission.
295-
296301
## Examples
297302

298303
This section provides general examples to demonstrate how to use `OPENROWSET BULK` syntax.

0 commit comments

Comments
 (0)