This work presents a proposal to diagnose distributed systems utilizing model-based diagnosis using distributed databases. In order to improve aspects as versatility, persistence, easy composition and efficiency in the diagnosis process we use an Object Relational Constraint Database (ORCDB). Thereby we define a distributed architecture to store the behaviour of components as constraints in a relational database to diagnose a distributed system. This work proposes an algorithm to detect which components fail when their information is distributed in several databases, and all the information is not available in a global way. It is also offered a proposal to define, in execution time, the allocation of the sensors in a distributed system.