The topological property of SrRu$_2$O$_6$ and isostructural CaOs$_2$O$_6$ under various strain conditions is investigated using density functional theory. Based on an analysis of parity eigenvalues, we anticipate that a three-dimensional strong topological insulating state should be realized when band inversion is induced at the A point in the hexagonal Brillouin zone. For SrRu$_2$O$_6$, such a transition requires rather unrealistic tuning, where only the $c$ axis is reduced while other structural parameters are unchanged. However, given the larger spin-orbit coupling and smaller lattice constants in CaOs$_2$O$_6$, the desired topological transition does occur under uniform compressive strain. Our study paves a way to realize a topological insulating state in a complex oxide, which has not been experimentally demonstrated so far.