After commencement of the action, any party may take the testimony of any person, including a party, by deposition upon oral examination. Leave of court, granted with or without notice, must be obtained only if the plaintiff seeks to take a deposition prior to the expiration of thirty days after service of the summons and complaint upon any defendant, except that leave is not required (1) if a defendant has served a notice of taking deposition or otherwise sought discovery, or (2) if special notice is given as provided in subdivision 15-6-30(b)(2).
The attendance of witnesses may be compelled by subpoena as provided in § 15-6-45. The deposition of a person confined in prison may be taken only by leave of court on such terms as the court prescribes. The deposition of a person who has already been deposed in the case may only be taken with the consent of the deponent and parties, or by leave of court.
SDCL 15-6-30(a)