azure-sql-database

iterate nested list in json msg by cql stream analytics

僤鯓⒐⒋嵵緔 提交于 2020-05-14 12:10:27
问题 I have a json msg coming from iotHub like: { "deviceId": "abc", "topic": "data", "data": { "varname1": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }], "varname2": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }] } } and want to store this by azure stream analytics job into a transact sql like this: ID | deviceId | varname | timestamp | respondFrame

Server closes connection unexpectedly when connecting to Azure Postgres

独自空忆成欢 提交于 2020-05-13 07:31:49
问题 I'm trying to connect to Azure Postgresql using psql from my local machine and get the following error: $ psql "host=username.postgres.database.azure.com port=5432 dbname=postgres user=username@domain password=mypassword sslmode=require" psql: error: could not connect to server: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Local Postgres version: 12.1, Azure Postgres database version: 10, macOS Majove.

Server closes connection unexpectedly when connecting to Azure Postgres

时光怂恿深爱的人放手 提交于 2020-05-13 07:29:25
问题 I'm trying to connect to Azure Postgresql using psql from my local machine and get the following error: $ psql "host=username.postgres.database.azure.com port=5432 dbname=postgres user=username@domain password=mypassword sslmode=require" psql: error: could not connect to server: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Local Postgres version: 12.1, Azure Postgres database version: 10, macOS Majove.

Server closes connection unexpectedly when connecting to Azure Postgres

蓝咒 提交于 2020-05-13 07:28:06
问题 I'm trying to connect to Azure Postgresql using psql from my local machine and get the following error: $ psql "host=username.postgres.database.azure.com port=5432 dbname=postgres user=username@domain password=mypassword sslmode=require" psql: error: could not connect to server: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Local Postgres version: 12.1, Azure Postgres database version: 10, macOS Majove.

Add Azure Active Directory User to Azure SQL Database

a 夏天 提交于 2020-05-10 18:41:17
问题 I have an Azure SQL Server and can SSMS into it. I also have an Azure Active Directory with a user named mytestuser@mytest.onmicrosoft.com. I want to add this user to have permissions to a database in my Azure SQL Server. The first step is trying to add it to the primary security of the Azure SQL Server. I have tried the following on the Master Database: CREATE USER [mytestuser@mytest.onmicrosoft.com] FROM EXTERNAL PROVIDER; CREATE USER mytestuser; But this generates the errors of: Principal

Internal .Net Framework Data Provider error 6 in SQL Azure

一个人想着一个人 提交于 2020-05-09 19:25:17
问题 I regularly experience the above error when creating connections to Azure SQL databases. I've implemented ReliableSqlConnection with retry logic in attempt to avoid this issue but it has been to no avail. Following is an example error stack trace: System.InvalidOperationException Internal .Net Framework Data Provider error 6. System.InvalidOperationException: Internal .Net Framework Data Provider error 6. at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject,

Internal .Net Framework Data Provider error 6 in SQL Azure

大城市里の小女人 提交于 2020-05-09 19:25:08
问题 I regularly experience the above error when creating connections to Azure SQL databases. I've implemented ReliableSqlConnection with retry logic in attempt to avoid this issue but it has been to no avail. Following is an example error stack trace: System.InvalidOperationException Internal .Net Framework Data Provider error 6. System.InvalidOperationException: Internal .Net Framework Data Provider error 6. at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject,

How to create a partition in Azure SQL Table

人盡茶涼 提交于 2020-05-01 09:06:13
问题 I am going to create a SQL tables in Azure SQL database, and I want to create a partition of table, but I don't know how to do that, can any one show me some demo example or query to perform this. I am using SQL management studio to connect my Azure db. 回答1: We take advantage of partitioning SQL Azure tables. We use it so we can rapidly truncate the oldest partitions of data. We have a great blog post that walks through step by step how to do it: https://stackify.com/how-to-partition-tables

How to create a table in SQL Database from a CSV file in Blob which contain all the column name with its data type through Data Flow or ADF pipeline?

只愿长相守 提交于 2020-04-30 07:13:19
问题 I am having a CSV file in my Azure Blob Storage which contain all the column name with its data Data type of respective tables. I want to create a table in SQL Database from this Blob file with the same column name with its corresponding datatype without doing the mapping. I have created a table through data flow but I have to set the data type of each column manually. But I don't want to do this. When I create a table it should accept the same data types in the source as well as synch which

Group data on different key-value pairs in a string

心已入冬 提交于 2020-04-18 06:11:33
问题 I have a table LOG that contains a field NOTES . Table LOG also contains a field NrofItems . This is on Azure SQL. NOTES is a string that contains key-value pairs separated by semicolons. The order of the key-value pairs is random. The keys are known. Example of three records: NOTES | NrofItems "customer=customer1;code=blablabla;application=SomeApplication" | 23 "code=adfadfadf;customer=customer99;application=AlsoApplication" | 33 "code=xyzxyzxyz;application=AlsoApplication;customer=customer1