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: articles/synapse-analytics/sql/resources-self-help-sql-on-demand.md
+34-4Lines changed: 34 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
title: SQL on-demand Preview) self-help
3
3
description: This section contains information that can help you troubleshoot problems with SQL on-demand (preview).
4
4
services: synapse analytics
5
-
author: vvasic-msft
5
+
author: azaricstefan
6
6
ms.service: synapse-analytics
7
7
ms.topic: overview
8
8
ms.subservice:
9
-
ms.date: 04/15/2020
10
-
ms.author: vvasic
9
+
ms.date: 05/15/2020
10
+
ms.author: v-stazar
11
11
ms.reviewer: jrasnick
12
12
---
13
13
@@ -28,14 +28,44 @@ If your query fails with the error saying 'File cannot be opened because it does
28
28
29
29
## Query fails because it cannot be executed due to current resource constraints
30
30
31
-
If your query fails with the error message 'This query cannot be executed due to current resource constraints', it means that SQL OD is not able to execute it at this moment due to resource constraints:
31
+
If your query fails with the error message 'This query cannot be executed due to current resource constraints', it means that SQL on-demand is not able to execute it at this moment due to resource constraints:
32
32
33
33
- Please make sure data types of reasonable sizes are used. Also, specify schema for Parquet files for string columns as they will be VARCHAR(8000) by default.
34
34
35
35
- If your query targets CSV files, consider [creating statistics](develop-tables-statistics.md#statistics-in-sql-on-demand-preview).
36
36
37
37
- Visit [performance best practices for SQL on-demand](best-practices-sql-on-demand.md) to optimize query.
38
38
39
+
## CREATE 'STATEMENT' is not supported in master database
40
+
41
+
If your query fails with the error message:
42
+
43
+
> 'Failed to execute query. Error: CREATE EXTERNAL TABLE/DATA SOURCE/DATABASE SCOPED CREDENTIAL/FILE FORMAT is not supported in master database.'
44
+
45
+
it means that master database in SQL on-demand does not support creation of:
46
+
- External tables
47
+
- External data sources
48
+
- Database scoped credentials
49
+
- External file formats
50
+
51
+
Solution:
52
+
53
+
1. Create a user database:
54
+
55
+
```sql
56
+
CREATE DATABASE <DATABASE_NAME>
57
+
```
58
+
59
+
2. Execute create statement in the context of <DATABASE_NAME> which failed earlier for master database.
60
+
61
+
Example for creation of External file format:
62
+
63
+
```sql
64
+
USE <DATABASE_NAME>
65
+
CREATE EXTERNAL FILE FORMAT [SynapseParquetFormat]
66
+
WITH ( FORMAT_TYPE = PARQUET)
67
+
```
68
+
39
69
## Next steps
40
70
41
71
Review the following articles to learn more about how to use SQL on-demand:
0 commit comments