The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

My database will not start due to the specified error, what can i try to fix this or start a new transaction log? I am using Sybase anywhere 9m also I am a sybase noob! any help would be greatly apprecaited. Thanks

Cannot open transaction log file -- Can't use log file "database.log" since the offsets don't match the offsets in the database file

asked 23 Jun '11, 16:45

drewdin's gravatar image

accept rate: 0%

edited 20 Sep '11, 17:35

Volker%20Barth's gravatar image

Volker Barth

Comment Text Removed

The database file (e.g. 'database.db') is paired with a secondary file, known as the transaction log (e.g. 'database.log'). The transaction log records all SQL operations that change data in the database. It is expected that this file is maintained concurrently with the database.

The error you are reporting is suggesting that these files are out of synch. To check the current offsets, you can use the 'transaction log (dblog)' utility:

C:\>dblog demo.db
Adaptive Server Anywhere Transaction Log Utility Version
"demo.db" is using log file "demo.log"
"demo.db" is using no log mirror file
Transaction log starting offset is 0000430509
Transaction log current relative offset is 0000086674

C:\>dblog demo.log
Adaptive Server Anywhere Transaction Log Utility Version
File "demo.log" is a transaction log file
File version is 41
Log starts at offset 0000430509
Log ends at offset 0000517183
Log contains 64 pages with a page size of 2048 bytes
86674 bytes in use (66.13%), 44398 bytes free (33.87%)

These two offsets in this output should match.

In the event that they don't match, you should move the transaction log to a different location and allow the database to generate a new one, by starting the database with the '-f' recovery option.

permanent link

answered 24 Jun '11, 12:38

Jeff%20Albion's gravatar image

Jeff Albion
accept rate: 24%


Just a warning:

Note that some technologies (SQL Remote, MobiLink clients) rely on the current transaction log. In such cases, forcing the database server to generate a new transaction log could break the functionality. Cf. the following doc...

(24 Jun '11, 17:06) Volker Barth

Thanks for the input, now i have to learn how I can automate my transaction log file size. My DB is 4gig and my transaction log is 65gigs.

(27 Jun '11, 10:08) drewdin
Replies hidden

Cf. this question...

(27 Jun '11, 10:18) Volker Barth

Thanks again!

(27 Jun '11, 10:36) drewdin

I ended up using:

dbbackup -c "uid=dba;pwd=sql;eng=database;dbn=database" -xo

Worked like a charm!

(27 Jun '11, 10:51) drewdin

How i read this file, o how program i cant open this?.

permanent link

answered 07 Mar '12, 17:39

Jero's gravatar image

accept rate: 20%

You'll need to provide a bit more information for someone to help you. What file? What are you trying to read it with?

Are you sure its a SQLAnywhere database - if it is you can't "read it", you have to start a database engine and then talk to it with a client application. If you are using SQLAnywhere, be sure to mention which version.

You are probably better off to ask a new question - its more likely to get noticed than as an addition to an already answered one.

(07 Mar '12, 17:54) Justin Willey

I'm using Adaptative Server Anywhere9 Ver.

I'm trying to read information from the file. Log generated by the database, but not as open or program can do this.

permanent link

answered 07 Mar '12, 18:20

Jero's gravatar image

accept rate: 20%

I found the solution:

In Sybase Central exist the option "Translate log File". This process pass the info into sql file.

permanent link

answered 07 Mar '12, 18:40

Jero's gravatar image

accept rate: 20%

Glad you were able to solve it - the command line utility dbtran.exe can be a useful way of doing that.

(07 Mar '12, 19:21) Justin Willey
Your answer
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: 23 Jun '11, 16:45

question was seen: 12,365 times

last updated: 07 Mar '12, 19:21