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.

When translating a log file using SC, it would be nice if you could specify the type of transaction you are looking for. As an example, I was looking for DELETE statements after a certain date and on a single table. The After Checkpoint option narrowed down what I had to search, but the log.sql file that was generated was still 200 meg. It would be nice if I could have specified DELETE * end_of_period_inventory, or DELETE statements only. I think my file to look at would have been reduce to 20 meg.

asked 20 May '14, 06:59

Tom%20Mangano's gravatar image

Tom Mangano
672242738
accept rate: 8%


Thank you for your suggestion. There are a number of possible enhancements to this wizard.

Not all of the switches for dbtran make sense to be included in this wizard but you are correct about the

-it table,...

switch being be a reasonable enhancement. As might these:

 "-g" include audit records
 "-c ..."  connect to and translate the active transaction log 
          (possibly a completely different mode for this wizard)
 "-m <dir>"

also, and there may be others.

These (and maybe some others) only require enhancements made to just the SQL Central Wizard and I will submit that shortly.

For the DML type of operators, that usually makes less sense (in the more general usage) and can be done post translation by grepping or FINDing those from the produced SQL output. The basic gear of the dbtran utility would need to be changed for that and I would like to see a larger business case for that. For example, in addition to looking for DELETEs you probably should be looking for UPDATEs that change the primary key columns as well; so filtering on just the deletes may miss something important.

In the meantime, the wizard produces the dbtran cmdline you just painted with it and you can copy that (via the clipboard) to a cmd prompt and make any additions you want there.

HTH

permanent link

answered 21 May '14, 11:16

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.3k35107
accept rate: 32%

edited 21 May '14, 12:00

One might add that a restriction to filter out particularly statements might need to distinguish the executed statements themselves and their "textual appearance" within the scope of other statements, say a DELETE or UPDATE as part of a CREATE PROCEDURE definition or the like...

(Apparently, I can't tell whether both kinds of "appearance" are stored differently within the original transaction log, however, when doing full-text search within a translated log, both will show up...)

(21 May '14, 11:47) Volker Barth

Thank you for submitting the enhancement request and pointing out dbTran utility. I never thought of using it. Hopefully, dbTran and the -it switch will narrow down what I'm looking for.

(21 May '14, 16:28) Tom Mangano

An enhancement request (#764394) was submitted to product development for consideration.

permanent link

answered 21 May '14, 12:02

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.3k35107
accept rate: 32%

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:

×128

question asked: 20 May '14, 06:59

question was seen: 6,096 times

last updated: 22 May '14, 03:23