Police were called to Iron Street just after 4am on Sunday after the woman was woken by a man in the bedroom of her home.
The man allegedly assaulted the woman and tried to strangle her before her dog ran into the room and attacked the man.
This interruption gave the woman time to run and hide in the bathroom, while her alleged attacker fled the scene.
Police launched an investigation and arrested a 34-year-old man, who is known to the woman, at a home on Victoria Rd in Parramatta about 10pm on the same day.
He was taken to Parramatta police station where he was charged with break, enter and assault with intent to murder.
The man was refused bail and will appear at Parramatta Local Court on Monday.
What a Good Boy! Dogs are such good people!