Adding devices to a segment

To add a device to a segment, follow these steps:

  1. Use sp_helpsegment to check the amount of free space available on the devices in the segment with.

    If space on any device is extremely low, see “Problems when devices for partitioned tables are full”.

    You may need to copy the data out and back in again to get good data distribution.

  2. Initialize each device with disk init, and make it available to the database with alter database.

  3. Use sp_extendsegment segment_name, device_name to extend the segment to each device. Drop the default and system segment from each device.

  4. Unpartition the table.

    See “alter table...unpartition Syntax”.

  5. Repartition the table, specifying the new number of devices in the segment.

    See “alter table...partition syntax”.

  6. If a clustered index exists, drop and re-create it. Do not use the sorted_data option.

    See “Distributing data evenly across partitions”.

  7. Dump the database.