It sounds the same, so I think you mean [안녕하십니까?] -- And yes, it's formal, but it's something you'll still hear fairly regularly - in newscast introductions, formal public speaking, or I might say this during a formal/business situations to someone of rank/or status.
Something you actually might not hear in modern Korean might be '안녕하시옵니까?' - this one I might only hear it in period pieces in Korean TV/Cinema, or as you mentioned, to jokingly emphasize the level of formality of the greeting. You certainly wouldn't hear it in serious context in modern Korean.
And to end it with another curveball - North Koreans though, tend to use the more formal of -니까 / -니다 level of formality in everyday usage, more so than in South Korea. So if you happen to be in North Korea for whatever reason, you'd also hear a lot more '안녕하십니까'.