Rather than give you company a 2-year notice - that's unheard of, unrealistic and there is a pretty good chance that the management wouldn't know what to do with a 2-year notice, I suggest that you work yourself out of your job ASAP. Systematically train the members of your team to take over from you. You should do it anyway, because you could get iced by an ice cream truck at any time anyway :) Hopefully, getting your team members up to your level won't take two years out of your life. Document your knowledge as much as possible. And when the time comes, put in your two-weeks' notice and don't look back.