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.

I have difficulty in applying transaction log files from a foreign database using -a option of dbeng17.

I am doing the following:

  1. I shut down my productive database (db10.db + db10.log version sql 10) and make file copy of it (db10_copy.db), and then delete the productive db10.log and start the the productive db10.db and let it continue running and create a new db10.log¹ (time=X)
  2. I unload the db10_copy.db and load it to a new database (db17.db version sql 17) (time = x+1day).
  3. I want to apply the 1 day changes into my db17.db , so I start: dbeng17.exe "mydir\db_17.db" -a db10.log¹, but I get an error message (the transaction log file is belonging to another database).
Of course before starting point 3 I execute: dblog.exe "mydir\db17.db" -z X1 -x 0; having X1 is the starting offset of db10.log¹.

My question is, is the reported error only related to mismatching offsets? or db17.db can really figure out, that the db1.log¹ is written by a froeign datatabase (i.e. by db10.db) (maybe through metadata or DbIdentifier...etc.).

My second question is, do SQL-Anywhere 10 & SQL-Anywhere 17 use the same format in writing transaction log files? and is it generally possible to apply transaction log files created by SQL-Anywhere 10 in a database of SQL-Anywhere 17?

asked 11 Feb '20, 15:06

Baron's gravatar image

Baron
2.1k138150178
accept rate: 48%

edited 12 Feb '20, 02:57

1

I don't think the translog format is compatible between versions. I guess translating the v10 log to SQL and then applying that SQL script at the new database could help here.

(11 Feb '20, 15:13) Volker Barth
Replies hidden

Are you trying to reduce downtime during a v10 to v17 upgrade?

(11 Feb '20, 15:14) Volker Barth
Replies hidden

no, I am trying to simulate the real upgrade, and simulate the replication of 10 against 17.

(11 Feb '20, 16:52) Baron

BTW, I have repeated the same test but keeping both databases SQL-Anywhere-10, and got the same error message (db10.log belongs to a different database).

Despite db10.log & the new db10.db have the same starting offset!

(12 Feb '20, 06:49) Baron

This would mean for me that it is neither related to offset mismatching, nor related to version difference.

The new created database can recognize somehow that the translogfile is not written from himself (he figures out that this is from a database with same version, same name but not the same one).

(12 Feb '20, 06:59) Baron

Just to answer your question "[...] can really figure out, that the db1.log¹ is written by a froeign datatabase (i.e. by db10.db) (maybe through metadata or DbIdentifier...etc.)"

See that older answer by Mark - to quote:

Each time you create a database it is given a unique "signature". This has been true for 20+ years. This signature is used (for example) to check that the dbspaces and transaction log file match the system dbspace.

So I would assume that both databases have a different signature...

permanent link

answered 14 Feb '20, 07:51

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

OK, so it is impossible to apply translogfiles from DBa on DBb.

The question is: Can/May I manipulate this signature (this property)?

select db_property('IdentitySignature');

Some properties are usually manipulable (for example SET OPTION PUBLIC.global_database_id = '100'; this works fine)!

(14 Feb '20, 08:11) Baron
Replies hidden
1

Well, I don't know if you can do so - but I would strongly advise against trying to: The "allowed" combination of database file(s) and transaction log(s) is required for recovery and the like and protects your data, why would you try to mess around with that?

(14 Feb '20, 09:21) Volker Barth

No, I dont want to try what is not allowed!

For me was more important to know that it is not only related to the offsets, but other factors too(signature...).

When I try to adjust the offsets using translog files from the same DB (or even copies of the same DB) then everything was OK (so that I can make sure that I can do at least this part successfully)

I got the answer and also accepted it.

Thank you

(14 Feb '20, 09:52) Baron

No, I dont want to try what is not allowed!

Well, note, that advice was just my opinion as another customer, certainly a SQL Anywhere guru like @John Smirnios can clarify whether it is allowed or not.

(14 Feb '20, 10:06) Volker Barth

@Volker Bath, Are you really a customer?

(14 Feb '20, 10:10) Baron

Finally it is my DB, and when I try an 'unallowed' process, then I am risking my own data!!

With allowed I wanted to mean whether it is documented/guaranteed from SQL-Anywhere or not!

(14 Feb '20, 10:14) Baron
showing 1 of 6 show all flat view
Your answer
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:

×59
×29
×3

question asked: 11 Feb '20, 15:06

question was seen: 832 times

last updated: 14 Feb '20, 10:14