It depends. In most cases, the employer's consent must be obtained on the basis of the employment contract concluded. This is normally granted, provided that the employer does not compete with the secondary activity and his own performance does not suffer as a result.
If your employment contract mentions an obligation to notify in the event of a sideline, the employer's consent must be obtained. This is normally granted, provided that the employer does not compete with the secondary activity and his own performance does not suffer as a result.