D.C.
I don't know if this will work with your son, becasue I don't know what punishments you use with him at 2, but what I did with my kids was - if they threw a toy (for example) after they had been told not to, I would just walk of=ver to the toy, and take it away. Put it in a laundry basket or something in the closet, and leave it there.
It may take a wahile, but eventually he may run out of toys, and realize, oops!