||Today, databases are ubiquitous. In factories machine tools are connected to databases that process outstanding orders and log occurring errors. Our industrial partner AMS engineering builds and maintains machine tools for various client companies that operate worldwide. AMS 'goal s to create a data warehouse that helps them analyzing machine failures and quickly launching response by reusing knowledge applied at one of their client 's sites. Agents that roam through these databases are an efficient way of gathering the required information. As all operations heavily rely on database transactions, we propose to implement agents that are executed with n a database management system. A Java-based agent environment allows encapsulating the database agents in Java agents to securely transmit them. Having arrived at the client 's computer, the Java agent unpacks the database agent that performs the required tasks.