azure-sql-database

TempDB has reached its size quota: How to increase size quota for tempDB on Azure SQL

牧云@^-^@ 提交于 2019-12-10 15:17:11
问题 We are getting an error while loading data from one table to another. We do some monthly/quarterly roll ups on the first table data which is inserted into another table The source table has clustered column store index. We have billions of rows in the source data table. the SELECT part of the load script has a WHERE clause which filters data based on month and year. The error is below 'The database 'tempdb' has reached its size quota. Partition or delete data, drop indexes, or consult the

How to run multiple SQL scripts, in SSMS, against SQL Azure?

£可爱£侵袭症+ 提交于 2019-12-10 15:16:44
问题 I would like to execute multiple SQL (*.sql) TSQL script files, in SSMS, against a SQL Azure DB. I happen to be using SSMS 2008 R2 The code, I tried to execute in a SSMS query window, linked to the relevant DB instance, as picked up from a previous SO question, was : /* execute a list of .sql files against the server and DB specified */ SET NOCOUNT ON SET XACT_ABORT ON BEGIN TRAN DECLARE @DBServerName VARCHAR(100) = 'DBServerName ' DECLARE @DBName VARCHAR(100) = 'DBName' DECLARE @FilePath

SQL Azure doesn't support 'select into' - Is there another way?

孤街浪徒 提交于 2019-12-10 13:53:55
问题 I have a very complicated table I'd like to take a temporary backup of whilst I make some changes. Normally, I'd just do the following: SELECT * INTO temp_User FROM dbo.[User] AS u Unfortunately I'm using Azure, and it appears this isn't supported: Msg 40510, Level 16, State 1, Line 2 Statement 'SELECT INTO' is not supported in this version of SQL Server. Is there a way to re-create this feature into a function, potentially? I could do this by scripting the table, creating it and then

'STRING_SPLIT' is not a recognized built-in function name

南楼画角 提交于 2019-12-10 12:28:42
问题 The new STRING_SPLIT method is not available in my Azure SQL database. I had already ran ALTER DATABASE [DatabaseName] SET COMPATIBILITY_LEVEL = 130 a couple days ago, and I have verified the compatibility level is indeed set to 130. SELECT database_id, name, compatibility_level FROM sys.databases Has anyone else been able to use the new method, and if so, did you need to do anything else to get it working? 回答1: It was a syntax error. I was attempting to use the function as scalar and not as

How to do ForEach on user defined table type in SQL Server stored procedure?

≡放荡痞女 提交于 2019-12-10 10:56:59
问题 XX PROCEDURE [dbo].[XXX] @X dbo.IntType readonly AS BEGIN SET NOCOUNT ON; // how can I foreach(@X) here and do process individually? END IntType is a user-defined table type CREATE TYPE [dbo].[IntType] AS TABLE( [T] [int] NOT NULL, PRIMARY KEY CLUSTERED ( [T] ASC ) I need to use this in SQL Azure, please advice. 回答1: Cursors are the SQL equivalent of ForEach, But cursors are often a sign of bad SQL: they violate the usual set-based thinking that SQL is built on and optimized for. Search on

WCF disabling UseNagleAlgorithm while connecting to SQL Azure

℡╲_俬逩灬. 提交于 2019-12-10 10:54:37
问题 Have a bunch of WCF REST services hosted on Azure that access a SQL Azure database. I see that ServicePointManager.UseNagleAlgorithm is set to true. I understand that setting this to false would speed up calls (inserts of records < 1460 bytes) to table storage - the following link talks about it. My Question - Would disabling the Nagle Algorithm also speed up my calls to SQL Azure? 回答1: Nagle's algorithm is all about buffering tcp-level data into a smaller # of packets, and is not tied to

can't connect to DB - EADDRNOTAVAIL

℡╲_俬逩灬. 提交于 2019-12-10 10:54:13
问题 I have a simple node.js app that can't connect to a SQL Db. Web server is Azure Web App, running node.js and using Tedious for SQL. DB is Azure SQL Database. This is the detailed error: { message: 'Failed to connect to xxx.database.windows.net:1433 - undefined', code: 'ESOCKET' } Thu Jan 14 2016 08:05:05 GMT+0000 (Coordinated Universal Time): Unaught exception: ConnectionError: Connection lost - connect EADDRNOTAVAIL at Connection. (D:\home\site\api\node_modules\tedious\lib\connection.js:797

No UI dialogs in MS Azure / SQL Server Management Studio

心已入冬 提交于 2019-12-10 10:34:09
问题 Recently, I purchased a licence for a Microsoft Azure SQL Server 2012 (packet "S0" - Standard, 250 GB) When I connect with SQL Server Management Studio 2012 to this database, then all the user interface dialogs for creating tables, setting up users, etc. are gone. You can only script and execute pure SQL statements. Even the table editor is gone, so you even cannot edit the data in a table! If I connect to a local database, then everything works. So the problem must be related to the Azure

Best way to migrate a SQL CE 4.0 database to Sql Azure

佐手、 提交于 2019-12-10 09:27:28
问题 I've got an older database, developed in VS2010, which I would like to move to SQL Azure. I was hoping I could just upload the .sdf file to SQL Azure, but couldn't find a way to get that to work. I can't seem to open the .sdf file in Management Studio 2008 (I get "Incompatible Database Version"), so the easy option of generating a script is not available. Any quick and easy way to get this migration done? 回答1: Your best bet is using SQL Server Compact & SQLite Toolbox, it's a Visual Studio

Enable-Migrations “Object reference not set to an instance of an object”

十年热恋 提交于 2019-12-10 04:06:50
问题 I just created a new service fabric service that will periodically attempt to save some models to SQL Azure using Entity Framework and the Elastic Client Database library. I'm trying to model it as closely as I can to the SQL Azure Elastic Scale Client Library EF sample (Elastic DB Tools EF Sample). I'm at the point where I need to enable migrations, but when I run Enable-Migrations I'm getting the following error message. I'm using the ContextTypeName parameter since it sounded like it would