To inhibit DNase activity you can use several methods

1) Inhibit the enzyme activity

Low temperature reduces the optimal temperature conditions for enzymes activity. Keeping DNA on ice helps with reducing enzyme activity

Chemical Inhibitors of DNases include:

2-mercaptoethanol (Laskowski 1971)
2-nitro-5-thiocyanobenzoic acid (Moore 1981)
Actin (Mannherz et al. 2008, and Lazarides and Lindberg 1974)
Alfatoxin B2a, G2, G2a, and M1 (non-competitive) (Schabort 1970)
Ca2+ (Moore 1981)
EGTA (Moore 1981) and EDTA (Junowicz and Spencer 1973)
Sodium dodecyl sulfate (Liao 1975a)
Calf spleen inhibitor protein (Laskowski 1971)
Carbodiimide and cholesterol sulfate (Iwamori 2000)
Iodoacetate (Moore 1981)

2) reduce enzyme number by capturing proteins from the nuclear extract or cytosolic extract. You can precipitate out proteins and clear most Dnases

3) use double distilled purified water when storing and or creating buffers for isolating DNA

4) never use pipettes used for other tasks such as protein isolation. Always clean pipettes carefully and DNAse treat before using for PCR or DNA extraction

5) Always use sterlized / autoclaved equipment and tubes

6) DNA is best used FRESH, and stored at -20 C preferrably or – 80 C for long term storage. Other methods include lyophilized, or paper dried storage for long term storage to prevent the aqueous environment needed for enzyme activity