Hi,
I am sorry your dog is having behavior problems.
Have you had him checked at your vet's lately to make sure he is healthy?
The next I would do if all is well, is take him to Dog Training classes.
I would also start putting belly bands on him, several members here make and sell them. They will help stop the marking on your rug and furniture.
I hope this helps a bit...other members will have some other ideas...Good Luck!