Windows Azure SQL Database is a cloud-based relational database from Microsoft. It is a different version that traditional SQL Server.

learn more… | top users | synonyms

12
votes
1answer
5k views

How can I alter an existing Primary Key on SQL Azure?

I want to modify an existing primary key on a SQL Azure table. It currently has one column, and I want to add another. Now, on SQL Server 2008 this was a piece of cake, just did it in SSMS, poof. ...
10
votes
1answer
248 views

Migrating from a physical database to a cloud database

What are the implications of moving a physical database created in Microsoft SQL server 2008R2, that makes use of advanced features like Full-Text Search on varchar(MAX) FILESTREAM BLOBS to SQL Azure? ...
8
votes
5answers
2k views

How can I profile SQL Azure?

I am writing a web site that uses SQL Azure heavily. However, it is painfully slow. Is there an easy way to profile the live SQL Azure instance?
7
votes
2answers
335 views

Clustered indexing is now must - why?

Earlier, there were non-conclusive to me debates/discussions on whether to (always) engage/avoid clustered indexes. Well, I understood that they are to be used sometimes with proper + specific ...
6
votes
0answers
764 views

SQL-08S01 error in FreeTDS/Azure when executing stored proc for a few minutes from Linux (but not from Windows)

I get this error on Linux (Ubuntu and CentOS) when executing a stored proc from Perl/DBI/ODBC/FreeTDS to SQL Azure: [unixODBC][FreeTDS][SQL Server]Read from the server failed (SQL-08S01) I don't ...
5
votes
5answers
4k views

How do I copy my SQL Azure database to a local SQL Server instance?

I have an OLTP database hosted on a SQL Azure instance. I want to pull a copy of the database down from the cloud so I can run some heavy extracts and OLAP-style queries against it without impacting ...
5
votes
3answers
737 views

SQL Azure Fragmentation / Database Size

I have a database running on SQL Azure that is currently 280mb. It is a test database for a system that we're going to be putting into production soon so the data frequently gets deleted in batches ...
4
votes
1answer
590 views

Linked server to SQL Azure very slow

I can use the Management studio to connect directly to my Azure SQL database and execute this query: select * from DB.dbo.DSeries where instrument='name1' and it works really fast. But if I create ...
4
votes
3answers
170 views

Easiest Way to Move 100 Databases

I need to move about 150 databases from one server to another server. SQL Server 2008 Web Edition SQL Server 2012 Preview (in a different datacenter - East Coast Azure) I was planning on moving ...
4
votes
2answers
296 views

Best practise for copying a database from production

Currently after releasing a new major or minor version of our application, we take a copy of the production database and perform the below process: Copy production database to test server Obfuscate ...
4
votes
1answer
356 views

Replication between SQL Server 2005 and Azure database

Is it possible to set up transitional replication between a SQL Server 2005 and a SQL Azure database? My server is nearing end of life and I would rather migrate to a cloud infrastructure instead of ...
4
votes
1answer
101 views

SQL Azure not using available memory

We are using SQL Azure Premium P1 which comes with 8GB ram and 150 IOPS. For a couple of hours, we have been seeing timeouts on SQL queries (even fairly simple queries take time). In logs for SQL ...
4
votes
2answers
1k views

Implementing an encrypted table in SQL Azure

I'm moving an App to Azure and need to achieve PCI compliance for a couple columns in a single table. I realize I can encrypt the data before I store it, but I was wondering if there was a feature in ...
3
votes
2answers
219 views

How do I count rows with two properties in one index scan in SQL?

I have a table Units where I have rows ItemId, ItemCreationDate, ItemUnitsCount. ItemId is a primary key and I have a clustered index over it. I need to output the following: for each day I need to ...
3
votes
1answer
90 views

Just how secure is the data I put on SQL Azure?

My wife has been asking me to create a web application for her business and from what I've read using SQL Azure would be perfect. Except for a couple of small (really really big) gotchas. She ...
3
votes
1answer
59 views

How do I deal with query getting slower when a select parameter is not specified inline?

I faced this problem twice with SQL Azure and two different queries so far. Something like this: select top(100) * from SomeView WHERE AccountId='actual-guid-typed-in-here' runs super fast but ...
3
votes
1answer
411 views

SQL Azure dm_exec_query_stats clearing?

I'm doing a lot of work with SQL Azure at the moment, trying to improve performance of a web app. I am using the dm_exec_query_stats view to look for poor performing queries. Does anyone know a way ...
3
votes
1answer
81 views

How do I back up On Premise Microsoft SQL Server 2008 to Azure cloud

I have a 50 GB hosted SQL Server database at SoftLayer. I want to do backups to cloud storage, as the SoftLayer managed SQL Server backups are ridiculously priced. Eventually we will totally move ...
3
votes
1answer
910 views

SQL Azure: More Intermittent Timeouts

(also posted on MSDN forums http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/79058c06-d3c5-4073-8571-c29d1f43f7ae) Hi guys, We have a set of 5 online auction systems running on ...
3
votes
1answer
334 views

Error while creating index in SQL Azure

I'm trying to create an index on table [Children] in SQL Azure but get the following error: The operation failed because an index or statistics with name 'IX_Children_ParentID' already exists on ...
3
votes
1answer
720 views

Azure SQL Administrator Can't Access Master Database

I created an SQL server and database. I can log in to the database manage page with my administrator account, and manage the database I created, but when I try to look at the master database, it says: ...
2
votes
4answers
455 views

How can I remove a bad execution plan from SQL Azure?

DBCC FREEPROCCACHE doesn't work in SQL Azure. How else can I force a plan to kick itself out of the cache in a way that won't hurt a production system (i.e. I can't just go alter tables willy nilly)? ...
2
votes
4answers
2k views

Can I add a unique constraint that ignores existing violations?

I have a table which currently has duplicate values in a column. I cannot remove these erroneous duplicates but I would like to prevent additional non-unique values from being added. Can I create a ...
2
votes
2answers
2k views

Will altering order of columns in GROUP BY affect performance?

I have a SQL query like this: SELECT A, B, (CASE WHEN C=0 THEN 0 ELSE 1 END), COUNT(D) FROM SomeTable GROUP BY A, B, (CASE WHEN C=0 THEN 0 ELSE 1 END) On a huge dataset the actual execution plan ...
2
votes
1answer
299 views

Rebuilding Unique Index with uniqueidentifier in SQL Azure never succeeds

We have a number of tables (~1M records) that have a column on them defined as: [GlobalID] [uniqueidentifier] NOT NULL that gets auto-populated with newid(). We use this ID for synchronizing data ...
2
votes
2answers
97 views

Workflow for SQL Server + Azure SQL development?

Lets assume the following: 5 devs all working on laptops Each develops/debugs on Azure compute emulator (code) and SQL Server (db) - both running locally on their laptops. I'd like to have ...
2
votes
1answer
102 views

Insert to SQL Azure through Linked Server very slow

I have a table on SQL Asure server with no indexes except clustered. And I insert into this table small amount of data just about 1000 rows and it takes more than 4 minutes. Although, when I do it ...
2
votes
1answer
247 views

How to remove diacritics in computed persisted columns? COLLATE is non-deterministic and cannot be used

I have a function that includes: SELECT @pString = CAST(@pString AS VARCHAR(255)) COLLATE SQL_Latin1_General_Cp1251_CS_AS This is useful, for example, to remove accents in French; for example: ...
2
votes
1answer
953 views

Rename Primary Key constraint on Azure

I'm trying to change primary key on a table in Azure storage. The plan is to create a new table, move data over and drop the old table. The problem is that I need all the constraints names to be the ...
2
votes
2answers
425 views

Reorganize Indexes T-SQL

I'm moving a database to SQL Azure and with that I lose the maintenance plans so I am going to use a Worker Role to schedule them. When I open the properties of the Rebuild Index Task and click on ...
2
votes
1answer
29 views

How can I model and enforce constraints on a categorical item contained in a collection?

Scenario: There is a collection of items where each item belongs to 1 category. There is a collection of buckets which may contain at most 1 item from each category. Oh, and an item may belong to at ...
2
votes
1answer
187 views

Use GUID as primary key in Azure?

I want to use GUIDs since they are portable and makes it easier to use several database. But since there are performance issues it might not be a good idea? Although I've found a MS blog entry which ...
2
votes
1answer
233 views

Best patterns for encrypting database columns/tables in SQL Azure

Azure SQL doesn't support many of the encryption features found in SQL Server (Table and Column encryption). We need to store some sensitive information that needs to be encrypted and we've rolled our ...
2
votes
1answer
178 views

How to create a unique column in SQL Azure Federation

I need to create two columns in a federated table where ID is a primary key and EMAIL_ADDRESS can never contain duplicate values. Think of it like a user being able to register only one email address ...
2
votes
1answer
31 views

Azure Database Size Same Before and After Deleting Most of the Rows

I have a database hosted on Azure which is showing as nearly full, it is at 1017MB/1024MB. The table contained around 27000 rows, I have deleted 20000 of those rows to try and free up space, however ...
2
votes
1answer
61 views

Logging and Replaying database updates/inserts SQL Server 2008

I am in the process of migrating our client's database to the Azure Cloud SQL Server and setting up data sync etc. All of this is ok, but I need to reduce the amount of time the client's system needs ...
2
votes
1answer
93 views

Pricing of databases in Azure

I am a little bit confused about pricing for Data in Azure. I found on one MS Blog that 50GB has a price of $125. Missing part for me is, if I have needs only for a database in the cloud: Do I pay ...
2
votes
2answers
430 views

Is it OK to create hundreds of databases in SQL Azure versus one big one and run the risk of deadlocking

I need to create highly scalable solution - where field devices in thousands of sites are delivering data in real time to a back end system, and SQL Azure seems to fit the bill nicely in terms of ...
2
votes
0answers
8 views

Should I use SQL Azure to store product descriptions and links to images in Azure Blob

For an html/Css/JQuery public Azure website to be coded using Zurb Foundation html5 responsive framework, I'd like to use SQL Azure (web edition) to store product descriptions and links to images that ...
2
votes
0answers
130 views

How do I back up and restore a SQL Azure database?

How do I back up and restore a SQL Azure database? For that matter, how do I back up and restore an entire Azure account? Let's suppose I am working at a company and I buy a 3 month trial account ...
1
vote
2answers
735 views

EF Code First uses nvarchar(max) for all strings. Will this hurt query performance?

I have some databases created using Entity Framework Code First; the apps are working and in general I'm pretty happy with what Code First lets me do. I am a programmer first, and a DBA second, by ...
1
vote
2answers
485 views

Running out of Transaction Log space during Alter Table

I'm running an alter table, alter column on a table with nearly 30 million rows and SQL Azure fails after approximately 18 minutes saying that The session has been terminated because of excessive ...
1
vote
3answers
409 views

single select vs multiple selects using limit and offset

Working on a fairly high volume site. There are some tables example - the customers table which gets hit a lot. The problem We are writing a piece of code that selects a bunch of customers and ...
1
vote
3answers
413 views

How to know the user doing a delete action on an audit table, when using a shared login?

Background information: I'm creating a collection of audit tables to keep track of updates and deletes to a set of data tables for my app. Audit records are created via triggers. DML in my app's ...
1
vote
1answer
35 views

Azure: Replication Beginner help

We have SQL Azure database running with our website. However today's outage of SQL Azure give us a setback. And now we are looking a way to replicate [as I read on internet] is best to do have 2 ...
1
vote
3answers
947 views

Database user permissions: GRANT VIEW DEFINITION but DENY on some object types

I'm trying to figure out a combination of permissions that will allow a partner to see basic db schema but not expose objects including code. So, VIEW and SELECT on TABLES (including keys) ...
1
vote
2answers
114 views

Connect to SQL Server 2012 running on Azure VM via local SSMS 2012

I have been testing VM on Azure. I have created a SQL VM running SQL 2012 on Windows 2012 and would like to connect to it via SSMS 2012 on my local instead of connecting via RDP through Azure Portal. ...
1
vote
2answers
71 views

How do I add/remove tables to a Windows Azure database?

I have a Windows Azure database which I wish to add/remove tables to, and yesterday I witnessed a colleague do this online, on what looked like a web based SQL management studio, but I can't find it ...
1
vote
1answer
61 views

Can I limit the time a table lock is being held server side?

I have a SQL Azure server with some stored procedures with TABLOCKX hints that I call from C# code on a Windows Azure web role VM. I'm kinda paranoid about those hints - what if there's some network ...
1
vote
1answer
355 views

SQL Azure: Drop Constraint and Index

This may be a stupid question, but I'm not a DBA and just wanna make sure of what I'm doing before I make a mistake. Here is my question: When dropping Constraints, are their indexes dropped as well? ...