SQL Server 2012 Manage Partition Wizard
-
sábado, 02 de junio de 2012 7:27Usuario que respondeIs there a way to add an empty partition? Thanks.
Kalman Toth SQL SERVER 2012 & BI TRAINING
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012- Editado Kalman TothMicrosoft Community Contributor, Editor miércoles, 10 de octubre de 2012 19:08
Todas las respuestas
-
lunes, 04 de junio de 2012 3:02Moderador
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 tryALTER PARTITION FUNCTION name ()SPLIT RANGE ();
Regards,
Amber zhang
- Editado amber zhangModerator lunes, 04 de junio de 2012 3:03
-
lunes, 04 de junio de 2012 14:13Usuario 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:04Moderador
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
- Marcado como respuesta amber zhangModerator lunes, 11 de junio de 2012 6:22

