Skip to main content
Skip table of contents

Error: "The following databases are locked and cannot be upgraded"

This support note applies to:

  • Profiles (AU)
  • AE Tax Series 6 & 8 (AU)

These instructions require technical expertise

Make sure you know what you're doing and are using one of the products listed. If you're not sure, ask your IT professional or MYOB.

Article ID: 25734

During the database upgrade of MYOB Accountants Enterprise you may experience the error 'Locked Databases. The following databases are locked and cannot be upgraded'. You will need to remove the database lock before the database can be upgraded.

There are a number of checks that can be performed to ensure no application is locking the database. Perform tasks 1 and 2 below then click Retry in the Locked Databases screen.

If the error appears again perform task 3 and retry, then if required complete task 4.

Task 1: Run application finder

Application finder can be run from the Utility dropdown in DataSafe's MYOB Database Utilities screen.

When run from the application server, it will list MYOB AE applications open, with the machine and user who has the application/s open. The only application that should appear is backup.exe.

Refer to article Running Application Finder for more details.

Task 2: Run the Clean Now utility
  1. At the Windows desktop, follow the menu path:
    Start > All Programs > MYOB Accountants Enterprise > DataSafe
    The DataSafe Utilities window appears.
  2. Click Support Tools. The Support Tools window appears.
  3. Click Clean Now. All business files are selected. The screen will flash to show the clean function performing.
  4. Click Close. The Support Tools window closes.
  5. Click Close. The DataSafe Utilities window closes.
  6. Click Retry in the Locked Databases screen.
  7. If the message 'Locked Database' reappears, continue to task 3 below.
Task 3: Run the Check Now utility

The Check Now utility performs a compact and repair of your database files. If the database is in use, the error message "Check could not be run as the database is in use" will appear or the check may hang on a file.

Run Check Now from the server that is running MYOB Admin Centre, as the Check Now utility will stop the services in the MYOB Administration Centre, then automatically restart the services once the utility has completed.

  1. From the windows desktop, follow the menu path: Start > Programs > MYOB Accountants Enterprise > DataSafe. The DataSafe Utilities window appears.
  2. Click Check Now. The Database Check screen appears.
  3. Select the option Also check and repair the referential integrity of the application schema and click OK.
    After all files are checked the prompt 'No errors were found in your database' appears. This routine should take no longer than five minutes. If a file is locked on the server, the check now routine appears to hang on that file e.g. 000000.css. If Check Now appears to have stalled, you may need to reboot your server to unlock the file.
  4. Click OK.

To stop MYOB Administration services manually

If necessary, the MYOB Admin centre services can be stopped manually by following these steps:

  1. On the server where the AE Tax SQL\MSDE database is located follow the menu path: Start > Programs > MYOB Accountants Enterprise > MYOB Administration Centre. The MYOB Administration Centre window is displayed.
  2. Select the task Stop all services in Administration Centre in the task panel. The Status of all the Services change from Running to Stopped.
  3. If the screen does not refresh, close the MYOB Administration Centre and reopen.

If the error persists, continue to task 4 below.

Task 4: Check for files with an extension of .r

If there are database files with the extension of .r at the end, they all need to be replaced from a previous backup. Please contact MYOB Support if your database directory contains files with the extension of .r.

The files that most commonly show the .r extension are listed below:

  • 000000.a1c.r
  • 000000.a2c.r
  • 000000.a1s.r
  • 000000.a1t.r
  • 000000.a2t.r
  • 000000.a1p.r
  • 000000.a2p.r
  • 000000.cbi.r
  • 000000.cbm.r 

To locate your database directory

  1. In Contacts, from the Help menu, select About MYOB Contacts. The About MYOB AE Contacts screen appears.
  2. Click Application details. The MYOB AE Contacts Application Details screen appears.
  3. Note the Database Location, e.g. q:\myob\data and click OK. The About MYOB AE Contacts screen appears.
  4. Click Close and exit Contacts.
  5. At the Windows Desktop, click Start and select Run. The Run window appears.
  6. Type Q:\MYOB\data in the Open field and click OK, where Q:\MYOB\data is your data directory.
  7. The S:\MYOB\data window appears.
  8. Check for files with a .r extension.


Files with the extension .r can be deleted and restore from a prior backup manually if they are the files listed above.

Most are account layout files that do not contain data, but they may lose layouts edited since the last backup.

Do not restore files individually if the files end with .pms, .wip, .tax

Also ensure all services in Admin centre are stopped.

Unit table in cds.dir

scenario: The locking of databases can be caused by an incorrect database path in the unit table of cds.dir file. That is, the unit table may contact an absolute database path on different volume folders from a previous server that no longer applies to the new server. When there are several volumes in the database, there may be hard coded paths embedded in the directory database.

  1. Follow the menu path: Start > Programs> MYOB Accountants Enterprise > Datasafe. The Datasafe screen appears.
  2. Click the Support Tools button. The Database Utilities screen appears.
  3. Click the Other Utilities drop-down list and select Dbed - edit database.
  4. Click the Database drop-down list and select Database Directory (CDS.DIR) appears. The Client field shows No Client (Practice File). The Copy field shows Home and the Arguments field shows -t~
  5. Click the Run Now button. The screen appears. To view and edit the unit table follow the steps below:
  6. At the curly bracket } prompt enter the following commands:
    } t~ and then press ENTER.
    } s unit > ...\solution6\bin\unit.txt and then press ENTER. The "FIXED" lines appear.
  7. Check the unit.txt file for any absolute paths showing on the "FIXED" lines. If a line appears as follows in the unit.txt file, FIXED~1~~F:\data\solution6\v1\~\~\~18 change the line to read as follows: FIXED~1~~v1\~\~\~18 The line is changed.
  8. Save the changes in the unit.txt file and run the following command from the bracket prompt:
    } d unit and then press ENTER
    } u unit < ...\solution6\bin\unit.txt and then press ENTER
    } s unit and then press ENTER The changes appear in the unit table.
  9. Check that the new changes are showing in the unit table as shown below:
    FIXED~1~~v1\~\~\~18 If the correct information is showing on the screen use the command below to exit the database editing screen.
    } q and then press ENTER. The database editing screen disappears.
  10. Run the database conversion again. The conversion is run.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.