Two months may be enough. It really depends on multiple factors, including:
- the amount of PM training you have had
- the amount of PM experience you have had
- how close the PM work you have done is to PM as specified in the PMBOK Guide
- at what rate you can learn and absorb the differences between PM as practiced at your business vs. specified in the PMBOK Guide
- your test taking skills
For me, it took just a few weeks because I had a lot of relevant experience. I recommend an approach that will give you a variable time frame in which to study:
- sign up for the exam but don't set a date (you have at least 6 months -check current PMI rules as to how long you have from being granted a seat in the exam until when you must use it)
- get a set of good practice tests
- using the tests, find your strengths and weaknesses (mine were HR, contracting, and schedule network diagrams)
- study the weak areas and try the practice tests again.
When you can score at least 85-90% on the practice tests, you are ready to attempt the real test.