To me scratching, or anything that causes pain to another person, hitting, kicking, biting, is aggression. And a major capital offense. It's not your job to get angry at a toddler for learning, but this does need firm discipline for the safety of others and to click immediately with a 2 year old.
My two year old daughter attempted her first (and last) try at biting several weeks ago. I heard the blood curdling scream from my 3 year old and found him with a black finger tip and two little DEEP teeth marks. He was so frantic and in pain, he was literally wincing away from her and screaming at her to get away from him. She looked at me like a dear in headlights, not understanding what had happened. Because this will never be allowed, I did what stopped all such behaviors in just one try in all my kids.
I got down eye level and calmly said in my gravest serious voice, "You do NOT BITE." while pointing at her brother's finger. She KNEW the jig was up and said "sorry" but just for the sake of security, I gave her a very firm, non angry swat on the butt. She cried like her heart would break. When she calmed down, I reminded her again never to bite and told her to give her brother a hug and say sorry to him. They were laughing and playing two minutes later. She hasn't done it again, and she won't. None of my kids have ever needed hovering or redirecting. A simple "no" is all they need to drop the stick or whatever at a playground or daycare. They do not hurt others.
As for the rumor that spanking will confuse or teach aggression is OK: total lie. All my friend's non spanked kids hit, pinch, bite, kick, and scratch for much longer.
Do not give your child the innate belief that wounding you is anything less than absolutely not tolerated. You can use logic for him and milder consequences like time outs when he gets older and his foundation of right and wrong is firm. He's too young to reason at this age, but he does have impulse control.