If your dog suddenly starts peeing in the house (or other unacceptable places), it could be caused a urinary tract infection.
Other possible urinary issues your vet might find include cystitis (inflammation of the bladder), crystals in the urine, and/or bladder stones.