Skip to content

Commit 4c4beda

Browse files
Merge pull request #210056 from WilliamDAssafMSFT/20220902-storage-dns-limitation
20220902 storage DNS limitation with Synapse COPY
2 parents 288d550 + 0f28951 commit 4c4beda

File tree

3 files changed

+61
-68
lines changed

3 files changed

+61
-68
lines changed

articles/data-factory/connector-troubleshoot-synapse-sql.md

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
---
22
title: Troubleshoot the Azure Synapse Analytics, Azure SQL Database, and SQL Server connectors
33
titleSuffix: Azure Data Factory & Azure Synapse
4-
description: Learn how to troubleshoot issues with the Azure Synapse Analytics, Azure SQL Database, and SQL Server connectors in Azure Data Factory and Azure Synapse Analytics.
4+
description: Learn how to troubleshoot issues with the Azure Synapse Analytics, Azure SQL Database, and SQL Server connectors in Azure Data Factory and Azure Synapse Analytics.
55
author: jianleishen
6+
ms.author: jianleishen
7+
ms.reviewer: joanpo, wiassaf
8+
ms.date: 09/02/2022
69
ms.service: data-factory
710
ms.subservice: data-movement
811
ms.topic: troubleshooting
9-
ms.date: 06/29/2022
10-
ms.author: jianleishen
11-
ms.custom: has-adal-ref, synapse
12+
ms.custom:
13+
- has-adal-ref
14+
- synapse
1215
---
1316

1417
# Troubleshoot the Azure Synapse Analytics, Azure SQL Database, and SQL Server connectors in Azure Data Factory and Azure Synapse
@@ -30,7 +33,7 @@ This article provides suggestions to troubleshoot common problems with the Azure
3033
| If the error message contains the string "SqlException", SQL Database the error indicates that some specific operation failed. | For more information, search by SQL error code in [Database engine errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). For further help, contact Azure SQL support. |
3134
| If this is a transient issue (for example, an instable network connection), add retry in the activity policy to mitigate. | For more information, see [Pipelines and activities](./concepts-pipelines-activities.md#activity-policy). |
3235
| If the error message contains the string "Client with IP address '...' is not allowed to access the server", and you're trying to connect to Azure SQL Database, the error is usually caused by an Azure SQL Database firewall issue. | In the Azure SQL Server firewall configuration, enable the **Allow Azure services and resources to access this server** option. For more information, see [Azure SQL Database and Azure Synapse IP firewall rules](/azure/azure-sql/database/firewall-configure). |
33-
36+
3437
## Error code: SqlOperationFailed
3538

3639
- **Message**: `A database operation failed. Please search error to get more details.`
@@ -44,7 +47,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
4447
| If the error message contains the string "InvalidOperationException", it's usually caused by invalid input data. | To identify which row has encountered the problem, enable the fault tolerance feature on the copy activity, which can redirect problematic rows to the storage for further investigation. For more information, see [Fault tolerance of copy activity](./copy-activity-fault-tolerance.md). |
4548
| If the error message contains "Execution Timeout Expired", it's usually caused by query timeout. | Configure **Query timeout** in the source and **Write batch timeout** in the sink to increase timeout. |
4649

47-
4850
## Error code: SqlUnauthorizedAccess
4951

5052
- **Message**: `Cannot connect to '%connectorName;'. Detail Message: '%message;'`
@@ -53,7 +55,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
5355

5456
- **Recommendation**: Check to ensure that the login account has sufficient permissions to access the SQL database.
5557

56-
5758
## Error code: SqlOpenConnectionTimeout
5859

5960
- **Message**: `Open connection to database timeout after '%timeoutValue;' seconds.`
@@ -62,7 +63,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
6263

6364
- **Recommendation**: Retry the operation to update the linked service connection string with a larger connection timeout value.
6465

65-
6666
## Error code: SqlAutoCreateTableTypeMapFailed
6767

6868
- **Message**: `Type '%dataType;' in source side cannot be mapped to a type that supported by sink side(column name:'%columnName;') in autocreate table.`
@@ -71,7 +71,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
7171

7272
- **Recommendation**: Update the column type in *mappings*, or manually create the sink table in the target server.
7373

74-
7574
## Error code: SqlDataTypeNotSupported
7675

7776
- **Message**: `A database operation failed. Check the SQL errors.`
@@ -84,7 +83,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
8483

8584
- **Recommendation**: Update the corresponding column type to the *datetime2* type in the sink table.
8685

87-
8886
## Error code: SqlInvalidDbStoredProcedure
8987

9088
- **Message**: `The specified Stored Procedure is not valid. It could be caused by that the stored procedure doesn't return any data. Invalid Stored Procedure script: '%scriptName;'.`
@@ -104,7 +102,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
104102

105103
- **Recommendation**: Validate the SQL query by using SQL Tools. Make sure that the query can return data.
106104

107-
108105
## Error code: SqlInvalidColumnName
109106

110107
- **Message**: `Column '%column;' does not exist in the table '%tableName;', ServerName: '%serverName;', DatabaseName: '%dbName;'.`
@@ -113,7 +110,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
113110

114111
- **Recommendation**: Verify the column in the query, *structure* in the dataset, and *mappings* in the activity.
115112

116-
117113
## Error code: SqlBatchWriteTimeout
118114

119115
- **Message**: `Timeouts in SQL write operation.`
@@ -122,7 +118,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
122118

123119
- **Recommendation**: Retry the operation. If the problem persists, contact Azure SQL support.
124120

125-
126121
## Error code: SqlBatchWriteTransactionFailed
127122

128123
- **Message**: `SQL transaction commits failed.`
@@ -135,7 +130,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
135130

136131
- **Recommendation**: Retry the activity and review the SQL database side metrics.
137132

138-
139133
## Error code: SqlBulkCopyInvalidColumnLength
140134

141135
- **Message**: `SQL Bulk Copy failed due to receive an invalid column length from the bcp client.`
@@ -144,7 +138,6 @@ This article provides suggestions to troubleshoot common problems with the Azure
144138

145139
- **Recommendation**: To identify which row has encountered the problem, enable the fault tolerance feature on the copy activity. This can redirect problematic rows to the storage for further investigation. For more information, see [Fault tolerance of copy activity](./copy-activity-fault-tolerance.md).
146140

147-
148141
## Error code: SqlConnectionIsClosed
149142

150143
- **Message**: `The connection is closed by SQL Database.`
@@ -159,15 +152,15 @@ This article provides suggestions to troubleshoot common problems with the Azure
159152

160153
- **Cause**: The linked service was not configured properly.
161154

162-
- **Recommendation**: Validate and fix the SQL server linked service.
155+
- **Recommendation**: Validate and fix the SQL server linked service.
163156

164157
## Error code: SqlParallelFailedToDetectPartitionColumn
165158

166159
- **Message**: `Failed to detect the partition column with command '%command;', %message;.`
167160

168161
- **Cause**: There is no primary key or unique key in the table.
169162

170-
- **Recommendation**: Check the table to make sure that a primary key or a unique index is created.
163+
- **Recommendation**: Check the table to make sure that a primary key or a unique index is created.
171164

172165
## Error code: SqlParallelFailedToDetectPhysicalPartitions
173166

@@ -189,37 +182,35 @@ This article provides suggestions to troubleshoot common problems with the Azure
189182

190183
- **Symptoms**: When you copy data from a tabular data source (such as SQL Server) into Azure Synapse Analytics using staged copy and PolyBase, you receive the following error:
191184

192-
`ErrorCode=FailedDbOperation,Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,
193-
Message=Error happened when loading data into Azure Synapse Analytics.,
194-
Source=Microsoft.DataTransfer.ClientLibrary,Type=System.Data.SqlClient.SqlException,
185+
`ErrorCode=FailedDbOperation,Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,
186+
Message=Error happened when loading data into Azure Synapse Analytics.,
187+
Source=Microsoft.DataTransfer.ClientLibrary,Type=System.Data.SqlClient.SqlException,
195188
Message=Conversion failed when converting from a character string to uniqueidentifier...`
196189

197190
- **Cause**: Azure Synapse Analytics PolyBase can't convert an empty string to a GUID.
198191

199192
- **Resolution**: In the copy activity sink, under PolyBase settings, set the **use type default** option to *false*.
200193

201-
202194
## Error message: Expected data type: DECIMAL(x,x), Offending value
203195

204196
- **Symptoms**: When you copy data from a tabular data source (such as SQL Server) into Azure Synapse Analytics by using staged copy and PolyBase, you receive the following error:
205197

206-
`ErrorCode=FailedDbOperation,Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,
207-
Message=Error happened when loading data into Azure Synapse Analytics.,
208-
Source=Microsoft.DataTransfer.ClientLibrary,Type=System.Data.SqlClient.SqlException,
198+
`ErrorCode=FailedDbOperation,Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,
199+
Message=Error happened when loading data into Azure Synapse Analytics.,
200+
Source=Microsoft.DataTransfer.ClientLibrary,Type=System.Data.SqlClient.SqlException,
209201
Message=Query aborted-- the maximum reject threshold (0 rows) was reached while reading from an external source: 1 rows rejected out of total 415 rows processed. (/file_name.txt)
210202
Column ordinal: 18, Expected data type: DECIMAL(x,x), Offending value:..`
211203

212204
- **Cause**: Azure Synapse Analytics PolyBase can't insert an empty string (null value) into a decimal column.
213205

214206
- **Resolution**: In the copy activity sink, under PolyBase settings, set the **use type default** option to false.
215207

216-
217208
## Error message: Java exception message: HdfsBridge::CreateRecordReader
218209

219210
- **Symptoms**: You copy data into Azure Synapse Analytics by using PolyBase and receive the following error:
220211

221212
`Message=110802;An internal DMS error occurred that caused this operation to fail.
222-
Details: Exception: Microsoft.SqlServer.DataWarehouse.DataMovement.Common.ExternalAccess.HdfsAccessException,
213+
Details: Exception: Microsoft.SqlServer.DataWarehouse.DataMovement.Common.ExternalAccess.HdfsAccessException,
223214
Message: Java exception raised on call to HdfsBridge_CreateRecordReader.
224215
Java exception message:HdfsBridge::CreateRecordReader - Unexpected error encountered creating the record reader.: Error [HdfsBridge::CreateRecordReader - Unexpected error encountered creating the record reader.] occurred while accessing external file.....`
225216

@@ -241,11 +232,10 @@ This article provides suggestions to troubleshoot common problems with the Azure
241232
- Time = 12 bytes
242233
- Tinyint = 1 byte
243234

244-
- **Resolution**:
235+
- **Resolution**:
245236
- Reduce column width to less than 1 MB.
246237
- Or use a bulk insert approach by disabling PolyBase.
247238

248-
249239
## Error message: The condition specified using HTTP conditional header(s) is not met
250240

251241
- **Symptoms**: You use SQL query to pull data from Azure Synapse Analytics and receive the following error:
@@ -256,48 +246,51 @@ This article provides suggestions to troubleshoot common problems with the Azure
256246

257247
- **Resolution**: Run the same query in SQL Server Management Studio (SSMS) and check to see whether you get the same result. If you do, open a support ticket to Azure Synapse Analytics and provide your Azure Synapse Analytics server and database name.
258248

259-
260249
## Performance tier is low and leads to copy failure
261250

262251
- **Symptoms**: You copy data into Azure SQL Database and receive the following error: `Database operation failed. Error message from database execution : ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.`
263252

264253
- **Cause**: Azure SQL Database s1 has hit input/output (I/O) limits.
265254

266-
- **Resolution**: Upgrade the Azure SQL Database performance tier to fix the issue.
267-
255+
- **Resolution**: Upgrade the Azure SQL Database performance tier to fix the issue.
268256

269-
## SQL table can't be found
257+
## SQL table can't be found
270258

271259
- **Symptoms**: You copy data from hybrid into an on-premises SQL Server table and receive the following error:`Cannot find the object "dbo.Contoso" because it does not exist or you do not have permissions.`
272260

273261
- **Cause**: The current SQL account doesn't have sufficient permissions to execute requests issued by .NET SqlBulkCopy.WriteToServer.
274262

275263
- **Resolution**: Switch to a more privileged SQL account.
276264

277-
278265
## Error message: String or binary data is truncated
279266

280-
- **Symptoms**: An error occurs when you copy data into an on-premises Azure SQL Server table.
267+
- **Symptoms**: An error occurs when you copy data into an on-premises Azure SQL Server table.
281268

282-
- **Cause**: The Cx SQL table schema definition has one or more columns with less length than expected.
269+
- **Cause**: The SQL table schema definition has one or more columns with less length than expected.
283270

284271
- **Resolution**: To resolve the issue, try the following:
285272

286-
1. To troubleshoot which rows have the issue, apply SQL sink [fault tolerance](./copy-activity-fault-tolerance.md), especially "redirectIncompatibleRowSettings."
273+
1. To troubleshoot which rows have the issue, apply SQL sink [fault tolerance](./copy-activity-fault-tolerance.md), especially `redirectIncompatibleRowSettings`.
287274

288-
> [!NOTE]
289-
> Fault tolerance might require additional execution time, which could lead to higher costs.
275+
> [!NOTE]
276+
> Fault tolerance might require additional execution time, which could lead to higher costs.
290277
291-
2. Double-check the redirected data against the SQL table schema column length to see which columns need to be updated.
278+
1. Double-check the redirected data against the SQL table schema column length to see which columns need to be updated.
292279

293-
3. Update the table schema accordingly.
280+
1. Update the table schema accordingly.
294281

295282
## Error code: FailedDbOperation
296283

297284
- **Message**: `User does not have permission to perform this action.`
298285

299286
- **Recommendation**: Make sure the user configured in the Azure Synapse Analytics connector must have 'CONTROL' permission on the target database while using PolyBase to load data. For more detailed information, refer to this [document](./connector-azure-sql-data-warehouse.md#required-database-permission).
300287

288+
## Error code: Msg 105208
289+
290+
- **Symptoms**: Error code: `Error code: Msg 105208, Level 16, State 1, Line 1 COPY statement failed with the following error when validating value of option 'FROM': '105200;COPY statement failed because the value for option 'FROM' is invalid.'`
291+
- **Cause**: Currently, ingesting data using the COPY command into an Azure Storage account that is using the new DNS partitioning feature results in an error. DNS partition feature enables customers to create up to 5000 storage accounts per subscription.
292+
- **Resolutions**: Provision a storage account in a subscription that does not use the new [Azure Storage DNS partition feature](https://techcommunity.microsoft.com/t5/azure-storage-blog/public-preview-create-additional-5000-azure-storage-accounts/ba-p/3465466) (currently in Public Preview).
293+
301294
## Next steps
302295

303296
For more troubleshooting help, try these resources:

articles/synapse-analytics/sql-data-warehouse/sql-data-warehouse-load-from-azure-data-lake-store.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
title: 'Tutorial load data from Azure Data Lake Storage'
2+
title: "Tutorial load data from Azure Data Lake Storage"
33
description: Use the COPY statement to load data from Azure Data Lake Storage for dedicated SQL pools.
44
author: WilliamDAssafMSFT
5-
manager: craigg
5+
ms.author: wiassaf
6+
ms.reviewer: joanpo
7+
ms.date: 09/02/2022
68
ms.service: synapse-analytics
9+
ms.subservice: sql-dw
710
ms.topic: conceptual
8-
ms.subservice: sql-dw
9-
ms.date: 11/20/2020
10-
ms.author: wiassaf
11-
ms.reviewer: wiassaf
1211
ms.custom: azure-synapse
1312
---
1413

@@ -33,11 +32,12 @@ Before you begin this tutorial, download and install the newest version of [SQL
3332
To run this tutorial, you need:
3433

3534
* A dedicated SQL pool. See [Create a dedicated SQL pool and query data](create-data-warehouse-portal.md).
36-
* A Data Lake Storage account. See [Get started with Azure Data Lake Storage](../../data-lake-store/data-lake-store-get-started-portal.md?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json). For this storage account, you will need to configure or specify one of the following credentials to load: A storage account key, shared access signature (SAS) key, an Azure Directory Application user, or an AAD user which has the appropriate Azure role to the storage account.
35+
* A Data Lake Storage account. See [Get started with Azure Data Lake Storage](../../data-lake-store/data-lake-store-get-started-portal.md?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json). For this storage account, you will need to configure or specify one of the following credentials to load: A storage account key, shared access signature (SAS) key, an Azure Directory Application user, or an Azure AD user that has the appropriate Azure role to the storage account.
36+
* Currently, ingesting data using the COPY command into an Azure Storage account that is using the new [Azure Storage DNS partition feature](https://techcommunity.microsoft.com/t5/azure-storage-blog/public-preview-create-additional-5000-azure-storage-accounts/ba-p/3465466) results in an error. Provision a storage account in a subscription that does not use DNS partitioning for this tutorial.
3737

3838
## Create the target table
3939

40-
Connect to your dedicated SQL pool and create the target table you will to load to. In this example, we are creating a product dimension table.
40+
Connect to your dedicated SQL pool and create the target table you will load to. In this example, we are creating a product dimension table.
4141

4242
```sql
4343
-- A: Create the target table
@@ -56,26 +56,25 @@ WITH
5656
);
5757
```
5858

59-
6059
## Create the COPY statement
6160

6261
Connect to your SQL dedicated pool and run the COPY statement. For a complete list of examples, visit the following documentation: [Securely load data using dedicated SQL pools](./quickstart-bulk-load-copy-tsql-examples.md).
6362

6463
```sql
6564
-- B: Create and execute the COPY statement
6665

67-
COPY INTO [dbo].[DimProduct]
68-
--The column list allows you map, omit, or reorder input file columns to target table columns.
66+
COPY INTO [dbo].[DimProduct]
67+
--The column list allows you map, omit, or reorder input file columns to target table columns.
6968
--You can also specify the default value when there is a NULL value in the file.
7069
--When the column list is not specified, columns will be mapped based on source and target ordinality
7170
(
72-
ProductKey default -1 1,
73-
ProductLabel default 'myStringDefaultWhenNull' 2,
74-
ProductName default 'myStringDefaultWhenNull' 3
71+
ProductKey default -1 1,
72+
ProductLabel default 'myStringDefaultWhenNull' 2,
73+
ProductName default 'myStringDefaultWhenNull' 3
7574
)
7675
--The storage account location where you data is staged
7776
FROM 'https://storageaccount.blob.core.windows.net/container/directory/'
78-
WITH
77+
WITH
7978
(
8079
--CREDENTIAL: Specifies the authentication method and credential access your storage account
8180
CREDENTIAL = (IDENTITY = '', SECRET = ''),
@@ -121,6 +120,7 @@ The following example is a good starting point for creating statistics. It creat
121120
You have successfully loaded data into your data warehouse. Great job!
122121

123122
## Next steps
123+
124124
Loading data is the first step to developing a data warehouse solution using Azure Synapse Analytics. Check out our development resources.
125125

126126
> [!div class="nextstepaction"]
@@ -129,4 +129,4 @@ Loading data is the first step to developing a data warehouse solution using Azu
129129
For more loading examples and references, view the following documentation:
130130
- [COPY statement reference documentation](/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest&preserve-view=true#syntax)
131131
- [COPY examples for each authentication method](./quickstart-bulk-load-copy-tsql-examples.md)
132-
- [COPY quickstart for a single table](./quickstart-bulk-load-copy-tsql.md)
132+
- [COPY quickstart for a single table](./quickstart-bulk-load-copy-tsql.md)

0 commit comments

Comments
 (0)