Consistent two- phase commit in distributed database

Two-phase commit work well for centralized database, but in distributed database it creates problems. In some situations the two-phase commit protocol keep the database in inconsistence state and in some situation it takes too much time by using message exchanges. In this paper we present an idea for two-phase commit protocol that will always keep the distributed database in consistence state and also will take relatively small amount of time.