Hello, SQL2008R2
I want to partition a table but am having problems with the partition creation
To which I get the error:
[tt]Msg 208, Level 16, State 58, Line 1
Invalid object name 'MyTestFG'.
[/tt]
Not to mention I am unclear how to associate the table say MyTable.
So where did I go wrong? Thanks
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
I want to partition a table but am having problems with the partition creation
Code:
ALTER DATABASE Temp_DJJ ADD FILEGROUP MyTestFG;
GO
ALTER DATABASE Temp_DJJ ADD FILE (
name = Test_ReadOnly1,
filename = 'C:\SQLData\MyTestFG.ndf',
size = 10mb,
maxsize = 200mb,
filegrowth = 5mb) TO FILEGROUP MyTestFG;
GO
-- Try for two partitions on prior to 6/1/12 and one after that.
CREATE PARTITION FUNCTION TestPF (DATETIME) AS RANGE LEFT FOR VALUES ('6/1/2012');
GO
CREATE PARTITION SCHEME TestIt AS PARTITION TestPF TO ([PRIMARY], MyTestFG);
GO
[tt]Msg 208, Level 16, State 58, Line 1
Invalid object name 'MyTestFG'.
[/tt]
Not to mention I am unclear how to associate the table say MyTable.
So where did I go wrong? Thanks
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!