cancel
Showing results for 
Search instead for 
Did you mean: 

Applying foreign transaction log files

Baron
Participant
0 Kudos
1,218

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?

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

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...

Baron
Participant
0 Kudos

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)!

VolkerBarth
Contributor

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?

Baron
Participant
0 Kudos

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

VolkerBarth
Contributor
0 Kudos

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.

Baron
Participant
0 Kudos

@Volker Bath, Are you really a customer?

Baron
Participant
0 Kudos

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!

Answers (0)