We present the first measurements of the survival time of ultracold neutrons (UCNs) in solid deuterium SD2. This critical parameter provides a fundamental limitation to the effectiveness of superthermal UCN sources that utilize solid ortho-deuterium as the source material. Superthermal UCN sources offer orders of magnitude improvement in the available densities of UCNs, and are of great importance to fundamental particle-physics experiments such as searches for a static electric dipole moment and lifetime measurements of the free neutron. These measurements are performed utilizing a SD2 source coupled to a spallation source of neutrons, providing a demonstration of UCN production in this geometry and permitting systematic studies of the influence of thermal up-scatter and contamination with para-deuterium on the UCN survival time.