Skip to content

Commit 08a6b10

Browse files
authored
Merge pull request #115382 from azaricstefan/add-self-help-point
Added point for failing queries in logical master
2 parents 25f3077 + 9e7ddb8 commit 08a6b10

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

articles/synapse-analytics/sql/resources-self-help-sql-on-demand.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
title: SQL on-demand Preview) self-help
33
description: This section contains information that can help you troubleshoot problems with SQL on-demand (preview).
44
services: synapse analytics
5-
author: vvasic-msft
5+
author: azaricstefan
66
ms.service: synapse-analytics
77
ms.topic: overview
88
ms.subservice:
9-
ms.date: 04/15/2020
10-
ms.author: vvasic
9+
ms.date: 05/15/2020
10+
ms.author: v-stazar
1111
ms.reviewer: jrasnick
1212
---
1313

@@ -28,14 +28,44 @@ If your query fails with the error saying 'File cannot be opened because it does
2828

2929
## Query fails because it cannot be executed due to current resource constraints
3030

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:
3232

3333
- 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.
3434

3535
- If your query targets CSV files, consider [creating statistics](develop-tables-statistics.md#statistics-in-sql-on-demand-preview).
3636

3737
- Visit [performance best practices for SQL on-demand](best-practices-sql-on-demand.md) to optimize query.
3838

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+
3969
## Next steps
4070

4171
Review the following articles to learn more about how to use SQL on-demand:

0 commit comments

Comments
 (0)