Replication Agent supports replication of the truncate partition command.
For information about Replication Agent configuration properties, see the Replication Agent Reference Manual.
You can wrap the truncate partition command in a stored procedure definition and replicate the procedure.
For example, to replicate truncate partition commands from an Oracle primary to an Adaptive Server Enterprise replicate, create this stored procedure at the primary database:
create procedure sp_truncate_partition as begin execute immediate ‘ALTER TABLE myTable TRUNCATE PARTITION part1’; end;
Create a corresponding stored procedure at the replicate database:
create proc sp_truncate_partition as truncate table myTable part1
Mark the sp_truncate_partition procedure for replication. When sp_truncate_partition is executed at the primary database, the truncate partition command is replicated to the replicate database.