When the property sold on foreclosure of a mortgage, or upon general or special execution, consists of two or more separate farms, tracts, lots, or parcels of land, which at the time of sale are owned by two or more separate owners, or are subject to separate liens, giving to any person the right to redeem a separate property from the sale, and the property has not been sold separately, either under the provisions of § 21-48-12, or otherwise, any person having the right to redeem one or more of the tracts so sold, but less than the whole property sold, may bring an action in the circuit court of the county wherein the lands he seeks to redeem, or a portion of them, are situated, to have a determination of the amount properly to be paid by him to redeem the properties as to which he claims the right of redemption. Such action must be commenced within six months after the date of the sale of the property. In such action there shall be named as defendants the holder of the certificate of sale, the officer making the sale, and the record owners of all the tracts sold at such foreclosure or execution sale.
SDCL 21-52-8