Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

What is right way to apply transaction log?

2 posts in General Discussion Last posting was on 2009-08-12 15:20:32.0Z
Alex Posted on 2009-08-12 13:18:18.0Z
Sender: 1561.4a82afeb.1804289383@sybase.com
From: Alex
Newsgroups: ianywhere.public.general
Subject: What is right way to apply transaction log?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a82c11a.22c7.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 12 Aug 2009 06:18:18 -0700
X-Trace: forums-3-dub.sybase.com 1250083098 10.22.241.188 (12 Aug 2009 06:18:18 -0700)
X-Original-Trace: 12 Aug 2009 06:18:18 -0700, forums-3-dub.sybase.com
Lines: 24
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7682
Article PK: 6070

Steps:

-backup demo.db
-do some changes in running demo.db
-shutdown demo.db

trying to apply log to backedup copy

overwrite buckedup log with actual in the backup directory
and run

dbeng11 ./demo.db -ar -as
...

Error: Cannot open transaction log file -- Can't use log
file "/demo.log" since the offsets don't match the offsets
in the database file
Database server shutdown due to startup error

same error if I try to use -a, -ar (with log in the same
directory) and -ad (with backedup log and actual log in
working dir)

however, dbtran works without problem.


"Kory Hodgson (Sybase iAnywhere)" <khodgson Posted on 2009-08-12 15:20:32.0Z
From: "Kory Hodgson (Sybase iAnywhere)" <khodgson@A_SPAM_FREE_sybase.com>
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: What is right way to apply transaction log?
References: <4a82c11a.22c7.1681692777@sybase.com>
In-Reply-To: <4a82c11a.22c7.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a82ddc0$5@forums-3-dub.sybase.com>
Date: 12 Aug 2009 08:20:32 -0700
X-Trace: forums-3-dub.sybase.com 1250090432 10.22.241.152 (12 Aug 2009 08:20:32 -0700)
X-Original-Trace: 12 Aug 2009 08:20:32 -0700, vip152.sybase.com
Lines: 44
X-Authenticated-User: techsupp
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7683
Article PK: 6073

So you should have the following four files:

backup.db
backup.log

working.db
working.log

To restore you backup you should do the following:

dbeng11 backup.db -a backup.log
dbeng11 backup.db -a working.log

Then copy backup.db and backup.log into your new working folder and use
them as your working files. Do not overwrite backup.log during this
process at anytime. Be careful if the files are named the same as this
could happen and prevent you from restoring your backup.

Alex wrote:
> Steps:
>
> -backup demo.db
> -do some changes in running demo.db
> -shutdown demo.db
>
> trying to apply log to backedup copy
>
> overwrite buckedup log with actual in the backup directory
> and run
>
> dbeng11 ./demo.db -ar -as
> ...
>
> Error: Cannot open transaction log file -- Can't use log
> file "/demo.log" since the offsets don't match the offsets
> in the database file
> Database server shutdown due to startup error
>
> same error if I try to use -a, -ar (with log in the same
> directory) and -ad (with backedup log and actual log in
> working dir)
>
> however, dbtran works without problem.