if you are not new immigrant, the time will be ok. you will wait about 2.5 hours at vancouver.
the flight seldom delay from Beijing to vancouver. they often arrive a little bit early.
The only delay you need consideration is the immigrant office.
if you are new immigrant, I am sure you can not catch up the flight to Ottawa.
Air canada will change you flight to Tornoto then ottawa. you will arrive Tornoto at midnight.
you have to stay in airport, then take early morning flight to Ottawa.
remember take off flight quickly. because the line of Canada Customs is very long. you will wait a long time.
remember the luggage need to be picked up after Canada Customs and put it on the 传送带. then go stright to domestic gate C.