How to extract data from a log file.

It is to do this ?! My database showed error Assertion Failed.

asked 12 Aug '15, 15:02

Walmir%20Taques's gravatar image

Walmir Taques
accept rate: 13%

You can use the builtin DBTRAN utility to translate the log (possibly using -j to start at a particular checkpoint) into a script with the according SQL statements.

I'd like to add that you should check whether your database file has become corrupt - not every assertion means a corrupt database. And if it seems corrupt, you usually should be able to apply the current log to your last backup... - that would prevent the need to "manually" re-apply operations... (or only those that had not been committed but were rollbacked when the assertion happened by making use of DBTRAN -a).

permanent link

answered 12 Aug '15, 15:50

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

edited 12 Aug '15, 15:59

Oops, why does my answer misses the "edit" button?

Ah, navigating to another page and back brings back the "edit" button.

(12 Aug '15, 15:56) Volker Barth
Replies hidden

The user started the last backup using the -f command line it can not apply log file. He started the last backup and made entries in the system. when I

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C: \ Users \ walmir> dblog -tc: \ db \ sis.log c: \ db \ sis.db

SQL Anywhere Transaction Log Utility Version
"c: \ db \ sis.db" was using log file "sis.log"
"c: \ db \ sis.db" is using the mirror log file
"c: \ db \ sis.db" is now using log file "c: \ db \ sis.log"
Transaction log starting offset is 0945518960
Transaction log current relative offset is 0000286142

C: \ Users \ walmir>

not in error,

but when I

displays error Assertion Failed

alt text

(17 Aug '15, 15:53) Walmir Taques

Hm, I'm not sure what you have tried to do - why do you change the location of the log file?

In case a database has to be recovered without using a log file (i.e. dbeng9 -f), then it should shutdown afterwards and will create a new (empty) log file during the next normal start automatically...

(18 Aug '15, 01:59) Volker Barth
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: 12 Aug '15, 15:02

question was seen: 334 times

last updated: 18 Aug '15, 01:59