Skip to main content
Skip table of contents

Error: "-2147217770 Copy error: 'AETaxBackup.bak': Backup SQL database (AETAX1)" when doing a Datasafe backup

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: 27951

When attempting to do a Datasafe Backup in MYOB Datasafe, you may experience the following error message:

"Environment Error: -2147217770 Copy error: 'AETaxBackup.bak': Backup SQL database (AETAX1)".

This error message can be caused by:

  • an incorrect ini file
  • not enough free disk space
  • permissions for a SQL Database backup in the Profiles Database folder
  • SQL is restricting access to backing up to a network drive.

Complete the following to fix this error.

Check the ae_tax.ini and profile.ini files are correct
  1. Locate the ae_tax.ini file in the root of your data folder. Within Contacts or Client Compliance follow the menu path: Help > About > Application Details.
  2. Note the Database location then navigate to it from windows explorer.
  3. Double click on the file to open it in notepad.

    Ensure that you take a copy of this file first.
  4. Ensure the AETAXDB, AETAXLEDGERLOCATION and SYSTEMRELEASEPATH fields are correct, then save the file.
  5. Navigate to your SOL64 folder. Within Contacts or Client Compliance follow the menu path: Help > About > Application Details.
  6. Note the System Release path.
  7. Navigate to the TA folder and open the folder for the relevant tax database (i.e AETAX1), then open the Profile.ini file here.

    Ensure that you take a copy of this file first.
  8. Ensure the server name and database name in the top line are correct and that the BINPATH is also correct.
Determine the required free disk space
  1. At the Windows Desktop, follow the menu path: Start > Programs > MYOB Accountants Enterprise > Datasafe. The Datasafe Utilities window appears.

  2. Under the Current online backups heading press ALT and double-click the most recent backup. The contents of the backup appear.

  3. Right-click the file named AETaxBackup.bak and select Properties. The AETaxBackup.bak Properties window appears.

  4. Note the size of the file and then click Cancel.

  5. Press the Windows + E keys on your keyboard. The File Explorer window appears.

  6. Right-click the drive on which your database is located and select Properties. The Properties window of the drive appears.
    Example: S:\Data\MYOB

    If you need to determine the database drive location, open a tax return and in Help > About MYOB > Application Details the location of the AE Tax Database is listed.
  7. Note the Free space of the drive and then click Cancel.

You need at least as much free space as the previous AETaxBackup.bak file as noted at step 4 above plus room for expansion. MYOB recommends at least 1GB free space.

Not enough free disk space?

Refer to your IT Professional for advice.

Check the permissions
  1. Check permissions for the following:
      a)  The user "Everyone" and "SYSTEM" should have Full Control for the Profiles Database folder.
      b)  Ensure that "Replace permission entries on all child objects with entries shown here that apply to child objects"(Windows XP/2003) or "Reset permission on all child objects and enable propagation of inheritable permissions" (Windows 2000).

  2. Test a Datasafe backup.

If the error persists

Contact us.  

MYOB INTERNAL STAFF ONLY

  1. If this still occurs:
    1. Run the SQL command whilst logged into Windows as an SQL sysadmin (START->search and type CMD press enter):
      osql -S SERVERNAME -E -Q "BACKUP DATABASE [AETAX1] TO DISK='c:\TestBackup1.bak'"
      Where SERVERNAME is the servers name, where AETAX1 is the database name
    2. Then troubleshoot the Microsoft SQL error or refer IT to troubleshoot the Microsoft SQL error.
      If it says authentication fails, confirm that you are logged in as a sysadmin in SQL Management Studio. If this works continue to Step 2.
  2. Run the following SQL command (where m: is clients network drive):
    osql -S SERVERNAME -E -Q "BACKUP DATABASE [AETAX1] TO DISK='M:\TestBackup1.bak'"
    If this works but Datasafe still fails skip to Step 5.

    If this doesn't work, continue to Step 3.
  3. Run the following command:
    osql -S SERVERNAME -E -Q "BACKUP DATABASE [AETAX1] TO DISK='\\SERVERNAME\MYOBSHARE\TestBackup1.bak'"
    Where MYOBSHARE is the share M: is mapped to. If this works continue to Step 4.
  4. Update the module.ini BackupDirectory path to point to backup location as a UNC path and close and open Datasafe again to test.
    If Datasafe still fails to continue to step 5.
  5. Drop and Recreate the MsyncUser.
    osql -E -S SERVERNAME -d AETAX1 -Q "drop table MSyncConfiguration"
    osql -E -S SERVERNAME -d AETAX1 -Q "exec dbo.Msync_DropMSyncLoginDatabase @databasename = "AETAX1""
    osql -E -S SERVERNAME -d AETAX1 -Q "exec dbo.Msync_CreateMSyncLogin "AETAX1""
  6. Try Datasafe backup again.
JavaScript errors detected

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

If this problem persists, please contact our support.