815
Chapter 31: Managing Data in Windows Azure SQL Database
31
to remove are those listed in step 3 (PAD_INDEX, ALLOW_ROW_LOCKS, and
ALLOW_PAGE_LOCKS).
■ (^) The newsequentialid() function isn’t supported in SQL Database because
there is no CLR support in SQL Database, and thus all CLR-based types aren’t sup-
ported. The newsequentialid() return value is one of those types. Also, the
encryption option isn’t supported because SQL Database as a whole doesn’t yet
support encryption.
■ SQL Database doesn’t support heap tables. Thus, you need to change any heap table into
a clustered table by adding a clustered index. (Interestingly, if you execute one state-
ment at a time, you can create a heap table. However, any inserts into that table fail.)
A word about the fi nal item in the list. The syntax for defi ning a clustered index looks like
this:
CREATE TABLE [dbo].[Contact]
(
[ContactID] [int] NOT NULL,
[Name] nvarchar NOT NULL
PRIMARY KEY CLUSTERED
(
[ContactID] ASC
)
)
After you make the changes just described to your SQL script, it should look like the
following:
/**Object: Table [dbo].[Users] Script Date: 03/31/2010 23:39:20**/
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Contact](
[ContactID] [int] IDENTITY(1,1) NOT NULL,
[NameStyle] [bit] NOT NULL,
[Title] nvarchar NULL,
[FirstName] nvarchar NOT NULL,
[MiddleName] nvarchar NULL,
[LastName] nvarchar NOT NULL,
[Suffix] nvarchar NULL,
[EmailAddress] nvarchar NULL,
[EmailPromotion] [int] NOT NULL,
[Phone] nvarchar NULL,
[PasswordHash] varchar NOT NULL,
[PasswordSalt] varchar NOT NULL,
[rowguid] [uniqueidentifier] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
c31.indd 815c31.indd 815 7/31/2012 10:00:26 AM7/31/2012 10:00:26 AM
http://www.it-ebooks.info