As the low maintenance cost of data trusteeship, more and more medium-size and small size enterprises choose data trusteeship service. Data is valuable fortune of enterprise, security of enterprise data must be guaranteed in the condition of together using a same host. Data security includes data transmission security, data storage security and confidentiality security. The paper discusses the security problem and coping strategy of database data in a data trusteeship environment. Two-phase sub-keys encryption algorithm is used to encrypt the data and also analysis its usability and security. The realized method is further presented. The algorithm solves the data security problem of database in a data trusteeship environment effectively and further enhances the security of database data.