我创建了[PartitionDB]
,其中包含两个文件组 - [PRIMARY]
和[Second]
,如下所示。
CREATE DATABASE [PartitionDB] ON
PRIMARY
( NAME = N'PartitionDB',
FILENAME = N'D:\PartitionDB\PartitionDB.mdf' ,
SIZE = 3072KB , FILEGROWTH = 1024KB
),
FILEGROUP [Second]
( NAME = N'PartitionDB_2',
FILENAME = N'D:\PartitionDB\PartitionDB_2.ndf' ,
SIZE = 3072KB , FILEGROWTH = 1024KB
)
LOG ON
( NAME = N'PartitionDB_log',
FILENAME = N'D:\PartitionDB\PartitionDB_log.ldf' ,
SIZE = 9216KB , FILEGROWTH = 10%
)
它已经创建,然后我创建了一个分区函数,如下所示:
CREATE PARTITION FUNCTION ordersPartFunc (DATE)
AS RANGE LEFT
FOR VALUES ('2015-01-01')
哪个成功创建,然后我尝试了创建分区方案:
CREATE PARTITION SCHEME ordersPartScheme
AS PARTITION ordersPartFunc
TO ([Second], [PRIMARY])
但我收到以下错误:
错误:无效的对象名称'Second'。
有人可以帮帮我吗?