Page 1 of 1

Help with Azure and FILESTREAM

Posted: Wed 13 Nov 2013 13:41
by brace
I am using the trial version.

I have a local db that i would like to "copy to azure" using schema and data comparison.

i created an empty db on Azure, if I run schema comparison I got of course as result that alla tables must be created.

One of my tables is a BLOB container.

The CREATE script made by Management Studio is:

Code: Select all

CREATE TABLE [dbo].[DOC_FILES](
	[ID_DOC_FILE] [int] NOT NULL,
	[DOCUMENT] [varbinary](max) FILESTREAM  NULL,
	[GUID] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
	[FILE_SIZE] [int] NULL
 CONSTRAINT [PK_DOC_FILES] PRIMARY KEY CLUSTERED 
(
	[ID_DOC_FILE] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY] FILESTREAM_ON [MyFileName],
UNIQUE NONCLUSTERED 
(
	[GUID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] FILESTREAM_ON [MyFileName]
while the CREATE script made by DBForge is:

Code: Select all

CREATE TABLE dbo.DOC_FILES (
  ID_DOC_FILE int NOT NULL,
  DOCUMENT varbinary(max) NULL,
  GUID uniqueidentifier NOT NULL DEFAULT (newid()),
  FILE_SIZE int NULL
  CONSTRAINT PK_DOC_FILES PRIMARY KEY (ID_DOC_FILE),
  UNIQUE (GUID)
)
the main difference is that FILESTREAM and ROWGUIDCOL (2 mandatory things to manage FILESTREAM on SQL Server) are not added in DBForge.

Could you please help me in finding out how to make Filestream work on azure?

Thanks.

Re: Help with Azure and FILESTREAM

Posted: Wed 13 Nov 2013 14:05
by brace
A thing comes to my mind: is it really needed to use filestream on Azure? May be they want people to usetraditional blobs on SQL Azure?

Re: Help with Azure and FILESTREAM

Posted: Wed 13 Nov 2013 15:40
by alexa
We would recommend you to refer to the following link http://msdn.microsoft.com/en-us/library ... 56142.aspx