Space Issue for a Table Move

  • I have a situation as below. Could you please share your opinion to resolve it?

    Situation: Need to Move a 300GB Table from one Drive to Another.

    Solution as per me:

    Option 1: Recreate a cluster index to new Drive.

    Option 2: Take a Lite Speed backup and do an Object Recovery to that table to new Drive.

    Issue: Customer will get 300 GB Free space in new drive only when he will be able to move some files to original old drive after removing the 300GB table from it’s location. So we can not have 600 (300+300) GB Blocked any time.

    So I have below questions:

    1. Moving a table by recreating cluster Index –

    While table is moving (ONLINE = ON), how the space is consumed? Will it first move the table in new file group completely and then delete from the old file group (That means there will be a point of time where both file group will be taking space of that table size)?Or it will do the operation in batch? That means... It will move some rows in a chunk to new file group, commit it, clears space from old file group and then proceed with next chunk?

    2. Using Litespeed –

    For an object level recovery of a 300GB table, what will be the temp file size? Also is there any formula to compute the space need for temp file for Lite Speed object level recovery?

    Many thanks in advance for your expert opinions.

  • Recreating the clustered index will not move the actual table. It will only move the location of the clustered index. To move the table to a new location you have to create a new filegroup on that location and move the table to that new filegroup.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Yep... Thanks for that.. However I am actually concerened about space crunch.

    Could you please advice on that?

  • For my knowledge (no hands-on experience) :unsure: : You need enough space on both filegroups (on the old AND on the new location). The old location will eventually free up the data in the file, but not actually free up the space on disk untill you truncate the file.

    Also keep in mind that the logfile will grow and thus need additionalspace.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

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

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