Persistence and stick-to-it-ness. I am a huge believer in staying the course, making sure you put the time in to achieve your goal. That said, sometimes we have to abandon our plan A and go with plan B.

How do you know when?

So tough to decide. However, there are signs and themes to examine.

First and foremost is your effort. Have you honestly put the proper effort required? Have you given it enough time? We tend to under estimate the effort and time required to reach a goal.
Be brutally honest with yourself. Lying is not the path to success.

The other consideration is progress. Are you making any progress following your plan? Does it line up with the effort and time? If no, or little progress is made following your original plan it may be time to go to plan B.

A final consideration that makes it easy to move from one plan to another is the reason(s) plan A is not working. Can you identify the reason? If its the cornerstone of plan A, try plan B.