Is it possible to activate/deactivate the mirror logs of an SQL Anywhere Database from within DBISQL?

It doesn't matter if the change will take effect after next starting of the Database, the question is whether there is an Statement alternative for the DBLOG.EXE

I know that reading the settings is possible in dbisql via select db_property ('LogMirrorName') so will be great if writing is also possible.

asked 29 Apr '21, 10:20

Baron's gravatar image

Baron
2.1k134146175
accept rate: 46%


permanent link

answered 29 Apr '21, 11:32

Volker%20Barth's gravatar image

Volker Barth
40.1k361549819
accept rate: 34%

Thank you very much!!

Noticable was also the UPGRADE SCRIPT FILE CLAUSE, What would exactly be done here? Just execute the specified sql script file? What would this then differ from the usual READ statement?

(29 Apr '21, 13:28) Baron
2

The ALTER DATABASE ... UPGRADE SCRIPT ensures that in the event of a problem running the script that the database is put back to before the ALTER DATABASE even if the script contains statements that has commit side effects i.e. most DDL statements. With a READ, all statements committed (even as a side effect) would remain if the script encountered an error. If the script must complete successfully and not leave the database in a partial completed upgrade, using UPGRADE SCRIPT is a better mechanism than READ.

(30 Apr '21, 01:10) Chris Keating
Replies hidden

This is great to know, this could be helpful.

The question is, is it necessary that the script is a one single file? Or this file could be a script with several READs which in turn reads another scripts?

(30 Apr '21, 02:39) Baron

Does this

...the database is put back to before the ALTER DATABASE...

also apply if the script contains an explicit commit statement?

(30 Apr '21, 02:47) Baron

@Chris: BTW, is this a v17 enhancement? I have never read that before, and it's documented for v17, but not v16 but I don't see an "What's New" entry there... - whereas the v17 enhancement to ALTER DATABASE SAVE CACHE do get mentioned...

(30 Apr '21, 03:02) Volker Barth

Yes, according both to Chris's statement and the mentioned doc page:

If the script execution is not successful, and RESTART ON is specified (the default), the database is rolled back to the checkpoint that was automatically performed before the upgrade...

I assume it does use the new v17 point-in-time-recovery feature to do so, but that's just a guess...

(30 Apr '21, 03:12) Volker Barth
Comment Text Removed
1

It is listed under Changes to database administration in the "What's New" topic. See https://help.sap.com/viewer/a3e900ad39b94d689987e838835f39fe/17.0/en-US/7807d1fe7a8847e4bab7591613c0f2fb.html.

(30 Apr '21, 08:12) Chris Keating
Replies hidden

Ah, I got it. FWIW, that link does not work for me but DCX does...

(30 Apr '21, 08:40) Volker Barth
showing 3 of 8 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:

×5

question asked: 29 Apr '21, 10:20

question was seen: 555 times

last updated: 30 Apr '21, 08:40