Monday, July 30, 2012

Deleting PTR records with Upper Case text

I ran into an issue today where I had a DNS PTR record that I needed to delete, but couldn't. I would delete the record in the GUI without issue, but then I would refresh and the record would reappear.
A little searching and I found that talks about a known issue in Server 2003 DNS and upper case text. I am running Server 2008, so I assumed the issue may still exist and hasn't been patched.
However, following the instructions in the KB article and using dnscmd failed to delete the record. I didn't want to try deleting the entire zone (option 2), so I was at a standstill.

A little more searching and I came across, a posting discussing using ADSIEdit.msc to delete the misbehaving record. I deleted the record from AD, but it never cleared from DNS; and after waiting a few minutes, reappeared in AD.
I suddenly had an idea - if the upper case text is causing the problem, maybe ADSIEdit will allow me to edit the text. I copied the dnsRecord attribute from a known good record and overwrote my problem record. A few moments later DNS was updated and reflected the name change. Right-click and delete - the record is gone.

This wasn't an intuitive solution and I hope I don't have to perform it again, but at least I now have the necessary steps to repeat if necessary.


RAWSKI said...

I tried your method but it didn't work, although it sounded great. Our issue: Old server was all caps at New server under different name uses same IP but now there's a PTR that won't go away that is creating routing confusion.

Can I just delete the entry for that dead server in ADSI edit?

RAWSKI said...

I wound up having to delete ALL DNS entries for anything matching the old hostname and the current IP address, from both domain controllers. Then I had to re-create the proper hostnames via DNS. That worked for me. Thanks for the post - it was very helpful! -R