Patent ID: 8495080

Claim:
An apparatus for initializing a multi-tenant database, the apparatus comprising: a computer device configured to: execute a trial of a legacy initialization tool on a trial database; capture database statements issued by said legacy initialization tool during said step of executing a trial; capture trial execution results of said database statements; execute said legacy initialization tool on a multi-tenant database; intercept said database statements issued by said legacy initialization tool during said step of executing said legacy initialization tool on said multi-tenant database; and execute a mock of intercepted database statements corresponding to types of said database statements comprise DDL (data definition language) statements and DML (data modification language) statements, types of tables involved in said database statements, and said trial execution results of said database statements, wherein executing said mock of said intercepted database statements further comprises: execute said database statement on said multi-tenant database when said intercepted database statement is a database statement for an application system table; modify said DDL statement by adding a tenant ID column to said tenant shared table when said intercepted database statement is a DDL statement for a tenant shared table; obtain a modified DDL statement when said intercepted database statement is said DDL statement for said tenant shared table; execute said modified DDL statement when said intercepted database statement is said DDL statement for said tenant shared table; refrain executing said database statement when said intercepted database statement is said DML statement for said tenant shared table or said database statement for a tenant private table; and return a trial execution result of said database statement to said legacy initialization tool.