Whenever your pet sprays, defecates or urinates in your home it is very important for you to take action immediately. The first step to take is removing the stool and then dabbing any excess moisture up as soon as you can with a swab or damp cloth. It is better to not let the area dry before you clean it.
Thoroughly clean the area using an enzyme cleaning product. Carefully follow the instructions to have the best chance of preventing the area that has been soiled from getting an unpleasant odor. You can purchase enzyme cleaners at your local supermarket and also from your veterinarian or at a pet store.
If you don't happen to have an enzyme cleaner on hand, use the foam from either a spot and stain remover or solution of water and laundry detergent. There are enzyme cleaning properties contained in most of those products.