Hi Prafull,
Metadata cleanup is for publication. Why do you think that it is for
database. You can refer to this article:
sp_mergemetadataretentioncleanup (Transact-SQL)
http://msdn.microsoft.com/en-us/library/ms178557(SQL.90).aspx
Metadata cleanup process will call sp_mergemetadataretentioncleanup which
performs a manual cleanup of metadata in the MSmerge_genhistory,
MSmerge_contents, MSmerge_tombstone, MSmerge_past_partition_mappings, and
MSmerge_current_partition_mappings system tables. This stored procedure is
executed at each Publisher and Subscriber in the topology. If you go to see
the tables schema, you can find that there is no database at all. All are
for publication. Anyway you can test to prove this point.
Let us look at your three questions:
1. when the meta data cleanup will happen for above publications?
Answer: After the publication retention peirod arrives.
2. When the metadata will be cleanedup for the subscriber?
Answer: After the publication retention period arrives
3. Can i run the metadata cleanup sp say on day 10? Will this clean meta
for pub7?
Answer: You can mannually call the stored procedure
sp_mergemetadataretentioncleanup on day 10. It will not clean meta data for
pub7. One thing whic is documented in the above article that you may notice
is as following:
==========================
If there are multiple publications on a database, and any one of those
publications uses an infinite publication retention period, running
sp_mergemetadataretentioncleanup does not clean up the merge replication
change tracking metadata for the database. For this reason, use infinite
publication retention with caution. To determine if a publication has an
infinite retention period, execute sp_helpmergepublication (Transact-SQL)
at the Publisher and note any publications in the result set with a value
of 0 for retention.
===========================
Hope this helps.
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg.DeleteThis@microsoft.com.
===========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
>> Stay informed about: Metadata cleanup - Merge publication