Sometimes you need to list all the tables that are being published on a server. Once you have the list it is really nice to have the table sizes too (row count and total MBs for table). This script will do the following.
- It looks at all the databases, finds the ones that are published
- Then if grabs the row counts and table sizes for tables in those databases
- Then compares that to the articles in the publications and gives you a nice easy to read report
Please Note: This assumes no filters on the publication. If you have a very large table and are only replicating 5 of 60 columns, if will not see that and will give you the numbers for the entire table.