DNA is just a molecule. A chemical. It is not alive. DNA is a long chain of deoxyribose sugars. Each of the sugars has one of four types of amino groups. So any particular DNA molecule has a pattern which arises due to the order of these amino groups along the chain. This pattern can be compared and sometimes matched to patterns found in DNA collected from various organisms, both living and dead, and sometimes extinct--if you can find a sample of the extinct organism's DNA somehow. You have to make the match to tell.
Your question cannot be answered generally. The answer is: it depends.
You cannot tell simply by looking at a DNA molecule where it comes from. You have to *match* its pattern with a known pattern. If you have the DNA pattern of the dead thing, or the living thing, or the extinct thing, then you can take the DNA you have and compare its pattern to see if you have a match. If you have a mixture of DNA it will be difficult to tell with certainty which organisms it matches. Perhaps you might get a sort of statistical probability of a match to a broad mixture of microorganisms.