First of all, it is not "OK" to spank a child. Since a full grown dog only has the mental capacity equivalent to a 3 year old child, it is also cruel to hit a dog. Furthermore, it can make them defensive, apprehensive, fearful and aggressive.
DISCIPLINE is GUIDANCE, NOT punishment!!!!!!!
And yes, I AM a mother. I do not spank and my toddler minds very well. When she doesnt it is usually because:
1--she didnt understand (instead of spanking, I try another approach),
2-- I didnt have her attention (instead of spanking, I take her little face in my hands and guide her eyes to my face. Then, assured that I have her attention, I reassert.)
3-- she doesnt feel well, (sympathise and empathise, hold hug)
4--doesnt know how to handle her emotions (you have to learn that, you know) (instead of spanking her for having a temper tantrum I sympathise and empathise verbally. For example: In a soothing voice, "I know you dont want to go nite-nite. I'm sorry, hon. I know it's sometimes hard to do what you dont want to, isn't it." Then once she's calm and gotten herself together, hold/ hug)
5--she's hungry, (miracle tonic= food, not pain nor fear nor violence)
6 -- she's tired and needs a nap. (Nap time)
7 -- or perhaps I've been extra busy and havent given her any attention (solution=quality time)
People should keep in mind a dog's capability to do as told as well as their desire to please their master. Again, a full grown dog has only the comparable capacity of a three year old. A young puppy should no more be spanked for an accident than a child. When a child is physically, emotionally and intellectually ready to potty train, they succeed. A puppy, also a baby, will to.
In some cases, if the dog makes a mistake, try to think how the situation might have looked to them. Why might they have behaved that way? How can I modify such situations to get the desired behavioral reaction from the dog?
The best person, though, to answer your question is probably Caesar Milan, "the dog whisperer". He has a website that you can submit questions to. If you're truly interested in this, you may want to check it out.
BTW, I was spanked. Today, I have considerable issues with a dangerously explosive violent temper which I work dilligently to control. As a child, spanking me did NOT teach me proper behavior, it made me ANGRY, FRUSTRATED, VIOLENT, and OPPRESSED. I HATED my parents to the point of complete loathing. To be forced into compliance at the threat of physical violence is TYRANNY!!!!!!!!!!!!!!!!!!!!!!
I will not be a tyrant nor a dictator! I will NOT treat my daughter like a slave, my subject, or an inmate.
I . . . did NOT turn out OK. Until my daughter came along and softened my heart, I was a complete screw up. Aside from being dangerous, I was the crash and burn queen.