phone icon nav Call Us 888-690-3282    Follow Us
phone icon nav Call Us 888-690-3282    Follow Us

Troubleshooting SharePlex for Oracle Replication: Common Nighttime Challenges

The Challenge

The client was using Shareplex for Oracle replication process to replicate production data to a reporting database.  Conflict resolution and replication issues often occurred at night, requiring DBA resources to address the issue off-hours.

When using SharePlex for replicating production data to a reporting database, especially in scenarios where conflict resolution and replication issues arise, several challenges may occur:

  1. Nighttime Replication Issues:
    • Replication problems often surface during off-hours, requiring DBA intervention. These issues can impact data consistency, latency, and overall system performance.
    • SharePlex must handle these challenges seamlessly to ensure uninterrupted data flow.
  1. Conflict Resolution:
    • When changes occur simultaneously on both source and target databases, conflicts arise. SharePlex needs robust mechanisms to resolve these conflicts intelligently.
    • Handling conflicts efficiently without data loss or downtime is crucial.
  1. Resource Utilization and Scalability:
    • SharePlex must manage system resources effectively to prevent bottlenecks during replication.
    • As data volumes grow, scalability becomes critical. SharePlex should handle increased workloads without compromising performance.
  1. Monitoring and Alerting:
    • Proactive monitoring is essential to detect issues promptly. SharePlex needs comprehensive monitoring capabilities to track replication health.
    • Alerts should notify DBAs of any anomalies, especially during nighttime hours.
  1. High Availability and Disaster Recovery:
    • SharePlex must ensure high availability for critical systems. Failover mechanisms should minimize downtime during replication failures.
    • Disaster recovery planning should account for SharePlex’s role in maintaining data consistency.
  1. Cross-Platform Replication Challenges:
    • If replicating between different database platforms (e.g., Oracle to PostgreSQL), SharePlex must handle platform-specific nuances.
    • Schema differences, data types, and constraints require careful handling.

Remember that SharePlex provides solutions for many of these challenges, but effective configuration, monitoring, and proactive management are essential for successful replication.

The Solution

Performance One Data Solutions was asked to mitigate this and chose to create shell scripts to respond to replication errors and run built-in replication commands to fix errors.

Creating shell scripts to handle SharePlex replication errors and execute built-in replication commands can significantly improve conflict resolution and address replication issues. Here’s how:

  1. Automated Error Handling:
    • Shell scripts can monitor SharePlex logs for specific error messages related to replication conflicts or other issues.
    • When an error occurs, the script can trigger predefined actions based on the error type.
  1. Customized Resolution Logic:
    • Shell scripts allow you to define custom logic for handling specific errors.
    • For example, if a conflict arises, the script can analyze the conflicting data and decide whether to apply the source or target change.
  1. Built-in Replication Commands:
    • SharePlex provides built-in commands to manage replication. These commands can be executed via shell scripts.
    • Examples of useful commands:
      • sp_ctrl: Used to start, stop, or manage SharePlex processes.
      • sp_ctrl alter: Used to modify replication configurations.
      • sp_ctrl resume: Used to resume replication after resolving issues.
      • sp_ctrl suspend: Used to temporarily pause replication.
      • sp_ctrl: repair “Table_Name_to_Repair_Sync”
  1. Automated Recovery:
    • Shell scripts can automatically trigger recovery actions when specific errors occur.
    • For instance, if a replication process fails, the script can restart it or switch to an alternate target.
  1. Scheduled Execution:
    • Set up cron jobs or scheduled tasks to run these scripts periodically (e.g., during off-hours).
    • Regular execution ensures timely response to replication issues.
  1. Logging and Notifications:
    • Shell scripts should log their actions and outcomes.
    • Send notifications (emails, alerts) to DBAs or system administrators when critical errors occur.

Creating shell scripts to handle SharePlex replication errors provides automation, customization, and proactive management. These scripts can significantly reduce the manual effort required for conflict resolution and replication issue resolution.

The Results

Performance One Data Solutions created a more streamlined repair process that fixed replication issues immediately. This provided more reliable reports and alleviated DBA intervention.

Custom shell scripting for SharePlex replication errors can yield several positive outcomes:

  1. Immediate Issue Resolution:
    • With automated scripts, replication errors are addressed promptly. The scripts detect issues, apply predefined fixes, and resume replication seamlessly.
    • This reduces downtime and ensures data consistency.
  1. Streamlined Repair Process:
    • The scripted approach streamlines the entire error-handling process.
    • DBAs no longer need to manually intervene, saving time and effort.
  1. Reliable Reports:
    • Shell scripts can log all actions taken during error resolution.
    • These logs provide a reliable audit trail for troubleshooting and reporting purposes.
  1. Proactive Monitoring:
    • Scripts continuously monitor SharePlex logs and system health.
    • Alerts notify administrators of any anomalies, allowing proactive intervention.
  1. Reduced Human Error:
    • Automation eliminates the risk of human oversight or mistakes.
    • Consistent execution of predefined steps ensures accuracy.
  1. Off-Hours Support:
    • Since scripts operate autonomously, they handle issues even during off-hours.
    • DBAs can focus on other critical tasks.

In summary, custom shell scripting enhances SharePlex replication reliability, minimizes DBA involvement, and provides efficient error resolution.

Background

A large automotive plant operator has been using a custom application framework to build an application integral to their operations. Originally built using JDK8 and JBoss4 against an Oracle database, the application received periodic updates, with the last major update in 2020/2021. In 2024, the client and Performance One Data Solutions, a division of Ross Group Inc., embarked on a joint effort to upgrade the technology stack to enhance performance, security, and maintainability.

Objectives

The primary goals of the project were:

  1. Upgrade the Custom Application Framework from JDK8 to JDK21.
  2. Upgrade the jQuery integration to release 3.7.1.
  3. Upgrade the application to run on Wildfly 30 from Wildfly 11.
  4. Migrate the database backend from Oracle 12 to Microsoft SQL Server 2020.

Challenges and Solutions

Framework and Database Migration:

  • Challenge: The application framework was vetted against Microsoft SQL Server but was not deployed in a major application.
  • Solution: Performance One refactored the framework to conform to Java 9+ standards and regression-tested it against Microsoft SQL Server 2020.

Application Refactoring:

  • Challenge: Refactoring the client application to compile and run using the new tech stack.
  • Solution: Performance One took a copy of the client application and refactored it to compile and launch using JDK21, Wildfly 30, and Microsoft SQL Server.

Data Migration:

  • Challenge: Migrating data from Oracle to Microsoft SQL Server.
  • Solution: Performance One provided migrated data and created installation scripts to upgrade the client’s Microsoft SQL Server.

Report Conversion:

  • Challenge: Converting BIRT and Crystal reports against Microsoft SQL Server.
  • Solution: Performance One converted the reports and ensured they worked with Microsoft SQL Server.

Project Timeline

Initial Milestones:

    1. Complete Framework upgrade to JDK21/Wildfly 30.
    2. Provide migrated data from Oracle to Microsoft SQL Server.
    3. Regression test the application framework against Microsoft SQL Server 2020.
    4. Refactor the client’s application to compile and launch using the new tech stack.
    5. Create installation data script for Microsoft SQL Server compliance.
    6. Regression test the application installation processes.
    7. Make recommendations for unused application features.
    8. Validate and upgrade application code.

Additional Tasks

  • Database Procedures Conversion: Performance One converted the client’s database procedures, functions, and views to Microsoft SQL Server.
  • Report Migrations: Ongoing conversion of BIRT and Crystal report development.
  • Application Enhancements: Upgrading client’s application screens for jQuery 3.7.1, file attachment uploads, and integration with scanner devices using web sockets.
  • Server Maintenance: Wildfly server maintenance, release builds, and deployment handling, with a transition plan for client resources post-go-live.

Conclusion

Performance One Data Solutions partnered with the client to upgrade the technology stack, ensuring improved performance and maintainability. The collaboration between Performance One and the client team demonstrated effective problem-solving and adaptability, setting a strong foundation for future upgrades and enhancements.

Contact-Us

Let's Talk

Use our expertise to propel your business to the next level.