You can imagine how sad some of us were when the last remaining flyable SR-71s, maintained in flyable storage by NASA Dryden for flight experiments, were finally retired for good. Here's a NASA page on them, but I haven't seen anything explicitly published on when in the early 2000s the decision was made to pull the plug:
https://www.nasa.gov/centers/armstrong/news/FactSheets/FS-03... One year they were still doing J58 runs, another they were on static display out of the hangars. @jhugo's comment is right.