Hi, I restored an external DB into a SQL Server 2008 R2 SP2 instance. I want to structure it (in terms of data location) as I want. I've tried some methods but I have finally found out that the simplest way to do it was to generate the script (via SSMS), change the code where it's needed, drop the restored database and recreate it using the modified script.
I'm experiencing a weird problem :
Multiple tables, all using filestreams have their DDL looking like this in the script generated by SSMS :
CREATE TABLE [dbo].[ClaimDocuments](
[doc_PK] [uniqueidentifier] NOT NULL,
[doc_desc] [varchar](100) NOT NULL,
[doc_clmfk] [uniqueidentifier] NOT NULL,
[doc_FileGUID] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[doc_file] [varbinary](max) FILESTREAM NOT NULL,
CONSTRAINT [PK_ClaimDocuments] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] FILESTREAM_ON [FileStreamGroup1]
Note that the last field is varbinary(max).
I am getting this error:
Cannot use TEXTIMAGE_ON when a table has no text, ntext, image, varchar(max), nvarchar(max), varbinary(max), xml or large CLR type columns.
I don't understand why the TEXTIMAGE_ON close is coming there, but I know that if I remove it, the table create works perfectly.
Can somebody help me ?