Thursday, August 27, 2009

MCTS 70-433 Moving Partitions

One of the popular new features of both SQL Server 2008 and Oracle 11g is compression.


The idea is that when "old data" is only require for historical analysis and audit, it can be moved to cheap/slow storage devices possibly with compression.


So in the Orders table, you might want to move the 2007 partition to the Order_History table, for this you can use the SWITCH PARTITION clause of the ALTER TABLE statement:


ALTER TABLE Orders SWITCH PARTITION 3 to Order_History PARTITION 5.

No comments: