The invention provides a language running method for a heterogeneous
database and a program product, and the method comprises the steps: compiling a standard language script through a compiling module, obtaining a logic
execution tree, and storing the logic
execution tree into a critical
shared memory; and when an operation demand is generated, the operation module obtains the logic
execution tree from the critical
shared memory, and identifies the type of each statement block in the logic execution tree through the statement block operation
route. And when the statement block is the default statement block, the running module runs the default statement block. Or, when the statement block is a non-default statement block, the running module converts the non-default statement block into a target statement block corresponding to the
target database and runs the target statement block. Therefore, the
syntax conversion of the statement block is realized on the business
system side, the statement block which does not need to be converted and the converted statement block are operated, and the operation of the standard language script aiming at the specific
database is completed. Therefore, under the heterogeneous
database scene, the script operation efficiency is improved, and the operation and maintenance cost is reduced.