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.

Hi,

I currently have a database of a completed application. This database has been made over a course of a year and now it's time to put this database in production. This database will be used as a consolidated database. The problem I have now is the fact that I don't want to use the transaction log that is made during development because a lot of insert and deletes of fake data happend during development. I want to start with a clean slate, I don't want all transactions that were made during development to be replicated to the remotes. I just want my consolidated database to start from zero, replicate the data that is present and only changes after this moment should be replicated.

I have searched the web, but I didn't find anything that could do that. I have used dblog -x 0 -z 0 <database> which gave the following output:

SQL Anywhere Transaction Log Utility Version 11.0.1.2960

"D:\Databases\Sybase\Qure\Dev1\Qure.db" is using log file "Qure.log"
"D:\Databases\Sybase\Qure\Dev1\Qure.db" is using no log mirror file
Transaction log starting offset is 0000000000
SQL Remote truncation offset is 02595825969
Transaction log current relative offset is 0000000000

but when I tried to start my database it gave the following error:

SQLANYs_QureDev1: Cannot open transaction log file -- Can't use log file "Qure.log" since it has been used more recently than the database file

I kinda underestimated this. I thought it would be simple to reset the transaction log to just say "replicate current data and from this point forward publish only the changes".

Is there someone that can help me with my problem

asked 10 Oct '16, 07:24

puppetspace's gravatar image

puppetspace
11111
accept rate: 0%

Caveat Emptor (this is from memory): If all your remotes are in a state of grace (they have all the data they need, and the consolidated has all the data it needs), consider running STOP SUBSCRIPTION on the consolidated for all the remotes, then stop the consolidated, delete the transaction log, start to consolidated to create a new empty log, then run START SUBSCRIPTION or REMOTE RESET for everything.

(10 Oct '16, 09:47) Breck Carter

I want to start with a clean slate, I don't want all transactions that were made during development to be replicated to the remotes.

Just to understand: When have you set up your remotes - during development or just recently?

The "test" transactions will only be a load for the remotes when those have been created (i.e. the subscriptions have been started) before the "fake" transactions were run - then the transactions need to be applied at the remotes.

When going into a production environment, I would usually re-create the remotes that were used during tests, and so could start with a fresh log before the remotes are re-extracted...

(10 Oct '16, 10:05) Volker Barth

This database has been made over a course of a year and now it's time to put this database in production.

As this sounds like "new development": Is there a particular reason you could not use a current version like v16/v17 (even v12 will be EOL'ed at the end of the year)?

(10 Oct '16, 10:07) Volker Barth
1

Since it appears you are using SQL Remote replication, you never truncate the log yourself but let incremental log backups and the DELETE_OLD _LOGS option manage this for you automatically.

(11 Oct '16, 09:40) Nick Elson S...
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

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:

×103
×60

question asked: 10 Oct '16, 07:24

question was seen: 2,504 times

last updated: 11 Oct '16, 09:40