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.
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.
If the error persists
MYOB INTERNAL STAFF ONLY
- If this still occurs:
- 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 - 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.
- Run the SQL command whilst logged into Windows as an SQL sysadmin (START->search and type CMD press enter):
- 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. - 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. - 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. - 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"" - Try Datasafe backup again.