opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.

Troubleshooting Random Primary Keys

Troubleshooting3 min read4/13/2026

If your practice is experiencing unexpected slowness, system freezes, or errors when creating new records, you may be encountering issues related to your database configuration. Specifically, if your office uses replication, you might be dealing with the legacy "Random Primary Keys" setting, which can cause performance bottlenecks if the assigned key ranges are exhausted or misconfigured.

Step-by-Step Troubleshooting

If you suspect your system is struggling with primary key assignments, follow these steps to diagnose the issue.

  1. Check Replication Status: Go to Setup > Advanced Setup > Replication. Look at the "Replication Setup" window. If "Use Random Primary Keys" is checked, your database is using this legacy method. Note that if this is enabled, it cannot be turned off.
  2. Verify Key Ranges: In the same Replication window, double-click your server to view the "Range Start" and "Range End." If these ranges are small (e.g., less than 100,000,000), your system may be running out of available keys. When the system cannot find an available key, it can enter an infinite loop, causing the software to freeze.
  3. Run Database Maintenance: Go to Tools > Database Maintenance. Run the standard maintenance tools to ensure there are no underlying data corruption issues that might be compounding the slowness.
  4. Check for Slowness: If you notice the software hangs specifically when adding new patients or procedures, this is a classic symptom of a key range exhaustion. If you are using this legacy method, you must increase your "Range Start" and "Range End" values to provide a larger pool of available numbers.

Why This Happens

In a standard Open Dental installation, the database uses "auto-increment" to assign a unique number to every new record (like a patient or a procedure). When you use replication, you need a way to ensure that two different servers don't try to assign the same number to two different records at the same time.

"Random Primary Keys" was an older solution to this problem where each server was assigned a specific, large range of numbers to use. However, this method is no longer recommended because it is complex to manage and can lead to performance issues if the ranges are not set correctly or if they eventually run out.

How to Prevent This

  1. Use Modern Replication: If you are setting up a new replication environment, do not use Random Primary Keys. Use the modern "Replication Auto Increment" method, which is the current standard for preventing data collisions.
  2. Monitor Key Ranges: If you are already using Random Primary Keys and cannot migrate away from them, periodically check your Replication setup window to ensure your assigned ranges are still vast and have not been depleted.

When to Contact Open Dental Support

If you are experiencing persistent freezes, errors, or if you need to migrate your database away from the legacy Random Primary Keys method to the modern auto-increment standard, do not attempt this yourself. Modifying primary keys is a high-risk operation that can result in total data loss if not performed correctly.

Contact the official support team at 503-363-5432. They have the specialized tools and expertise to safely reconfigure your database architecture without compromising your patient records.

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.

Monitor Your Practice Health.

DentalCanvas tracks your Open Dental metrics in real time so you catch problems before they cost you money.

Try DentalCanvas

Was this article helpful?

Related Articles

opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.