Observational constraints provided by high resolution and high sensitivity observations of external galaxies made in the millimeter and submillimeter range have started to put on a firm ground the study of extragalactic chemistry of molecular gas. In particular, the availability of multi-species and multi-line surveys of nearby galaxies is central to the interpretation of existent and forthcoming millimeter observations of the high redshift universe. Probing the physical and chemical status of molecular gas in starbursts and active galaxies (AGN) requires the use of specific tracers of the relevant energetic phenomena that are known to be at play in these galaxies: large-scale shocks, strong UV fields, cosmic rays and X-rays. We present below the first results of an ongoing survey, allying the IRAM 30m telescope with the Plateau de Bure interferometer(PdBI), devoted to study the chemistry of molecular gas in a sample of starbursts and AGN of the local universe. These observations highlight the existence of a strong chemical differentiation in the molecular disks of starbursts and AGN.