I have a DNS server (Win 2003) which handles a few hundred domains. If one of our clients changes their domain to use DNS servers which are not ours, we still have all of the records. Is there a way of automatically pruning these domains so that they don't accumulate?
You could probably code up a script that uses the DNSCMD utility from the Windows Support Tools to enumerate all the DNS zones on your DNS server, and then check via WHOIS (or via an off-site DNS server) whether or not your server should be the authoritative DNS server. If it's not, the script could call DNSCMD to delete the offending zones.
Being somewhat of a dangerous operation, you might want to put a human in the loop (at least initially) to make sure that the script doesn't go nuts. (I'd have the script export the zone for "safe keeping" just in case before deleting it.)
Not automatically no. You'd have to use dnscmd to get a list of all your zone files then do an NS lookup on each zone. Pull out those that don't have your DNS as an authoritative server and use dnscmd to delete them.
You could script much of this, though it's the sort of thing I'd want to do manually maybe once a month.
JR
I don't know if it is possible to enable counters for a particular zone but that would indicate which zones do not have any traffic and most likely you were removed as the nameserver for that domain.