Partition Splitting Problem<Changed>

  • Hi All,

    I have monthly partition (Size 150 GB per month). I forgot to create partition for January-2013. So all the January Data went to the dummy partition I created for the last range. As microsoft recomends the last partition should be empty.

    I tried to create a partition for January and get the data in the dummy partition to the newly created partition. But the script ran for more than a day without any data transfer.

    I am not sure how to create new partitions for the table now. The server is having 32 cores and 128GB memory. So I don't think transfering 50GB data (till Jan 12th) witll be a problem for it.

    MY Script::

    ALTER DATABASE DBName ADD FILE

    (NAME =F_TBL_201301,FILENAME ="<location>\F_TBL_201301.ndf",

    SIZE = 50MB, MAXSIZE = unlimited, FILEGROWTH = 10%

    ) TO FILEGROUP FG_TBL

    ALTER PARTITION SCHEME PS_TBL NEXT USED [F_TBL_201301];

    ALTER PARTITION FUNCTION PF_MSCRaw() SPLIT RANGE (20130131)

    Masters.....CAN ANYBODY HELP???

    -Swaroop

  • ALTER DATABASE DBName ADD FILE

    (NAME =F_TBL_201301,FILENAME ="<location>\F_TBL_201301.ndf",

    SIZE = 50MB, MAXSIZE = unlimited, FILEGROWTH = 10%

    ) TO FILEGROUP FG_TBL

    ALTER PARTITION SCHEME PS_TBL NEXT USED [F_TBL_201301];

    ALTER PARTITION FUNCTION PF_MSCRaw() SPLIT RANGE (20130131)

    Your NEXT USED is suppose to specify the filegroup and not the actual file.

    ALTER DATABASE DBName

    ADD FILEGROUP FG_TBL_201301;

    GO

    ALTER DATABASE DBName

    ADD FILE

    (NAME =F_TBL_201301,

    FILENAME ='C:\F_TBL_201301.ndf',

    SIZE = 50MB,

    MAXSIZE = unlimited,

    FILEGROWTH = 10%

    ) TO FILEGROUP FG_TBL_201301;

    GO

    ALTER PARTITION SCHEME PS_TBL NEXT USED [FG_TBL_201301];

    GO

    ALTER PARTITION FUNCTION PF_MSCRaw() SPLIT RANGE (20130131)

    ---------------------------------------------------------------
    Mike Hahn - MCSomething someday:-)
    Right way to ask for help!!
    http://www.sqlservercentral.com/articles/Best+Practices/61537/
    I post so I can see my avatar :hehe:
    I want a personal webpage 😎
    I want to win the lotto 😀
    I want a gf like Tiffa :w00t: Oh wait I'm married!:-D

  • I create one file group for each file. Actually that kind of issue will give you error right away. My script ran for more than a day without any output. Now the problem has become more critical. I stopped the script and the rollback is running more than 12 hours.

    I am DEAD...

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply