The analytical potential energy functions of the ground and two low-lying excited states of SH+ have been obtained using the Murrell-Sorbie function and ab initio potential energy curves. The spectroscopic parameters and ro-vibrational and pure rotational transitions are determined for the states. All the spectroscopic parameters for the ground and two low-lying excited states of SH+ and SD+ are in excellent agreement with the experimental data and better than the theoretical results in the literature. The present results for ro-vibrational or pure rotational transitions of the ground state (X3¦²?/sup>) are in good agreement with the experimental data available at present. The possible vibrational and rotational levels of two 3¦° states are predicted.