脚本如下:
--创建数据库
CREATE DATABASE testdb
ON
PRIMARY ( NAME = testdb,
FILENAME = 'f:\testdb\testdb.mdf'),
FILEGROUP testdb1( NAME = testdb1,
FILENAME = 'f:\testdb\testdb1.mdf'),
FILEGROUP testdb2( NAME = testdb2,
FILENAME = 'f:\testdb\testdb2.mdf'),
FILEGROUP testdb3( NAME = testdb3,
FILENAME = 'f:\testdb\testdb3.mdf'),
FILEGROUP testdb4( NAME = testdb4,
FILENAME = 'f:\testdb\testdb4.mdf'),
FILEGROUP fs CONTAINS FILESTREAM( NAME = fs,
FILENAME = 'f:\testdb\fs'),
FILEGROUP fs1 CONTAINS FILESTREAM( NAME = fs1,
FILENAME = 'f:\testdb\fs1'),
FILEGROUP fs2 CONTAINS FILESTREAM( NAME = fs2,
FILENAME = 'f:\testdb\fs2'),
FILEGROUP fs3 CONTAINS FILESTREAM( NAME = fs3,
FILENAME = 'f:\testdb\fs3'),
FILEGROUP fs4 CONTAINS FILESTREAM( NAME = fs4,
FILENAME = 'f:\testdb\fs4')
LOG ON ( NAME = testdblog,
FILENAME = 'f:\testdb\testdb.ldf')
GO
--创建分区函数
CREATE PARTITION FUNCTION TYPEPF(int)
AS
RANGE RIGHT FOR VALUES (1,2,3)
--创建表分区方案
CREATE PARTITION SCHEME TYPEPS
AS PARTITION TYPEPF TO (testdb1,testdb2,testdb3,testdb4)
--创建文件流分区方案
CREATE PARTITION SCHEME TYPEFILEPS
AS PARTITION TYPEPF TO (fs1,fs2,fs3,fs4)
--创建表
CREATE TABLE TableTest(
id uniqueidentifier ROWGUIDCOL not NULL,
num int NOT NULL,
filechart varbinary(max) filestream NULL,
unique nonCLUSTERED(id asc,num asc) ON TYPEPS(num)
)ON TYPEPS(num) FILESTREAM_ON TYPEFILEPS
错误如下:
消息 5505,级别 16,状态 1,第 11 行
具有 FILESTREAM 列的表必须具有一个非 NULL 的唯一 ROWGUID 列。
请高手解答
------解决方案--------------------
没用过2008,帮顶.
------解决方案--------------------
具有 FILESTREAM 列的表必须具有一个非 NULL 的唯一 ROWGUID 列。
试了吗?
------解决方案--------------------
试试这个http://blog.csdn.net/Edwingu/archive/2010/01/06/5146005.aspx