How do I find out why the following following 18.104.22.1682 dbbackup command is producing the undocumented error message "unable to delete transaction log"?
... without waving many dead chickens over the keyboard in an ... endless ... search ... for a solution?
It is run from a Windows command file in the C:\ProgramData\RisingRoad\Foxhound3 folder. The BIN environment variable is set to Bin32.
The (almost exact) same dbbackup command runs OK using SQL Anywhere version 12.
"%SQLANY16%\%BIN%\dbbackup.exe"^ -c "ENG=foxhound3;DBN=f;UID=BACKER;PWD=SQL"^ -o backup\generation_temp\backup_log.txt^ -x^ backup\generation_temp SQL Anywhere Backup Utility Version 22.214.171.1242 (5859 of estimated 5859 pages, 100% complete) Unable to delete transaction log Database backup failed
It ran as far as creating the backup files themselves:
Volume in drive C is OS Volume Serial Number is 5CD7-70E9 Directory of C:\ProgramData\RisingRoad\Foxhound3\backup\generation_temp 07/12/2013 01:13 AM <DIR> . 07/12/2013 01:13 AM <DIR> .. 07/12/2013 01:00 AM 536 backup_log.txt 07/12/2013 01:00 AM 19,890,176 foxhound3.db 07/12/2013 01:00 AM 28,090,368 foxhound3.log 5 File(s) 47,981,118 bytes
Here goes with the dead chickens...
It fails when launched manually, manually with "Run as administrator", and via the Windows 7 Task Scheduler with or without "Run with highest privileges" set.
It fails whether the database was already running, or was launched by dbsrv16 earlier in the command file.
It fails when (grasping at straws here) the BIN environment variable is set to Bin64.
The user id has GRANT BACKUP TO BACKER;
However, this isn't Kansas any more, this is SQL Anywhere 16.
Let's work our way through the brand-new list of
This did not help: GRANT BACKUP DATABASE TO BACKER;
This did not help: GRANT WRITE FILE TO BACKER;
This did not help: GRANT SERVER OPERATOR TO BACKER;
Aha! This Old School grant works: GRANT DBA TO BACKER;
So let's try again, with the System Privileges list...
REVOKE CONNECT FROM BACKER; GRANT CONNECT TO BACKER IDENTIFIED BY "SQL"; GRANT BACKUP DATABASE TO BACKER; GRANT MANAGE ANY DBSPACE TO BACKER;
That works! dbbackup -x runs!
MANAGE ANY DBSPACE does seem excessive, perhaps worth another "Question" on this forum, but it is not the point of this question.
This question is, how do I diagnose the problem "unable to delete transaction log"?
asked 12 Jul '13, 02:36
Here are the possible errors raised during the file deletion process:
answered 02 Jan '14, 12:06