Strategies to combat microbiota-associated health problems are of high interest in pig production. Successful intervention strategies with beneficial long-term effects are still missing. Most studies on pig microbiota have been conducted under standardized experimental conditions, but the situation in commercial farms differs dramatically. This study describes the fecal microbiota in German commercial pig farms under practical conditions. The study is part of the larger project “Optibiom” that aims to use bacterial composition and farm metadata to formulate tailor-made solutions for farm-specific health maintenance strategies. Special consideration is given to the sow-piglet relationship. Fecal samples from sows and their piglets were collected at two time points each in 20 different farms (sows ante- and postpartum and piglets before and after weaning). The extracted DNA was sequenced with Illumina 16S rDNA sequencing. For data analysis and visualization, differential abundance analyses, as well as hierarchical clustering and nonmetric multidimensional scaling (NMDS) were performed. A new “family unit” was implemented to compare farms based on the association between the microbiota in sows and their offspring. There are distinct changes in the microbial communities in sows before and after birth as well as in suckling and post-weaning piglets. The suckling pig microbiota is particularly different from all other groups and shows a lower bacterial diversity. While dominant genera in antepartum sows further displace the abundance of non-dominant genera postpartum, the opposite was true for piglets, where non-dominant bacteria in the suckling phase became dominant after weaning. The family unit for sows and their piglets led to separate cluster formation for some farms. The results indicate that the sow-piglet relationship is one driving force for the observed differences of the pig farms. The next step in the analysis will be the combination of metadata (feeding, housing and management practices) to find farm-specific differences that can be exploited to formulate a farm-specific health maintenance strategy.