Replication system with methodology for replicating stored procedure calls
First Claim
1. In a database system employing a log file to record database changes but without support for logging stored procedure invocations, a method for providing support for replicating invocation of a user-created stored procedure from a primary database to a replicate database, the method implemented on at least one computer having a processor and a memory, the method comprising:
- receiving from a user Structured Query Language (SQL) statements that define a stored procedure to be invoked at the primary database;
receiving from the user subsequent SQL statements that invoke said stored procedure at the primary database;
inserting into the stored procedure new code that tracks the stored procedure'"'"'s invocation, wherein when the stored procedure is invoked the new code inserted into the stored procedure also executes, and wherein said new code includes code that inserts table data when the procedure begins executing, code that removes table data when the procedure stops executing, and code that inserts table data indicating with which procedure parameter values the stored procedure is invoked;
responsive to execution of said new code inserted into the stored procedure, recording descriptor information characterizing the stored procedure'"'"'s invocation, including information about when the stored procedure begins and exits execution, and information about any parameter values passed to the stored procedure, said descriptor information characterizing the stored procedure'"'"'s invocation without recording information about data values in the primary database that are affected as a result of the stored procedure'"'"'s invocation;
propagating the stored procedure'"'"'s invocation through a log file of the primary database, wherein when the stored procedure'"'"'s invocation is propagated said descriptor information is stored as table data inserted into the primary database;
reading the log file at the replicate database, for interpreting the descriptor information propagated through the log file; and
replicating the stored procedure'"'"'s invocation at the replicate database based on said descriptor information.
1 Assignment
0 Petitions
Accused Products
Abstract
A replication system with methodology for replicating stored procedure calls is described. In one embodiment, for example, in a database system without support for logging stored procedure invocations, a method of the present invention is described for replicating invocation of a stored procedure from a primary database to a replicate database, the method comprises steps of: inserting table data into the primary database for storing information sufficiently characterizing the procedure'"'"'s invocation to allow its replication, the table data being logged to a log file; reading the log file, for determining changes to apply to the replicate database for replicating the procedure'"'"'s invocation; and reconstructing the procedure'"'"'s invocation at the replicate database based on the determined changes.
-
Citations
13 Claims
-
1. In a database system employing a log file to record database changes but without support for logging stored procedure invocations, a method for providing support for replicating invocation of a user-created stored procedure from a primary database to a replicate database, the method implemented on at least one computer having a processor and a memory, the method comprising:
-
receiving from a user Structured Query Language (SQL) statements that define a stored procedure to be invoked at the primary database; receiving from the user subsequent SQL statements that invoke said stored procedure at the primary database; inserting into the stored procedure new code that tracks the stored procedure'"'"'s invocation, wherein when the stored procedure is invoked the new code inserted into the stored procedure also executes, and wherein said new code includes code that inserts table data when the procedure begins executing, code that removes table data when the procedure stops executing, and code that inserts table data indicating with which procedure parameter values the stored procedure is invoked; responsive to execution of said new code inserted into the stored procedure, recording descriptor information characterizing the stored procedure'"'"'s invocation, including information about when the stored procedure begins and exits execution, and information about any parameter values passed to the stored procedure, said descriptor information characterizing the stored procedure'"'"'s invocation without recording information about data values in the primary database that are affected as a result of the stored procedure'"'"'s invocation; propagating the stored procedure'"'"'s invocation through a log file of the primary database, wherein when the stored procedure'"'"'s invocation is propagated said descriptor information is stored as table data inserted into the primary database; reading the log file at the replicate database, for interpreting the descriptor information propagated through the log file; and replicating the stored procedure'"'"'s invocation at the replicate database based on said descriptor information. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
Specification