We consider the problem of determining the cardinality $\psi(H_{2,k})$ of minimal doubly resolving sets of Hamming graphs $H_{2,k}.$ We prove that for $k \geq 6$ every minimal resolving set of $H_{2,k}$ is also a doubly resolving set, and, consequently, $\psi(H_{2,k})$ is equal to the metric dimension of $H_{2,k},$ which is known from the literature. Moreover, we find an explicit expression for the strong metric dimension of all Hamming graphs $H_{n,k}.