azure-sql-database

Connect to Azure SQL DB from a Azure Functions in JS

这一生的挚爱 提交于 2021-02-19 06:00:29
问题 I am trying to connect to my Azure SQL DB from an azure function written in nodeJS. I have set the connection strings in the application settings and it still does not work. I used ODBC key for connection settings. Did anyone try this? Below is the sample code for my function var Connection = require('tedious').Connection; var Request = require('tedious').Request; // Create connection to database const config = process.env["sqldb_connection"]; var connection = new Connection(config); //

Not able to build Visual Studio Database Project targeting Azure SQL Database when using AT TIME ZONE

房东的猫 提交于 2021-02-18 17:09:31
问题 We have a Visual Studio Database Project that we are trying to move to Azure SQL Database. Some of our views use AT TIME ZONE which is supported in Azure SQL Database, but when I switch the database Target Platform to Microsoft Azure SQL Database in the project properties, it fails to build with error: Error: SQL46010: Incorrect syntax near TIME. I have connected directly to the database in Azure and I can use AT TIME ZONE , but I cannot create or publish a DACPAC file from my project. This

Arithmetic overflow error converting expression to data type int for basic statistics

社会主义新天地 提交于 2021-02-16 20:18:16
问题 I am trying to do a basic query that calculates average, min, max, and count. SELECT MIN(column) as min, MAX(column) as max, AVG(column) as avg, count(*) as count FROM database.dbo.table; Where column is of type int , and the database is azure sql standard. and in return, i get an error: "Arithmetic overflow error converting expression to data type int" Why is int getting a casting-to-int problem in the first place? and is there something I can add that will make this work on all numerical

Azure SQL Database Development Environment

假装没事ソ 提交于 2021-02-16 14:03:06
问题 How can I setup SQL Azure Database for development. I currently have few SQL databases ProjectName-Development, ProjectName-Staging, ProjectName-Production ... Is this the right way? This is getting more and more expensive. 回答1: I would recommend (from experience) using Azure only for Staging and Production environments. SQL Server 2016 Developer Edition is free (so is SSMS) so you can do all of your local development ... locally. When you're ready to go to staging, you can then perform a

Can we have multiple readers(reading records through pagination) in a single batch job

巧了我就是萌 提交于 2021-02-11 17:52:25
问题 I have a spring batch job to be written . where : I need to read say 10k records through pagination(fetching 1000 rec at a time) (from azure SQL db) I need to use 1000 records at a time and then use one column of these records(say some id) to read corresponsing records from another cosmos db table. How do I implement 2 readers in this case as I need to read 1000 records at a time and again fetch records from cosmos db for those 1000 records first and process that. 回答1: There is a common

Login failed for user '<token-identified principal>' but works in Data Studio

不问归期 提交于 2021-02-11 12:32:16
问题 I am trying to use my AD account to connect to the Azure SQL using Java 8, JDBC Driver, and my accessToken. When I use Data Studio using my AD Account, I can connect successfully to the Azure SQL DB. But when I use my Java Program then it gives me this error: Request processing failed; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '' My code abstract: SQLServerDataSource ds = new SQLServerDataSource(); ds.setServerName("NAME.database.windows.net");

Migrate JSON data from Azure SQL DB to Cosmos DB results in string values

匆匆过客 提交于 2021-02-11 12:20:42
问题 I'm trying to migrate data from SQL DB using CosmosDB Data Migration Tool and I successfully migrated data from SQL DB but the result is all values are string Wondering if there's a way to convert those JSON to Object during migration process? Here's my sample Query select json_value(Data, '$.timestamp') as timestamp, json_query(Data, '$.Product.detail') as [Product.detail], json_value(Data, '$.Product.price') as [Product.price] from myTable nesting seperator: . 回答1: 1.create a dataflow and

Azure SQL and AAD Authentication

感情迁移 提交于 2021-02-11 08:45:42
问题 Is Azure SQL support access via AAD Client Id & Secret? If yes what would be the TSQL to give access to AAD ClientId and Can I use SSMS to connect to Azure SQL with AAD Client and secret? 回答1: Yes you can use the Access token (AD Token) Applications/services can retrieve an access token from the Azure Active Directory and use that to connect to SQL Azure Database. Provide anything( http://mytokentest ) in signonURL as while Registering your APP CREATE USER [mytokentest] FROM EXTERNAL PROVIDER

Cannot login with read-only user to SQL Azure database

故事扮演 提交于 2021-02-10 22:13:13
问题 I've followed the answer to this question: In SQL Azure how what script can I use to create a read only user I've completed all the steps successfully on the correct server. However, when I try to login to the Azure database, I'm getting the following error: Login failed for user 'readerUser'. This session has been assigned a tracing ID of '(some guid)'. Provide this tracing ID to customer support when you need assistance. I've tried this in both my ASP.NET website and in my LINQPad, they

Azure storage for files in specific folder structure

情到浓时终转凉″ 提交于 2021-02-10 12:38:13
问题 Currently i have some ftp where on it i have some deep structure of folders and files within it. It could be even 10 levels down from root folder. As i migrated already with success my local database to azure database, i wonder also whether is there any azure ftp i could use to migrate this as well. I know we have something like Azure storage and i could create Container for it of type File or Blobs - are one of those could be used like particural ftp - could i create folder structure there