Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

How do I find out why the following following 16.0.0.1512 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 16.0.0.1512
 (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

http://dcx.sybase.com/index.html#sa160/en/dbadmin/sys-privs-function.html System Privileges

...

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

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

Looks like a duplicate...

(12 Jul '13, 04:25) Volker Barth
Replies hidden

This one is the real one, the OTHER one was the duplicate!

Seriously, the forum interface was having sport with me. When I posted a question, then posted a second question, the second question vanished and the first one was duplicated... so I deleted both, and re-posted the two questions... and got THREE postings, two of them duplicates.

Moral of the story: Always create your posts offline, which is what I do with all websites including this one.

(12 Jul '13, 06:39) Breck Carter

Do you have anti-virus software running? Try disabling it.

(12 Jul '13, 07:00) John Smirnios

...the second question vanished...

...or was awaiting active moderation? (Brrr, no, I don't want to think of that posSAPility...)

FWIW, I try to use that "offline editing" method on web sites, too, but tend to forget about that until the next send request gets cancelled, and my contents is lost...

And now we're about to create such valuable comments here that the admired forum administrators won't dare to delete the duplicate, right. I mean, they are not the guys from the typical IT department:)

(12 Jul '13, 07:05) Volker Barth

Here are the possible errors raised during the file deletion process:

  • the delete_file secure feature is disabled
  • mirroring is enabled on the database
  • the caller does not have the MANAGE ANY DBSPACE system privilege
  • The sandboxing feature is enabled and this file is not located within the sandbox
  • The specified file does not exist
  • The specified file is in use by the server (shouldn't apply to dbbackup -x or -xo)
  • Deleting the specified file results in an OS error
permanent link

answered 02 Jan '14, 12:06

Graeme%20Perrow's gravatar image

Graeme Perrow
9.6k379124
accept rate: 54%

Excellent!

Now all you have to do is link the "Unable to delete transaction log" Help topic to this answer.

No, wait, there is no such Help topic :)

(02 Jan '14, 14:52) Breck Carter
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×106

question asked: 12 Jul '13, 02:36

question was seen: 3,845 times

last updated: 02 Jan '14, 14:52