This depends on the type of tenancy agreement and the agreement between tenant and landlord.
In case of a standard tenancy agreement for an indefinite time, landlord can only terminate based on legal grounds such as ‘urgent personal use’. The urgency must be proven by landlord. The idea of this type of tenancy agreement is that the landlord cannot terminate, of course.
In case of the standard tenancy agreement for a definite time, landlord can terminate from the agreed upon end date as recorded in the tenancy agreement. A notice period of 3 calender months’, plus 1 calender month for each year the rental period has lasted (with a maximum of 6 calender months) applies.
It’s important to check the tenancy agreement regarding the options of termination. When in doubt, contact the mediator or property manager.