You are likely reading this because you are managing a multi-location practice using an older replication setup and have encountered errors related to database keys, or you are looking to modernize your infrastructure. If you see "Random Primary Keys" enabled in your Setup > Advanced Setup > Replication window, you are using a legacy method that is no longer recommended for new installations. This configuration can cause significant performance bottlenecks and complex data management issues as your practice grows.
Step-by-Step Troubleshooting
If you are experiencing issues such as system freezes, slow performance, or replication errors, follow these steps to diagnose the situation.
- Verify Replication Status: Go to
Setup > Advanced Setup > Replication. Check if "Use Random Primary Keys" is checked. If it is, note that this setting cannot be turned off once enabled. - Check for Key Exhaustion: If your system freezes when creating new records (like a new patient or appointment), your assigned key ranges may be full. Open the Replication Setup window and double-click your server to view the "Range Start" and "Range End." If the current key is approaching the "Range End," you must increase the range size to allow the system to continue generating unique IDs.
- Review Query Limitations: If you are running custom reports, be aware that if you are using Random Primary Keys, any SQL queries containing
CREATE TABLEorDROP TABLEsyntax will only function on the computer designated as the "User Query Server" in the Replication Setup window. Running these on other workstations will result in errors. - Check for Database Maintenance: Run the
Database Maintenancetool (found underTools > Database Maintenance) to ensure there are no underlying table corruptions. Note that some repair methods are considered unsafe for replication environments; always consult the official manual before running advanced repairs.
Why This Happens
Open Dental uses unique numbers (Primary Keys) to identify every record in your database, such as patients, procedures, and claims. In a standard setup, these numbers increase sequentially (1, 2, 3...). In a "Random Primary Keys" setup—an older method designed for specific replication scenarios—each server is assigned a massive, unique range of numbers to prevent different locations from creating the same ID for two different patients.
Because these ranges are fixed, if a server runs out of numbers within its assigned range, the software enters an infinite loop trying to find an available ID, which causes the application to freeze.
How to Prevent This
- Transition to Modern Replication: If you are planning a major infrastructure upgrade, consult with official support about moving away from Random Primary Keys to the current recommended replication methods, which utilize auto-increment variables to avoid data collisions more efficiently.
- Monitor Key Ranges: If you must remain on this legacy setup, periodically check your key ranges in the Replication Setup window to ensure you have plenty of room before hitting your "Range End" limit.
- Keep Versions Consistent: Ensure that your Primary server and all Replica servers are running the exact same version of Open Dental (e.g., 25.2.x). Mismatched versions are a leading cause of replication failure.
When to Contact Open Dental Support
Replication is a highly technical aspect of your database. You should contact official support at 503-363-5432 if:
- You see "Slave SQL Running: NO" or "Slave IO Running: NO" in your replication status.
- You suspect data corruption or synchronization failure between your servers.
- You are attempting to add a new server to an existing daisy chain or one-way replication setup.
- You are unsure about the safety of running a specific database maintenance tool.
Note: Replication support often incurs an additional fee, as it requires specialized database administration expertise.
Need better visibility into your Open Dental data? DentalCanvas gives you a visual dashboard — no SQL required.
This article is provided by opendentalsupport.com, an independent community resource. We are not affiliated with Open Dental Software, Inc.