If you are married not really, but be aware that they will scrutinize your marriage very closely if you are not living together (especially extended period of time). That is of course if you apply inland.
It is obvious that if you apply outland (your spouse not being in Canada), then you will have to be separated.
And yes in order to be able to sponsor your spouse you would have to be living in Canada unless you are sent out by Canadian government or military forces.