Moving data from one mdf to multiple ndf files

  • I have a database with one 110g mdf file. I would like to stripe the I/O across five 25g files and purge the data out of the 110g file so they

    are all the same size. What is the easiest way to accomplish this task, if possible?

  • Create the additional files on the desired drives, and then you should identify the most utilised tables and split them accordingly.

    You would simply change the storage for the clustered index, to move the actual table data to a new file.

    Is there any reason you want to do this though?

    Is I/O a problem or is there an issue with the overall amount of diskspace required for the Database?

    EDIT: Not sure if it is possible to do exactly what you're looking to for in your explanation above - you are basically wanting to exactly split the I/O across the 5 drives?

    Ultimately you're looking to RAID.

  • smitty-1088185 (4/19/2013)


    I have a database with one 110g mdf file. I would like to stripe the I/O across five 25g files and purge the data out of the 110g file so they are all the same size.

    Why? What's the goal here, what are you expecting to achieve by doing this?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I'm trying to performance-tune the SharePoint WSS_UsageApplication database which is getting hit pretty hard. I noticed the auto stats were off, there were missing indexes and one single mdf file.

  • Why is a single mdf file being classed as a problem though?

    Are there large disk queues?

    If so, splitting up onto multiple files may not help (in some cases it can make matters worse).

    you'll have to look at the underlying causes if there is a problem with I/O.

    Start with the missing indexes...

  • smitty-1088185 (4/19/2013)


    I'm trying to performance-tune the SharePoint WSS_UsageApplication database which is getting hit pretty hard..

    Is it IO-bottlenecked?

    Are those 5 files going to be on separate IO channels?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • McSQL (4/19/2013)


    Start with the missing indexes...

    You can't add indexes to a sharepoint content database without losing all support.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (4/19/2013)


    McSQL (4/19/2013)


    Start with the missing indexes...

    You can't add indexes to a sharepoint content database without losing all support.

    Really, I didn't know that. As soon as I created the missing indexes the I/O dropped from 50% to 7%. Maybe I need to look

    at SharePoint documentation instead of just SQL.

  • Yup, the indexing in sharepoint is terrible and if you add any useful indexes it will probably perform better. If you then call MS support with any problem, they'll pretty much just tell you to have a nice day.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 9 posts - 1 through 8 (of 8 total)

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