Answered SQL Server 2012 Manage Partition Wizard

Todas las respuestas

  • lunes, 04 de junio de 2012 3:02
    Moderador
     
      Tiene código

    Hi SQLUSA,

    Based on my test, the manage partition wizard can switch in /switch out the partition table, which can  not split the partition function. Meanwhile I tired the partition functions in UI, which can not be modified.

    So if you want to add an empty partition in an existing partition table, you need to edit the partition function by T-SQL only.  You can try

    ALTER PARTITION FUNCTION name ()SPLIT RANGE ();


    Regards,
    Amber zhang

  • lunes, 04 de junio de 2012 14:13
    Usuario que responde
     
     

    Thanks Amber.

    I get the warning message even before entering the sliding wizard:

    This table does not have an empty partition, which is required switching in data.

    What should I do?


    Kalman Toth SQL SERVER & BI TRAINING

  • martes, 05 de junio de 2012 3:04
    Moderador
     
     Respondida Tiene código

    Hi SQLUSA,

    >>This table does not have an empty partition, which is required switching in data.

    Thank you for your update. Regarding to the message you provided, which means if you want to switch in data, you need an empty partition first. So you can try to check is there any empty partition in that table using the code as below:

    SELECT p.partition_number, fg.name, p.rows
    FROM sys.partitions p
        INNER JOIN sys.allocation_units au
        ON au.container_id = p.hobt_id
        INNER JOIN sys.filegroups fg
        ON fg.data_space_id = au.data_space_id
    WHERE p.object_id = OBJECT_ID('Partitioned_Table')
    If there is no empty partition, you need to SPLIT the partition  as I mentioned above, and then you can switch in.

    Regards, Amber zhang