Bookshelf Home | Contents | Index | PDF |
Administration Guide for Oracle Billing Insight > Administering the Database > Managing the Payment Module DatabaseRunning an application in a live production environment can generate a large volume of historical data in an application's database. You are responsible for monitoring and maintaining your own database server. It is recommended that you monitor your database server on a weekly or other regular basis to perform the following tasks:
There are specific tasks required in Oracle Billing Insight to administer the database of the Payment module. Preventing Multiple PaymentsBy default, the Payment module allows a bill to be paid more than one time. To make sure that a bill can only be paid one time, you must add a unique key constraint on the bill_id field of the check_payments table using the set_unique_bill_id.sql script. The bill_id in the Payment module is the same as the doc ID in Oracle Billing Insight. If a customer tries to pay a bill that has already been paid after the unique key constraint has been added, either from the UI or by a previously scheduled recurring payment, then the customer receives an error message stating that the bill has been already paid. If the bill is paid from the UI and a recurring payment tries to pay it again, then the payment fails and an email notification message is sent to the customer, if recurring payments are configured for that email notification. Adding this constraint will not prevent a customer from making a payment using a bill ID. For example, a customer can still make a payment directly from the Make Check Payment link, which allows the customer to make a payment without specifying a bill. The unique key constraint only informs a customer that the bill has been paid when he or she tries to pay a bill that has already been paid. If you want to provide additional features, for example, disabling the payment option when the bill has already been paid, then you must query the database to get that information. Use caution when adding extra functions because performing additional database queries can deteriorate Payment module performance. Make sure to create the proper index if you plan to create a new query.
UI Actions and Database ChangesTable 75 lists user actions and describes their impact on the Payment module database. Payment Table SizingThe size to which the Payment tables grow depends on the number of enrolled users. Table 76 describes the Payment tables and other Oracle Billing Insight tables that are related to enrollment. Differences are noted for Microsoft SQL Server. The numbers in the table assume that there are 100,000 registered users. Payment Table MaintenanceFor check payments, there are two tables which might grow quickly: check_payments and check_payments_history. The check_payments table records the check payments made by users. The check_payments_history table records the history of status changes for each check in check_payments. The check_payments_history table is approximately three times the size of the check_payments table. Payments that are of a certain age, for example, one year, can be backed up and deleted from the Payment module database for proper performance with a high volume of users. The create_time field in the check_payments table records when a check is created, and can be used to determine a check's age. Be careful when deciding how long to keep a check in the Payment module database before it is removed. If you expect the number of users to be low and the database size is an acceptable size, then there is no need to downsize the tables.
Backup and RecoveryAll Payment database transactions operate in their own transaction context. If a single operation fails, for example, failure to enroll or submit a payment, then the Payment database automatically rolls back to its original state. To recover all transactions for a certain period, the database administrator must back up the database regularly so that the database can be restored to the previous day. It is best to back up the database before running the Payment Submit and Update jobs, so there will be no question about whether the jobs were still running during the backup. The frequency of backup depends on how long the period is for payment processing. Do not backup the master database. The master database is used by the database itself for internal purposes. Backing up TablesAll tables must be backed up, but the check_payments, check_payments_history, creditcard_payments and creditcard_payments_history tables in particular must be backed up on a regular basis. Backing up Stored ProceduresStored procedures must be backed up, especially procedures modified by Oracle Professional Services. |
Administration Guide for Oracle Billing Insight | Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |