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.

Please, I need fast replies!

Firstly, I have just started working with SQL Anywhere and it is pretty different than others RDBMS like Sybase ASE.

I need to make a Standby Server on another remote computer. Is it possible on SQL Anywhere? Basically, it should be only to transfer transaction logs to the remote server in a recovery mode.

Is there any startup option to make the server start, apply the logs and wait for new logs?

I found the Server Mirror technique, but I need just a simple standby server.

Thanks Roger

asked 11 Jul '12, 17:36

Roger's gravatar image

Roger
1265510
accept rate: 0%


Running dbbackup in "live mode" might work for you (dbbackup -l).

Let's see if I can remember... your primary database resides on computer A, and you take a one-time full backup of the .db and .log files and copy them over to computer B... but don't do anything with them yet. Then, you start dbbackup -l running on computer B, connected over the interweb or whatever to the primary database on computer A. The dbbackup utility will then immediately copy over all the transaction log entries that were created since the full backup was taken, so it may be busy for a little while. Then it sits there, running forever, reading log entries and writing them to a local .log file on computer B.

Then... kaboom!... computer A goes away, you stop the dbbackup, and you start the database copy on machine B in "recovery mode" to roll-forward the first log copy and then the live backup log file, using dbsrv12 -a or -ad http://dcx.sybase.com/index.html#1201/en/dbadmin/rec-a-database-dbengine.html or http://dcx.sybase.com/index.html#1201/en/dbadmin/dbserver-s-3223660.html

Live backups predated mirroring by many years. You can actually have multiple remote sites all running dbbackup -l against the same primary, like wearing suspenders with a belt.

Some docs...

http://www.sybase.com/files/White_Papers/SQLA_SA_backup_070307-wp.pdf

http://dcx.sybase.com/index.html#1201/en/dbadmin/da-backup-dbs-4977640.html

This article doesn't talk about live backups per se, but it does get down and dirty with examples of command lines...

http://sqlanywhere.blogspot.ca/2011/04/demonstrating-backup-validation-and.html

permanent link

answered 11 Jul '12, 18:28

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

Dunno how THAT happened, I absolutely did not click anything twice... so I am leaving both copies of the answer in case it helps with debugging.

(11 Jul '12, 18:30) Breck Carter

I guess that's what you call a dbbackup -l of your post :-)

(11 Jul '12, 19:48) cirxesoul
Replies hidden

...yes, and it's CONTINUING to make copies of the log entries, er, posted answers (see below)

...something truly funky is going on, and it's not "just me"

...or am I seeing double? :)

(12 Jul '12, 05:23) Breck Carter

Running dbbackup in "live mode" might work for you (dbbackup -l).

Let's see if I can remember... your primary database resides on computer A, and you take a one-time full backup of the .db and .log files and copy them over to computer B... but don't do anything with them yet. Then, you start dbbackup -l running on computer B, connected over the interweb or whatever to the primary database on computer A. The dbbackup utility will then immediately copy over all the transaction log entries that were created since the full backup was taken, so it may be busy for a little while. Then it sits there, running forever, reading log entries and writing them to a local .log file on computer B.

Then... kaboom!... computer A goes away, you stop the dbbackup, and you start the database copy on machine B in "recovery mode" to roll-forward the first log copy and then the live backup log file, using dbsrv12 -a or -ad http://dcx.sybase.com/index.html#1201/en/dbadmin/rec-a-database-dbengine.html or http://dcx.sybase.com/index.html#1201/en/dbadmin/dbserver-s-3223660.html

Live backups predated mirroring by many years. You can actually have multiple remote sites all running dbbackup -l against the same primary, like wearing suspenders with a belt.

Some docs...

http://www.sybase.com/files/White_Papers/SQLA_SA_backup_070307-wp.pdf

http://dcx.sybase.com/index.html#1201/en/dbadmin/da-backup-dbs-4977640.html

This article doesn't talk about live backups per se, but it does get down and dirty with examples of command lines...

http://sqlanywhere.blogspot.ca/2011/04/demonstrating-backup-validation-and.html

permanent link

answered 11 Jul '12, 18:28

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

Thank you for reply, Mr. Carter.

I tried this option before, but the problem I saw is that the database on machine B only can recovery when the primary server stops. In standby servers, the database recovers whethever transaction log gets in the folder... it minimizes the time for recovery, because is almost up-to-date.

So, I am considerating the Mirror Server as my choice. Do you have any document with step-by-step to build the Mirror Server on SQL Anywhere 12.0.1?

Thanks! Roger

permanent link

answered 11 Jul '12, 22:21

Roger's gravatar image

Roger
1265510
accept rate: 0%

1

I don't think you can only "go live" with the database on machine B when the database server on machine A stops. You should be able to stop the "DBBACKUP -l" process and then reapply the log on the database on machine B. (But of course you might then loose further changes from A...)

The official docs for 12.0.1 do contain some tutorials on HA, cf. this doc page. - Have you tried these?

And Breck has a great tutorial on his blog on HA with v11. However, as the statements to config the servers have changed in v12, it might not be that appropriate for you.

(12 Jul '12, 04:02) Volker Barth
Replies hidden

I would update the tutorial if I could figure out the declarative versions of all the features formerly available only through command line options. The Old School stuff still works, and the New School stuff is... just... so... confusing... but that's what my tutorials are for, aren't they? Sigh :)

(12 Jul '12, 05:30) Breck Carter

If running a live dbbackup does not satisfy your requirements then perhaps you should look at the High Availability option, aka database mirroring.

When using database mirroring the transaction log contents get copied to the mirror server either synchronously or asynchronously (i.e. configurable) and gets applied to the mirror copy of the database. When the primary server fails the mirror copy automatically takes over as the new primary thus minimizing downtime.

Take a look at the documentation for more information.

permanent link

answered 12 Jul '12, 08:59

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

3

Just to add: with SA12 HA is not available for the Workgroup Editition, at least the Standard Edition is required. We tripped over that the first time we wanted to set it up. But using the Developer Edition will enable you to test all options.

(12 Jul '12, 11:45) Reimer Pods

Thank you for reply, Mr. Carter.

I tried this option before, but the problem I saw is that the database on machine B only can recovery when the primary server stops. In standby servers, the database recovers whethever transaction log gets in the folder... it minimizes the time for recovery, because is almost up-to-date.

So, I am considerating the Mirror Server as my choice. Do you have any document with step-by-step to build the Mirror Server on SQL Anywhere 12.0.1?

Thanks! Roger

permanent link

answered 11 Jul '12, 22:21

Roger's gravatar image

Roger
1265510
accept rate: 0%

This is a test answer, to determine if all answers to this question are being duplicated.

permanent link

answered 12 Jul '12, 05:24

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

...and I guess not.

...doncha just LOVE weird bugs that aren't easily reproduced? No, I don't either :)

(12 Jul '12, 05:26) Breck Carter

This is a test answer, to determine if all answers to this question are being duplicated.

permanent link

answered 12 Jul '12, 05:33

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

1

Man, and now they get even duplicated and grab a random user as poster:)

(No, don't get too worried - the answer was copied on (non-sense) purpose:)

(12 Jul '12, 05:34) Volker Barth
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:

×56

question asked: 11 Jul '12, 17:36

question was seen: 3,270 times

last updated: 12 Jul '12, 11:45