Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

I have had the situation in, where I wanted to apply the latest logs to a backup of a database. So I used dbeng with -a "transaction.log". I was very confused, when a message dialog appeared telling me that the access to this file was denied. The file was readable and renameable, so no access denied from Windows...

Using this file through the dbtran tool was no problem at all. So was applying the SQL commands extracted by dbtran.

So what is "access denied" really refering to when using -a?

asked 26 Jan '15, 12:05

Martin's gravatar image

accept rate: 14%

Could it be the file was opened by another process? (Though then renaming would certainly be not possible...) Or may this be an UAC side-effect?

(Very wild guesses, I agree...:)

(26 Jan '15, 12:19) Volker Barth

dbeng may be having more of an issue with the main database (or maybe a missing dbspace?) can you show the exact dbeng12 cmdline and text of the error?

(26 Jan '15, 12:53) Nick Elson S...
Replies hidden

Is the database expecting its log file to be in a specific location, rather than just in the same folder. Where is the log file on the production database server, in the same folder as the db file or elsewhere?

(26 Jan '15, 13:55) Justin Willey
Replies hidden

command line was dbeng "databasefile name" -a "transaction log file name" nothing else. Unfortunately I haven't made a screenshot of the dialog. From my memory the message was "access to transaction log file (filename) is denied". Running the database without the -a was no problem, so I would guess no problem with the main database (it has only 1 dbspace).

(27 Jan '15, 02:55) Martin

-a is providing a transaction log at a specific location and in my case it was not the same as the productive database transaction log

(27 Jan '15, 02:55) Martin

The most likely error you could have seen would be this one

"Unable to open database file "<path-prefix>\<filename>.log" -- Permission denied"

and the most likely reason to see that is if that file is opened for r/w use by another program. For very common example for this error to occur try translating a log that belongs to a database that is already open on a running server.

Either way the failure would seem to be external to the SQL Anywhere utilities (unless the file is already in use by one of them).

I would try copying it to another file name and see if you can dbtran that copy.

(27 Jan '15, 11:23) Nick Elson S...

Incidentally, if the log is attached to a running database, then you can translate that by connecting to it (by using the dbtran -c switch)

(28 Jan '15, 13:17) Nick Elson S...
showing 5 of 7 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 26 Jan '15, 12:05

question was seen: 2,720 times

last updated: 28 Jan '15, 13:17