Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Solution to do live backup of Adaptive Server Anywhere 7

14 posts in Commercial ISV's Last posting was on 2009-03-05 18:39:49.0Z
JohnnyD Posted on 2009-03-03 07:20:36.0Z
Sender: 11b5.49acd3c1.1804289383@sybase.com
From: JohnnyD
Newsgroups: sybase.public.commercial-isv.general
Subject: Solution to do live backup of Adaptive Server Anywhere 7
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49acda44.122c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 2 Mar 2009 23:20:36 -0800
X-Trace: forums-1-dub 1236064836 10.22.241.41 (2 Mar 2009 23:20:36 -0800)
X-Original-Trace: 2 Mar 2009 23:20:36 -0800, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:241
Article PK: 103958

Hello everyone,

I am not sure if this is the correct group, but I am trying
to develop a solution to do a live backup of Sybase adaptive
server anywhere 7 .db and .log files. (backup while database
is running) The software using the database is called
Eaglesoft (dental software) and includes a utility called
dbbackup.exe. I have written a script to use dbbackup.exe
that exports the transaction log and database file from the
live sybase database hourly to a seperate directory just
before my backup program takes a vss snapshot of the disk
but the problem is that dbbackup often stalls and does not
work. I have read about the "quiesce database hold". I
assume that dbbackup.exe uses this kind of command to
"freeze" the database to take a "snapshot" before exporting
the data. My backup program allows me to specify "pre" and
"post" commands to initiate before and after the backup vss
shapshot is taken of the drive. Does anyone know of an
alternate solution to using "dbbackup.exe" such as a
"quiesce database hold" command that I could use as a pre
snaphot command?

Thanks very much,

Johnny


Breck Carter [TeamSybase] Posted on 2009-03-03 15:32:58.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: Solution to do live backup of Adaptive Server Anywhere 7
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com>
References: <49acda44.122c.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 3 Mar 2009 07:32:58 -0800
X-Trace: forums-1-dub 1236094378 10.22.241.152 (3 Mar 2009 07:32:58 -0800)
X-Original-Trace: 3 Mar 2009 07:32:58 -0800, vip152.sybase.com
Lines: 82
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:242
Article PK: 103959

Yes, this is the wrong forum, but I will start answering here and now
(the right newsgroup is sybase.public.sqlanywhere.general)

What you are asking for is technically called an "online backup"
meaning a backup while the database is online. A "live backup" goes
above and beyond that by continuously shipping transaction log records
to a second computer for immediate failover if the first machine is,
say, utterly destroyed along with the city it's in :)

The dbbackup.exe utility IS the one you want to use. It does NOT
freeze updates, and "quiesce database hold" is not a feature of SQL
Anywhere. The only alternative to dbbackup.exe for online backups is
the BACKUP statement, and it pretty much does the same thing.

If you really want a quick and dirty solution, do an "offline backup":
stop the engine, copy the *.db and *.log files, and start the engine.
There is no utility to do that because, well, you can write your own
command file to run dbstop.exe, copy, and dbeng/srv7.exe.

Soooo... the question remains, why does it stall for you? SQL Anywhere
7 is very very very old and there may be a bug, especially if you are
using the 7.0.0 GA (original) release. Upgrades to 7.0.later-than-that
and EBFs (express builds) are free to download.

If you are doing LOTS of updates and there's not much RAM and disk
space free, it may be having trouble there: the backup process
suspends checkpoints so all user updates go into the RAM cache and
temporary file (as well as the transaction log) until the backup
finishes. I.e., the *.db file remains unchanged until its backup copy
is closed. The backup copy of the transaction log is up-to-date as of
the end of the backup, so that's why it is necessary when you do a
restore (i.e., start the backup database as current): the automatic
recovery process applies the log changes to the out-of-date backup
*.db.

If your application or users issue explicit CHECKPOINT commands
(usually a bad idea), they will (should) be blocked. Historically that
has caused problems similar to "stall" (but I remember it in V9... it
may have been an old persistent bug).

What exact version and build of SQL Anywhere 7 are you using? e.g.
7.0.3.2046. SELECT @@version will tell you.

Can you move up? say, to 10.0.1 or 11.0.0?

Breck

On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:

>Hello everyone,
>
>I am not sure if this is the correct group, but I am trying
>to develop a solution to do a live backup of Sybase adaptive
>server anywhere 7 .db and .log files. (backup while database
>is running) The software using the database is called
>Eaglesoft (dental software) and includes a utility called
>dbbackup.exe. I have written a script to use dbbackup.exe
>that exports the transaction log and database file from the
>live sybase database hourly to a seperate directory just
>before my backup program takes a vss snapshot of the disk
>but the problem is that dbbackup often stalls and does not
>work. I have read about the "quiesce database hold". I
>assume that dbbackup.exe uses this kind of command to
>"freeze" the database to take a "snapshot" before exporting
>the data. My backup program allows me to specify "pre" and
>"post" commands to initiate before and after the backup vss
>shapshot is taken of the drive. Does anyone know of an
>alternate solution to using "dbbackup.exe" such as a
>"quiesce database hold" command that I could use as a pre
>snaphot command?
>
>Thanks very much,
>
>Johnny

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Jeff Gibson Posted on 2009-03-03 21:23:08.0Z
Reply-To: "Jeff Gibson" <jgibson@interceptsolutions.com>
From: "Jeff Gibson" <jgibson@interceptsolutions.com>
Newsgroups: sybase.public.commercial-isv.general
References: <49acda44.122c.1681692777@sybase.com> <g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com>
Subject: Re: Solution to do live backup of Adaptive Server Anywhere 7
Lines: 129
Organization: Intercept Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49ad9fbc@forums-1-dub>
Date: 3 Mar 2009 13:23:08 -0800
X-Trace: forums-1-dub 1236115388 10.22.241.152 (3 Mar 2009 13:23:08 -0800)
X-Original-Trace: 3 Mar 2009 13:23:08 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:245
Article PK: 103961

To Johnny and Breck,

I just wanted to add something to the conversation here. Granted, when it
comes to the technical aspect to the question, (how do you perform an online
backup), Breck was correct. That kind of question alone could have been
placed in the sybase.public.sqlanywhere.general newsgroup. However, I'm
going to add that I don't believe that this question has been posted to the
wrong newsgroup.

This is a perfect example of an ISV style question. Eaglesoft (which has a
very cool demo on their website by the way), is an ISV style company that
creates commercial solutions using PowerBuilder.

I'm sure most, if not all, of the ISV's out there would be interested in
implementing a backup solution in a product that is running in multiple
locations that do not have a DBA on staff there running the software (I know
my dentist doesn't have a DBA). The fact that Johnny was running into
locks, is good information for an ISV company to have. Especially if they
are doing the same thing.

I have a company that is running an old product of ours that was developed
using an old cross platform toolset. Long story short, they ended up
inadvertently replacing their year old data file with a new data file using
the same name. (Kind of like saving a new Word document with nothing in it
over the top of your old Word document that you've been working on for a
long time using the same file name) Even though we threw up three or four
warnings, they still replaced the file. And the best news of all, they
thought that System Restore was backing up their files for them.

Needless to say, they're hurting now trying to recreate a new file. I'm
looking to see if any undelete tools will restore the file. You get the
picture.

I would say the idea of automatic backups in a commercial application is a
good thing.

Thanks for the post Johnny. Please feel free to post ISV type questions to
this group.

Jeff Gibson
Intercept Solutions - Sybase SQL Anywhere OEM Partner
Nashville, TN

"Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com> wrote in
message news:g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com...
> Yes, this is the wrong forum, but I will start answering here and now
> (the right newsgroup is sybase.public.sqlanywhere.general)
>
> What you are asking for is technically called an "online backup"
> meaning a backup while the database is online. A "live backup" goes
> above and beyond that by continuously shipping transaction log records
> to a second computer for immediate failover if the first machine is,
> say, utterly destroyed along with the city it's in :)
>
> The dbbackup.exe utility IS the one you want to use. It does NOT
> freeze updates, and "quiesce database hold" is not a feature of SQL
> Anywhere. The only alternative to dbbackup.exe for online backups is
> the BACKUP statement, and it pretty much does the same thing.
>
> If you really want a quick and dirty solution, do an "offline backup":
> stop the engine, copy the *.db and *.log files, and start the engine.
> There is no utility to do that because, well, you can write your own
> command file to run dbstop.exe, copy, and dbeng/srv7.exe.
>
> Soooo... the question remains, why does it stall for you? SQL Anywhere
> 7 is very very very old and there may be a bug, especially if you are
> using the 7.0.0 GA (original) release. Upgrades to 7.0.later-than-that
> and EBFs (express builds) are free to download.
>
> If you are doing LOTS of updates and there's not much RAM and disk
> space free, it may be having trouble there: the backup process
> suspends checkpoints so all user updates go into the RAM cache and
> temporary file (as well as the transaction log) until the backup
> finishes. I.e., the *.db file remains unchanged until its backup copy
> is closed. The backup copy of the transaction log is up-to-date as of
> the end of the backup, so that's why it is necessary when you do a
> restore (i.e., start the backup database as current): the automatic
> recovery process applies the log changes to the out-of-date backup
> *.db.
>
> If your application or users issue explicit CHECKPOINT commands
> (usually a bad idea), they will (should) be blocked. Historically that
> has caused problems similar to "stall" (but I remember it in V9... it
> may have been an old persistent bug).
>
> What exact version and build of SQL Anywhere 7 are you using? e.g.
> 7.0.3.2046. SELECT @@version will tell you.
>
> Can you move up? say, to 10.0.1 or 11.0.0?
>
> Breck
>
>
>
> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
>
>>Hello everyone,
>>
>>I am not sure if this is the correct group, but I am trying
>>to develop a solution to do a live backup of Sybase adaptive
>>server anywhere 7 .db and .log files. (backup while database
>>is running) The software using the database is called
>>Eaglesoft (dental software) and includes a utility called
>>dbbackup.exe. I have written a script to use dbbackup.exe
>>that exports the transaction log and database file from the
>>live sybase database hourly to a seperate directory just
>>before my backup program takes a vss snapshot of the disk
>>but the problem is that dbbackup often stalls and does not
>>work. I have read about the "quiesce database hold". I
>>assume that dbbackup.exe uses this kind of command to
>>"freeze" the database to take a "snapshot" before exporting
>>the data. My backup program allows me to specify "pre" and
>>"post" commands to initiate before and after the backup vss
>>shapshot is taken of the drive. Does anyone know of an
>>alternate solution to using "dbbackup.exe" such as a
>>"quiesce database hold" command that I could use as a pre
>>snaphot command?
>>
>>Thanks very much,
>>
>>Johnny
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


Breck Carter [TeamSybase] Posted on 2009-03-04 07:55:25.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: Solution to do live backup of Adaptive Server Anywhere 7
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <qscsq455m23o6ivfqr6j99hesu8atj8au5@4ax.com>
References: <49acda44.122c.1681692777@sybase.com> <g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com> <49ad9fbc@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 3 Mar 2009 23:55:25 -0800
X-Trace: forums-1-dub 1236153325 10.22.241.152 (3 Mar 2009 23:55:25 -0800)
X-Original-Trace: 3 Mar 2009 23:55:25 -0800, vip152.sybase.com
Lines: 143
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:248
Article PK: 103967

You make a good point, which I hadn't thought of.

I guess it's a good thing my natural inclination is to answer
questions where I find them :)


On 3 Mar 2009 13:23:08 -0800, "Jeff Gibson"

<jgibson@interceptsolutions.com> wrote:

>To Johnny and Breck,
>
>I just wanted to add something to the conversation here. Granted, when it
>comes to the technical aspect to the question, (how do you perform an online
>backup), Breck was correct. That kind of question alone could have been
>placed in the sybase.public.sqlanywhere.general newsgroup. However, I'm
>going to add that I don't believe that this question has been posted to the
>wrong newsgroup.
>
>This is a perfect example of an ISV style question. Eaglesoft (which has a
>very cool demo on their website by the way), is an ISV style company that
>creates commercial solutions using PowerBuilder.
>
>I'm sure most, if not all, of the ISV's out there would be interested in
>implementing a backup solution in a product that is running in multiple
>locations that do not have a DBA on staff there running the software (I know
>my dentist doesn't have a DBA). The fact that Johnny was running into
>locks, is good information for an ISV company to have. Especially if they
>are doing the same thing.
>
>I have a company that is running an old product of ours that was developed
>using an old cross platform toolset. Long story short, they ended up
>inadvertently replacing their year old data file with a new data file using
>the same name. (Kind of like saving a new Word document with nothing in it
>over the top of your old Word document that you've been working on for a
>long time using the same file name) Even though we threw up three or four
>warnings, they still replaced the file. And the best news of all, they
>thought that System Restore was backing up their files for them.
>
>Needless to say, they're hurting now trying to recreate a new file. I'm
>looking to see if any undelete tools will restore the file. You get the
>picture.
>
>I would say the idea of automatic backups in a commercial application is a
>good thing.
>
>Thanks for the post Johnny. Please feel free to post ISV type questions to
>this group.
>
>Jeff Gibson
>Intercept Solutions - Sybase SQL Anywhere OEM Partner
>Nashville, TN
>
>"Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com> wrote in
>message news:g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com...
>> Yes, this is the wrong forum, but I will start answering here and now
>> (the right newsgroup is sybase.public.sqlanywhere.general)
>>
>> What you are asking for is technically called an "online backup"
>> meaning a backup while the database is online. A "live backup" goes
>> above and beyond that by continuously shipping transaction log records
>> to a second computer for immediate failover if the first machine is,
>> say, utterly destroyed along with the city it's in :)
>>
>> The dbbackup.exe utility IS the one you want to use. It does NOT
>> freeze updates, and "quiesce database hold" is not a feature of SQL
>> Anywhere. The only alternative to dbbackup.exe for online backups is
>> the BACKUP statement, and it pretty much does the same thing.
>>
>> If you really want a quick and dirty solution, do an "offline backup":
>> stop the engine, copy the *.db and *.log files, and start the engine.
>> There is no utility to do that because, well, you can write your own
>> command file to run dbstop.exe, copy, and dbeng/srv7.exe.
>>
>> Soooo... the question remains, why does it stall for you? SQL Anywhere
>> 7 is very very very old and there may be a bug, especially if you are
>> using the 7.0.0 GA (original) release. Upgrades to 7.0.later-than-that
>> and EBFs (express builds) are free to download.
>>
>> If you are doing LOTS of updates and there's not much RAM and disk
>> space free, it may be having trouble there: the backup process
>> suspends checkpoints so all user updates go into the RAM cache and
>> temporary file (as well as the transaction log) until the backup
>> finishes. I.e., the *.db file remains unchanged until its backup copy
>> is closed. The backup copy of the transaction log is up-to-date as of
>> the end of the backup, so that's why it is necessary when you do a
>> restore (i.e., start the backup database as current): the automatic
>> recovery process applies the log changes to the out-of-date backup
>> *.db.
>>
>> If your application or users issue explicit CHECKPOINT commands
>> (usually a bad idea), they will (should) be blocked. Historically that
>> has caused problems similar to "stall" (but I remember it in V9... it
>> may have been an old persistent bug).
>>
>> What exact version and build of SQL Anywhere 7 are you using? e.g.
>> 7.0.3.2046. SELECT @@version will tell you.
>>
>> Can you move up? say, to 10.0.1 or 11.0.0?
>>
>> Breck
>>
>>
>>
>> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
>>
>>>Hello everyone,
>>>
>>>I am not sure if this is the correct group, but I am trying
>>>to develop a solution to do a live backup of Sybase adaptive
>>>server anywhere 7 .db and .log files. (backup while database
>>>is running) The software using the database is called
>>>Eaglesoft (dental software) and includes a utility called
>>>dbbackup.exe. I have written a script to use dbbackup.exe
>>>that exports the transaction log and database file from the
>>>live sybase database hourly to a seperate directory just
>>>before my backup program takes a vss snapshot of the disk
>>>but the problem is that dbbackup often stalls and does not
>>>work. I have read about the "quiesce database hold". I
>>>assume that dbbackup.exe uses this kind of command to
>>>"freeze" the database to take a "snapshot" before exporting
>>>the data. My backup program allows me to specify "pre" and
>>>"post" commands to initiate before and after the backup vss
>>>shapshot is taken of the drive. Does anyone know of an
>>>alternate solution to using "dbbackup.exe" such as a
>>>"quiesce database hold" command that I could use as a pre
>>>snaphot command?
>>>
>>>Thanks very much,
>>>
>>>Johnny
>>
>> --
>> Breck Carter http://sqlanywhere.blogspot.com/
>>
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> breck.carter@risingroad.com
>

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Breck Carter [TeamSybase] Posted on 2009-03-04 14:37:51.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: Solution to do live backup of Adaptive Server Anywhere 7
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <5h4tq49f4bqa0cb01gepcih81b3memh932@4ax.com>
References: <qscsq455m23o6ivfqr6j99hesu8atj8au5@4ax.com> <49ae3cea.3393.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 4 Mar 2009 06:37:51 -0800
X-Trace: forums-1-dub 1236177471 10.22.241.152 (4 Mar 2009 06:37:51 -0800)
X-Original-Trace: 4 Mar 2009 06:37:51 -0800, vip152.sybase.com
Lines: 172
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:253
Article PK: 103970

I assume you've read them by now... if you're talking about something
else, let me know :)

Breck

On 4 Mar 2009 00:33:46 -0800, Johnny wrote:

>Hi Breck,
>
>Just wondering...did you happen to have any thoughts on my
>last post?
>
>-Johnny
>
>> You make a good point, which I hadn't thought of.
>>
>> I guess it's a good thing my natural inclination is to
>> answer questions where I find them :)
>>
>>
>> On 3 Mar 2009 13:23:08 -0800, "Jeff Gibson"
>> <jgibson@interceptsolutions.com> wrote:
>>
>> >To Johnny and Breck,
>> >
>> >I just wanted to add something to the conversation here.
>> Granted, when it >comes to the technical aspect to the
>> question, (how do you perform an online >backup), Breck
>> was correct. That kind of question alone could have been
>> >placed in the sybase.public.sqlanywhere.general
>> newsgroup. However, I'm >going to add that I don't
>> believe that this question has been posted to the >wrong
>> newsgroup. >
>> >This is a perfect example of an ISV style question.
>> Eaglesoft (which has a >very cool demo on their website
>> by the way), is an ISV style company that >creates
>> commercial solutions using PowerBuilder. >
>> >I'm sure most, if not all, of the ISV's out there would
>> be interested in >implementing a backup solution in a
>> product that is running in multiple >locations that do
>> not have a DBA on staff there running the software (I know
>> >my dentist doesn't have a DBA). The fact that Johnny was
>> running into >locks, is good information for an ISV
>> company to have. Especially if they >are doing the same
>> thing. >
>> >I have a company that is running an old product of ours
>> that was developed >using an old cross platform toolset.
>> Long story short, they ended up >inadvertently replacing
>> their year old data file with a new data file using >the
>> same name. (Kind of like saving a new Word document with
>> nothing in it >over the top of your old Word document
>> that you've been working on for a >long time using the
>> same file name) Even though we threw up three or four
>> >warnings, they still replaced the file. And the best
>> news of all, they >thought that System Restore was
>> backing up their files for them. >
>> >Needless to say, they're hurting now trying to recreate a
>> new file. I'm >looking to see if any undelete tools will
>> restore the file. You get the >picture.
>> >
>> >I would say the idea of automatic backups in a commercial
>> application is a >good thing.
>> >
>> >Thanks for the post Johnny. Please feel free to post ISV
>> type questions to >this group.
>> >
>> >Jeff Gibson
>> >Intercept Solutions - Sybase SQL Anywhere OEM Partner
>> >Nashville, TN
>> >
>> >"Breck Carter [TeamSybase]"
>> <NOSPAM__breck.carter@gmail.com> wrote in >message
>> news:g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com... >> Yes,
>> this is the wrong forum, but I will start answering here
>> and now >> (the right newsgroup is
>> sybase.public.sqlanywhere.general) >>
>> >> What you are asking for is technically called an
>> "online backup" >> meaning a backup while the database is
>> online. A "live backup" goes >> above and beyond that by
>> continuously shipping transaction log records >> to a
>> second computer for immediate failover if the first
>> machine is, >> say, utterly destroyed along with the city
>> it's in :) >>
>> >> The dbbackup.exe utility IS the one you want to use. It
>> does NOT >> freeze updates, and "quiesce database hold" is
>> not a feature of SQL >> Anywhere. The only alternative to
>> dbbackup.exe for online backups is >> the BACKUP statement
>> , and it pretty much does the same thing. >>
>> >> If you really want a quick and dirty solution, do an
>> "offline backup": >> stop the engine, copy the *.db and
>> *.log files, and start the engine. >> There is no utility
>> to do that because, well, you can write your own >>
>> command file to run dbstop.exe, copy, and dbeng/srv7.exe.
>> >> >> Soooo... the question remains, why does it stall for
>> you? SQL Anywhere >> 7 is very very very old and there may
>> be a bug, especially if you are >> using the 7.0.0 GA
>> (original) release. Upgrades to 7.0.later-than-that >> and
>> EBFs (express builds) are free to download. >>
>> >> If you are doing LOTS of updates and there's not much
>> RAM and disk >> space free, it may be having trouble
>> there: the backup process >> suspends checkpoints so all
>> user updates go into the RAM cache and >> temporary file
>> (as well as the transaction log) until the backup >>
>> finishes. I.e., the *.db file remains unchanged until its
>> backup copy >> is closed. The backup copy of the
>> transaction log is up-to-date as of >> the end of the
>> backup, so that's why it is necessary when you do a >>
>> restore (i.e., start the backup database as current): the
>> automatic >> recovery process applies the log changes to
>> the out-of-date backup >> *.db.
>> >>
>> >> If your application or users issue explicit CHECKPOINT
>> commands >> (usually a bad idea), they will (should) be
>> blocked. Historically that >> has caused problems similar
>> to "stall" (but I remember it in V9... it >> may have been
>> an old persistent bug). >>
>> >> What exact version and build of SQL Anywhere 7 are you
>> using? e.g. >> 7.0.3.2046. SELECT @@version will tell you.
>> >>
>> >> Can you move up? say, to 10.0.1 or 11.0.0?
>> >>
>> >> Breck
>> >>
>> >>
>> >>
>> >> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
>> >>
>> >>>Hello everyone,
>> >>>
>> >>>I am not sure if this is the correct group, but I am
>> trying >>>to develop a solution to do a live backup of
>> Sybase adaptive >>>server anywhere 7 .db and .log files.
>> (backup while database >>>is running) The software using
>> the database is called >>>Eaglesoft (dental software) and
>> includes a utility called >>>dbbackup.exe. I have written
>> a script to use dbbackup.exe >>>that exports the
>> transaction log and database file from the >>>live sybase
>> database hourly to a seperate directory just >>>before my
>> backup program takes a vss snapshot of the disk >>>but the
>> problem is that dbbackup often stalls and does not
>> >>>work. I have read about the "quiesce database hold". I
>> >>>assume that dbbackup.exe uses this kind of command to
>> >>>"freeze" the database to take a "snapshot" before
>> exporting >>>the data. My backup program allows me to
>> specify "pre" and >>>"post" commands to initiate before
>> and after the backup vss >>>shapshot is taken of the
>> drive. Does anyone know of an >>>alternate solution to
>> using "dbbackup.exe" such as a >>>"quiesce database hold"
>> command that I could use as a pre >>>snaphot command?
>> >>>
>> >>>Thanks very much,
>> >>>
>> >>>Johnny
>> >>
>> >> --
>> >> Breck Carter http://sqlanywhere.blogspot.com/
>> >>
>> >> RisingRoad SQL Anywhere and MobiLink Professional
>> Services >> breck.carter@risingroad.com
>> >
>>
>> --
>> Breck Carter http://sqlanywhere.blogspot.com/
>>
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> breck.carter@risingroad.com

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Johnny Posted on 2009-03-03 20:02:26.0Z
Sender: 23a5.49ad87bc.1804289383@sybase.com
From: Johnny
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: Solution to do live backup of Adaptive Server Anywhere 7
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49ad8cd2.2439.1681692777@sybase.com>
References: <g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Mar 2009 12:02:26 -0800
X-Trace: forums-1-dub 1236110546 10.22.241.41 (3 Mar 2009 12:02:26 -0800)
X-Original-Trace: 3 Mar 2009 12:02:26 -0800, 10.22.241.41
Lines: 119
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:244
Article PK: 103963

Hi Breck,

Thanks so very much for answering my post. The DB version is
7.0.3.2046. I am not sure why Eaglesoft has stuck with the
old version for so long but they have. I am just a database
novice, but I assume that I would need to stick with the
version they support...unless you think there would be very
little difference in terms of how the program would interact
with the engine? In terms of the freezing of dbbackup, the
the server is new....plenty of spare RAM and plenty of disk
space. It hangs intermittently...maybe 30% of the time
somewhere in the export process. The other installation I
support in a seperate office has the same issue. Does the
"BACKUP" statement do the same thing as dbbackup.exe except
for exporting the database files? If so...that would be a
great solution. I used to stop the service and backup
offline as you mentioned now I have a backup solution that
backs up every hour while the database is in use. I do this
so I can virtualize the single server in case of failure. Do
you know how I would use the "BACKUP" statement in a batch
file...one batch file to backup, then another batch file to
resume the database? My backup program allows me to run a
batch file both before and after the vss disk snapshot
(backup)which lasts a few seconds.

Thanks again for you help...much appreciated,

Johnny

> Yes, this is the wrong forum, but I will start answering
> here and now (the right newsgroup is
> sybase.public.sqlanywhere.general)
>
> What you are asking for is technically called an "online
> backup" meaning a backup while the database is online. A
> "live backup" goes above and beyond that by continuously
> shipping transaction log records to a second computer for
> immediate failover if the first machine is, say, utterly
> destroyed along with the city it's in :)
>
> The dbbackup.exe utility IS the one you want to use. It
> does NOT freeze updates, and "quiesce database hold" is
> not a feature of SQL Anywhere. The only alternative to
> dbbackup.exe for online backups is the BACKUP statement,
> and it pretty much does the same thing.
>
> If you really want a quick and dirty solution, do an
> "offline backup": stop the engine, copy the *.db and *.log
> files, and start the engine. There is no utility to do
> that because, well, you can write your own command file to
> run dbstop.exe, copy, and dbeng/srv7.exe.
>
> Soooo... the question remains, why does it stall for you?
> SQL Anywhere 7 is very very very old and there may be a
> bug, especially if you are using the 7.0.0 GA (original)
> release. Upgrades to 7.0.later-than-that and EBFs (express
> builds) are free to download.
>
> If you are doing LOTS of updates and there's not much RAM
> and disk space free, it may be having trouble there: the
> backup process suspends checkpoints so all user updates go
> into the RAM cache and temporary file (as well as the
> transaction log) until the backup finishes. I.e., the *.db
> file remains unchanged until its backup copy is closed.
> The backup copy of the transaction log is up-to-date as of
> the end of the backup, so that's why it is necessary when
> you do a restore (i.e., start the backup database as
> current): the automatic recovery process applies the log
> changes to the out-of-date backup *.db.
>
> If your application or users issue explicit CHECKPOINT
> commands (usually a bad idea), they will (should) be
> blocked. Historically that has caused problems similar to
> "stall" (but I remember it in V9... it may have been an
> old persistent bug).
>
> What exact version and build of SQL Anywhere 7 are you
> using? e.g. 7.0.3.2046. SELECT @@version will tell you.
>
> Can you move up? say, to 10.0.1 or 11.0.0?
>
> Breck
>
>
>
> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
>
> >Hello everyone,
> >
> >I am not sure if this is the correct group, but I am
> trying >to develop a solution to do a live backup of
> Sybase adaptive >server anywhere 7 .db and .log files.
> (backup while database >is running) The software using the
> database is called >Eaglesoft (dental software) and
> includes a utility called >dbbackup.exe. I have written a
> script to use dbbackup.exe >that exports the transaction
> log and database file from the >live sybase database
> hourly to a seperate directory just >before my backup
> program takes a vss snapshot of the disk >but the problem
> is that dbbackup often stalls and does not >work. I have
> read about the "quiesce database hold". I >assume that
> dbbackup.exe uses this kind of command to >"freeze" the
> database to take a "snapshot" before exporting >the data.
> My backup program allows me to specify "pre" and >"post"
> commands to initiate before and after the backup vss
> >shapshot is taken of the drive. Does anyone know of an
> >alternate solution to using "dbbackup.exe" such as a
> >"quiesce database hold" command that I could use as a pre
> >snaphot command? >
> >Thanks very much,
> >
> >Johnny
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


Breck Carter [TeamSybase] Posted on 2009-03-04 08:19:52.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: Solution to do live backup of Adaptive Server Anywhere 7
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <kvcsq4dn03r6q5h2htjt2r2602cohg9173@4ax.com>
References: <g4iqq4h1p6b6nmmfmg2956qse6kq37o4pd@4ax.com> <49ad8cd2.2439.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 4 Mar 2009 00:19:52 -0800
X-Trace: forums-1-dub 1236154792 10.22.241.152 (4 Mar 2009 00:19:52 -0800)
X-Original-Trace: 4 Mar 2009 00:19:52 -0800, vip152.sybase.com
Lines: 157
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:249
Article PK: 103964

How big is the database? How fast does the log grow? Are you
truncating/renaming the log?

Have you considered doing a transaction-log-only backup every hour,
and a full backup less frequently?

A differential online backup uses dbbackup -t to back up the
transaction log. To recover, you restore the *.db and *.log created by
the previous full online backup and then use dbeng/srv7.exe -a to
apply the *.log created by the LATEST differential online backup.

An incremental online backup uses dbbackup -r -t (or -x -t if you are
brave) to backup the the transaction log and then start a new
transaction log. To recover, you restore the *.db and *.log created by
the previous full online backup and then apply ALL the *.log files
created by the ALL the subsequent differential online backups.

Needless to say, differential backups have their advantages.
Incrementals are useful if log growth is fast and must be kept in
check; e.g., Gbytes an hour, or you are backing up across a slow line.
But... use differential if you can, IMO.

Final point: You should absolutely practice recovery!

To answer your questions about BACKUP vs dbbackup, here's my op ed
piece on that:
http://sqlanywhere.blogspot.com/2008/11/rotating-database-backups.html

Breck

On 3 Mar 2009 12:02:26 -0800, Johnny wrote:

>Hi Breck,
>
>Thanks so very much for answering my post. The DB version is
>7.0.3.2046. I am not sure why Eaglesoft has stuck with the
>old version for so long but they have. I am just a database
>novice, but I assume that I would need to stick with the
>version they support...unless you think there would be very
>little difference in terms of how the program would interact
>with the engine? In terms of the freezing of dbbackup, the
>the server is new....plenty of spare RAM and plenty of disk
>space. It hangs intermittently...maybe 30% of the time
>somewhere in the export process. The other installation I
>support in a seperate office has the same issue. Does the
>"BACKUP" statement do the same thing as dbbackup.exe except
>for exporting the database files? If so...that would be a
>great solution. I used to stop the service and backup
>offline as you mentioned now I have a backup solution that
>backs up every hour while the database is in use. I do this
>so I can virtualize the single server in case of failure. Do
>you know how I would use the "BACKUP" statement in a batch
>file...one batch file to backup, then another batch file to
>resume the database? My backup program allows me to run a
>batch file both before and after the vss disk snapshot
>(backup)which lasts a few seconds.
>
>Thanks again for you help...much appreciated,
>
>Johnny
>
>
>> Yes, this is the wrong forum, but I will start answering
>> here and now (the right newsgroup is
>> sybase.public.sqlanywhere.general)
>>
>> What you are asking for is technically called an "online
>> backup" meaning a backup while the database is online. A
>> "live backup" goes above and beyond that by continuously
>> shipping transaction log records to a second computer for
>> immediate failover if the first machine is, say, utterly
>> destroyed along with the city it's in :)
>>
>> The dbbackup.exe utility IS the one you want to use. It
>> does NOT freeze updates, and "quiesce database hold" is
>> not a feature of SQL Anywhere. The only alternative to
>> dbbackup.exe for online backups is the BACKUP statement,
>> and it pretty much does the same thing.
>>
>> If you really want a quick and dirty solution, do an
>> "offline backup": stop the engine, copy the *.db and *.log
>> files, and start the engine. There is no utility to do
>> that because, well, you can write your own command file to
>> run dbstop.exe, copy, and dbeng/srv7.exe.
>>
>> Soooo... the question remains, why does it stall for you?
>> SQL Anywhere 7 is very very very old and there may be a
>> bug, especially if you are using the 7.0.0 GA (original)
>> release. Upgrades to 7.0.later-than-that and EBFs (express
>> builds) are free to download.
>>
>> If you are doing LOTS of updates and there's not much RAM
>> and disk space free, it may be having trouble there: the
>> backup process suspends checkpoints so all user updates go
>> into the RAM cache and temporary file (as well as the
>> transaction log) until the backup finishes. I.e., the *.db
>> file remains unchanged until its backup copy is closed.
>> The backup copy of the transaction log is up-to-date as of
>> the end of the backup, so that's why it is necessary when
>> you do a restore (i.e., start the backup database as
>> current): the automatic recovery process applies the log
>> changes to the out-of-date backup *.db.
>>
>> If your application or users issue explicit CHECKPOINT
>> commands (usually a bad idea), they will (should) be
>> blocked. Historically that has caused problems similar to
>> "stall" (but I remember it in V9... it may have been an
>> old persistent bug).
>>
>> What exact version and build of SQL Anywhere 7 are you
>> using? e.g. 7.0.3.2046. SELECT @@version will tell you.
>>
>> Can you move up? say, to 10.0.1 or 11.0.0?
>>
>> Breck
>>
>>
>>
>> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
>>
>> >Hello everyone,
>> >
>> >I am not sure if this is the correct group, but I am
>> trying >to develop a solution to do a live backup of
>> Sybase adaptive >server anywhere 7 .db and .log files.
>> (backup while database >is running) The software using the
>> database is called >Eaglesoft (dental software) and
>> includes a utility called >dbbackup.exe. I have written a
>> script to use dbbackup.exe >that exports the transaction
>> log and database file from the >live sybase database
>> hourly to a seperate directory just >before my backup
>> program takes a vss snapshot of the disk >but the problem
>> is that dbbackup often stalls and does not >work. I have
>> read about the "quiesce database hold". I >assume that
>> dbbackup.exe uses this kind of command to >"freeze" the
>> database to take a "snapshot" before exporting >the data.
>> My backup program allows me to specify "pre" and >"post"
>> commands to initiate before and after the backup vss
>> >shapshot is taken of the drive. Does anyone know of an
>> >alternate solution to using "dbbackup.exe" such as a
>> >"quiesce database hold" command that I could use as a pre
>> >snaphot command? >
>> >Thanks very much,
>> >
>> >Johnny
>>
>> --
>> Breck Carter http://sqlanywhere.blogspot.com/
>>
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> breck.carter@risingroad.com

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Johnny Posted on 2009-03-04 08:47:05.0Z
Sender: 337e.49ae3c29.1804289383@sybase.com
From: Johnny
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: Solution to do live backup of Adaptive Server Anywhere 7
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49ae4009.33ed.1681692777@sybase.com>
References: <kvcsq4dn03r6q5h2htjt2r2602cohg9173@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Mar 2009 00:47:05 -0800
X-Trace: forums-1-dub 1236156425 10.22.241.41 (4 Mar 2009 00:47:05 -0800)
X-Original-Trace: 4 Mar 2009 00:47:05 -0800, 10.22.241.41
Lines: 181
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:251
Article PK: 103968

Thanks very much again Breck,

The database if about 500MB. The log is 16MB and the
database is obout 5 years old so I don't think it grows very
fast.
No ...I am not truncating the log. This is the script I use
to backup:

DBBACKUP -d -t -y -c "eng=eaglesoft;uid=dba;pwd=sql"
"D:\Online_Backup"

I have not considered a log only backup but that sounds like
an excellent idea. Maybe I would not have the freezing that
way? I bet that would be a good solution. I could probably
write a script to restore as well I bet. Thanks for the
excellent idea.

> How big is the database? How fast does the log grow? Are
> you truncating/renaming the log?
>
> Have you considered doing a transaction-log-only backup
> every hour, and a full backup less frequently?
>
> A differential online backup uses dbbackup -t to back up
> the transaction log. To recover, you restore the *.db and
> *.log created by the previous full online backup and then
> use dbeng/srv7.exe -a to apply the *.log created by the
> LATEST differential online backup.
>
> An incremental online backup uses dbbackup -r -t (or -x -t
> if you are brave) to backup the the transaction log and
> then start a new transaction log. To recover, you restore
> the *.db and *.log created by the previous full online
> backup and then apply ALL the *.log files created by the
> ALL the subsequent differential online backups.
>
> Needless to say, differential backups have their
> advantages. Incrementals are useful if log growth is fast
> and must be kept in check; e.g., Gbytes an hour, or you
> are backing up across a slow line. But... use differential
> if you can, IMO.
>
> Final point: You should absolutely practice recovery!
>
> To answer your questions about BACKUP vs dbbackup, here's
> my op ed piece on that:
>
http://sqlanywhere.blogspot.com/2008/11/rotating-database-backups.html
>
> Breck
>
> On 3 Mar 2009 12:02:26 -0800, Johnny wrote:
>
> >Hi Breck,
> >
> >Thanks so very much for answering my post. The DB version
> is >7.0.3.2046. I am not sure why Eaglesoft has stuck with
> the >old version for so long but they have. I am just a
> database >novice, but I assume that I would need to stick
> with the >version they support...unless you think there
> would be very >little difference in terms of how the
> program would interact >with the engine? In terms of the
> freezing of dbbackup, the >the server is new....plenty of
> spare RAM and plenty of disk >space. It hangs
> intermittently...maybe 30% of the time >somewhere in the
> export process. The other installation I >support in a
> seperate office has the same issue. Does the >"BACKUP"
> statement do the same thing as dbbackup.exe except >for
> exporting the database files? If so...that would be a
> >great solution. I used to stop the service and backup
> >offline as you mentioned now I have a backup solution
> that >backs up every hour while the database is in use. I
> do this >so I can virtualize the single server in case of
> failure. Do >you know how I would use the "BACKUP"
> statement in a batch >file...one batch file to backup,
> then another batch file to >resume the database? My backup
> program allows me to run a >batch file both before and
> after the vss disk snapshot >(backup)which lasts a few
> seconds. >
> >Thanks again for you help...much appreciated,
> >
> >Johnny
> >
> >
> >> Yes, this is the wrong forum, but I will start
> answering >> here and now (the right newsgroup is
> >> sybase.public.sqlanywhere.general)
> >>
> >> What you are asking for is technically called an
> "online >> backup" meaning a backup while the database is
> online. A >> "live backup" goes above and beyond that by
> continuously >> shipping transaction log records to a
> second computer for >> immediate failover if the first
> machine is, say, utterly >> destroyed along with the city
> it's in :) >>
> >> The dbbackup.exe utility IS the one you want to use. It
> >> does NOT freeze updates, and "quiesce database hold" is
> >> not a feature of SQL Anywhere. The only alternative to
> >> dbbackup.exe for online backups is the BACKUP statement
> , >> and it pretty much does the same thing.
> >>
> >> If you really want a quick and dirty solution, do an
> >> "offline backup": stop the engine, copy the *.db and
> *.log >> files, and start the engine. There is no utility
> to do >> that because, well, you can write your own
> command file to >> run dbstop.exe, copy, and
> dbeng/srv7.exe. >>
> >> Soooo... the question remains, why does it stall for
> you? >> SQL Anywhere 7 is very very very old and there may
> be a >> bug, especially if you are using the 7.0.0 GA
> (original) >> release. Upgrades to 7.0.later-than-that and
> EBFs (express >> builds) are free to download.
> >>
> >> If you are doing LOTS of updates and there's not much
> RAM >> and disk space free, it may be having trouble
> there: the >> backup process suspends checkpoints so all
> user updates go >> into the RAM cache and temporary file
> (as well as the >> transaction log) until the backup
> finishes. I.e., the *.db >> file remains unchanged until
> its backup copy is closed. >> The backup copy of the
> transaction log is up-to-date as of >> the end of the
> backup, so that's why it is necessary when >> you do a
> restore (i.e., start the backup database as >> current):
> the automatic recovery process applies the log >> changes
> to the out-of-date backup *.db. >>
> >> If your application or users issue explicit CHECKPOINT
> >> commands (usually a bad idea), they will (should) be
> >> blocked. Historically that has caused problems similar
> to >> "stall" (but I remember it in V9... it may have been
> an >> old persistent bug).
> >>
> >> What exact version and build of SQL Anywhere 7 are you
> >> using? e.g. 7.0.3.2046. SELECT @@version will tell you.
> >>
> >> Can you move up? say, to 10.0.1 or 11.0.0?
> >>
> >> Breck
> >>
> >>
> >>
> >> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
> >>
> >> >Hello everyone,
> >> >
> >> >I am not sure if this is the correct group, but I am
> >> trying >to develop a solution to do a live backup of
> >> Sybase adaptive >server anywhere 7 .db and .log files.
> >> (backup while database >is running) The software using
> the >> database is called >Eaglesoft (dental software) and
> >> includes a utility called >dbbackup.exe. I have written
> a >> script to use dbbackup.exe >that exports the
> transaction >> log and database file from the >live sybase
> database >> hourly to a seperate directory just >before my
> backup >> program takes a vss snapshot of the disk >but
> the problem >> is that dbbackup often stalls and does not
> >work. I have >> read about the "quiesce database hold". I
> >assume that >> dbbackup.exe uses this kind of command to
> >"freeze" the >> database to take a "snapshot" before
> exporting >the data. >> My backup program allows me to
> specify "pre" and >"post" >> commands to initiate before
> and after the backup vss >> >shapshot is taken of the
> drive. Does anyone know of an >> >alternate solution to
> using "dbbackup.exe" such as a >> >"quiesce database hold"
> command that I could use as a pre >> >snaphot command? >
> >> >Thanks very much,
> >> >
> >> >Johnny
> >>
> >> --
> >> Breck Carter http://sqlanywhere.blogspot.com/
> >>
> >> RisingRoad SQL Anywhere and MobiLink Professional
> Services >> breck.carter@risingroad.com
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


Johnny Posted on 2009-03-04 17:57:37.0Z
Sender: 3e95.49aeb127.1804289383@sybase.com
From: Johnny
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: backup of Adaptive Server Anywhere 7...one more thought
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49aec111.3f90.1681692777@sybase.com>
References: <kvcsq4dn03r6q5h2htjt2r2602cohg9173@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Mar 2009 09:57:37 -0800
X-Trace: forums-1-dub 1236189457 10.22.241.41 (4 Mar 2009 09:57:37 -0800)
X-Original-Trace: 4 Mar 2009 09:57:37 -0800, 10.22.241.41
Lines: 184
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:255
Article PK: 103972

Hi Breck,

I like your idea of just backing up the log. My backup
program does an offline backup once a day in the evening, in
addition to the backups it does every hour during the day.
(I use a scheduled task to turn off the db engine for the
evening backup)Does that mean, that since it is backing up
the log file (dental.log)every hour that I would not even
need to use dbbackup.exe? Because, if I understand
correctly, I could say, take Tuesday nights offline backup
of "dental.db" that my backup program copied, and run the
"dbeng/srv7.exe -a" command referencing the "dental.log"
transaction log file from say, Wednesday's 3PM backup, and
then be able to restore the "dental.db" file to the 3pm
time? As I mentioned, I don't truncate the log so I am not
sure how that would affect things. I think it might only
truncate during a software update of database reindex.

Thanks,

Johnny

> How big is the database? How fast does the log grow? Are
> you truncating/renaming the log?
>
> Have you considered doing a transaction-log-only backup
> every hour, and a full backup less frequently?
>
> A differential online backup uses dbbackup -t to back up
> the transaction log. To recover, you restore the *.db and
> *.log created by the previous full online backup and then
> use dbeng/srv7.exe -a to apply the *.log created by the
> LATEST differential online backup.
>
> An incremental online backup uses dbbackup -r -t (or -x -t
> if you are brave) to backup the the transaction log and
> then start a new transaction log. To recover, you restore
> the *.db and *.log created by the previous full online
> backup and then apply ALL the *.log files created by the
> ALL the subsequent differential online backups.
>
> Needless to say, differential backups have their
> advantages. Incrementals are useful if log growth is fast
> and must be kept in check; e.g., Gbytes an hour, or you
> are backing up across a slow line. But... use differential
> if you can, IMO.
>
> Final point: You should absolutely practice recovery!
>
> To answer your questions about BACKUP vs dbbackup, here's
> my op ed piece on that:
>
http://sqlanywhere.blogspot.com/2008/11/rotating-database-backups.html
>
> Breck
>
> On 3 Mar 2009 12:02:26 -0800, Johnny wrote:
>
> >Hi Breck,
> >
> >Thanks so very much for answering my post. The DB version
> is >7.0.3.2046. I am not sure why Eaglesoft has stuck with
> the >old version for so long but they have. I am just a
> database >novice, but I assume that I would need to stick
> with the >version they support...unless you think there
> would be very >little difference in terms of how the
> program would interact >with the engine? In terms of the
> freezing of dbbackup, the >the server is new....plenty of
> spare RAM and plenty of disk >space. It hangs
> intermittently...maybe 30% of the time >somewhere in the
> export process. The other installation I >support in a
> seperate office has the same issue. Does the >"BACKUP"
> statement do the same thing as dbbackup.exe except >for
> exporting the database files? If so...that would be a
> >great solution. I used to stop the service and backup
> >offline as you mentioned now I have a backup solution
> that >backs up every hour while the database is in use. I
> do this >so I can virtualize the single server in case of
> failure. Do >you know how I would use the "BACKUP"
> statement in a batch >file...one batch file to backup,
> then another batch file to >resume the database? My backup
> program allows me to run a >batch file both before and
> after the vss disk snapshot >(backup)which lasts a few
> seconds. >
> >Thanks again for you help...much appreciated,
> >
> >Johnny
> >
> >
> >> Yes, this is the wrong forum, but I will start
> answering >> here and now (the right newsgroup is
> >> sybase.public.sqlanywhere.general)
> >>
> >> What you are asking for is technically called an
> "online >> backup" meaning a backup while the database is
> online. A >> "live backup" goes above and beyond that by
> continuously >> shipping transaction log records to a
> second computer for >> immediate failover if the first
> machine is, say, utterly >> destroyed along with the city
> it's in :) >>
> >> The dbbackup.exe utility IS the one you want to use. It
> >> does NOT freeze updates, and "quiesce database hold" is
> >> not a feature of SQL Anywhere. The only alternative to
> >> dbbackup.exe for online backups is the BACKUP statement
> , >> and it pretty much does the same thing.
> >>
> >> If you really want a quick and dirty solution, do an
> >> "offline backup": stop the engine, copy the *.db and
> *.log >> files, and start the engine. There is no utility
> to do >> that because, well, you can write your own
> command file to >> run dbstop.exe, copy, and
> dbeng/srv7.exe. >>
> >> Soooo... the question remains, why does it stall for
> you? >> SQL Anywhere 7 is very very very old and there may
> be a >> bug, especially if you are using the 7.0.0 GA
> (original) >> release. Upgrades to 7.0.later-than-that and
> EBFs (express >> builds) are free to download.
> >>
> >> If you are doing LOTS of updates and there's not much
> RAM >> and disk space free, it may be having trouble
> there: the >> backup process suspends checkpoints so all
> user updates go >> into the RAM cache and temporary file
> (as well as the >> transaction log) until the backup
> finishes. I.e., the *.db >> file remains unchanged until
> its backup copy is closed. >> The backup copy of the
> transaction log is up-to-date as of >> the end of the
> backup, so that's why it is necessary when >> you do a
> restore (i.e., start the backup database as >> current):
> the automatic recovery process applies the log >> changes
> to the out-of-date backup *.db. >>
> >> If your application or users issue explicit CHECKPOINT
> >> commands (usually a bad idea), they will (should) be
> >> blocked. Historically that has caused problems similar
> to >> "stall" (but I remember it in V9... it may have been
> an >> old persistent bug).
> >>
> >> What exact version and build of SQL Anywhere 7 are you
> >> using? e.g. 7.0.3.2046. SELECT @@version will tell you.
> >>
> >> Can you move up? say, to 10.0.1 or 11.0.0?
> >>
> >> Breck
> >>
> >>
> >>
> >> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
> >>
> >> >Hello everyone,
> >> >
> >> >I am not sure if this is the correct group, but I am
> >> trying >to develop a solution to do a live backup of
> >> Sybase adaptive >server anywhere 7 .db and .log files.
> >> (backup while database >is running) The software using
> the >> database is called >Eaglesoft (dental software) and
> >> includes a utility called >dbbackup.exe. I have written
> a >> script to use dbbackup.exe >that exports the
> transaction >> log and database file from the >live sybase
> database >> hourly to a seperate directory just >before my
> backup >> program takes a vss snapshot of the disk >but
> the problem >> is that dbbackup often stalls and does not
> >work. I have >> read about the "quiesce database hold". I
> >assume that >> dbbackup.exe uses this kind of command to
> >"freeze" the >> database to take a "snapshot" before
> exporting >the data. >> My backup program allows me to
> specify "pre" and >"post" >> commands to initiate before
> and after the backup vss >> >shapshot is taken of the
> drive. Does anyone know of an >> >alternate solution to
> using "dbbackup.exe" such as a >> >"quiesce database hold"
> command that I could use as a pre >> >snaphot command? >
> >> >Thanks very much,
> >> >
> >> >Johnny
> >>
> >> --
> >> Breck Carter http://sqlanywhere.blogspot.com/
> >>
> >> RisingRoad SQL Anywhere and MobiLink Professional
> Services >> breck.carter@risingroad.com
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


Breck Carter [TeamSybase] Posted on 2009-03-04 21:12:15.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: backup of Adaptive Server Anywhere 7...one more thought
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <8cqtq45f56noho3hsk8ktc6ihqcmqtjdum@4ax.com>
References: <kvcsq4dn03r6q5h2htjt2r2602cohg9173@4ax.com> <49aec111.3f90.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 4 Mar 2009 13:12:15 -0800
X-Trace: forums-1-dub 1236201135 10.22.241.152 (4 Mar 2009 13:12:15 -0800)
X-Original-Trace: 4 Mar 2009 13:12:15 -0800, vip152.sybase.com
Lines: 247
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:257
Article PK: 103974

You *cannot* use dbbackup to do an offline backup because, by
definition, the server is not running when you make an offline copy of
the *.db and *.log, and dbbackup is just another steenking client
application that needs to connect to the database (well, it doesn't
actually steenk, it has a special relationship with the engine, but it
does need a connection).

For the hourly online differential backups, the word "online" implies
you *must* use dbbackup.

So, I don't understand the statement "I would not even need to use
dbbackup.exe"... Danger Will Robinson! It Does Not Compute! <g>

>Because, if I understand
>correctly, I could say, take Tuesday nights offline backup
>of "dental.db" that my backup program copied, and run the
>"dbeng/srv7.exe -a" command referencing the "dental.log"
>transaction log file from say, Wednesday's 3PM backup, and
>then be able to restore the "dental.db" file to the 3pm
>time?

Now THAT computes :)

As far as truncating is concerned, when you shut down the engine
cleanly, the final checkpoint flushes *everything* to the *.db file,s
so the transaction log is no longer needed. Just delete it, or rename
it, or move it somewhere else before restarting your production
server. It will automatically start a brand new teeny log. Cool, huh?

Like so many things with SQL Anywhere, the final answer is often much
simpler, faster and better than you expected :)... that's the number
one reason there are so very few dedicated SQL Anywhere consultants in
the world (me, and some folks in Sybase Professional Services,
and...?)

If you want to share (by email, whatever) your command files I will be
happy to pass comment. You might have to rename the file(s) to
*.rename_to_bat to get past firewalls.

Tip: When applying logs with -a, use the SAME program and SAME
parameters plus the -a, as in production; e.g., dbsrv7.exe if that's
what you run. Rolling forward basically re-runs everything and if 50
connections were in use originally then they will be needed in the
roll forward.

You might enjoy parts of my book, even though it was written for V9
most (all?) of Chapter 9 Protecting applies to V7. Especially section
9.13 Restore.

(but I just looked, and I can't find that Tip in it :)

Breck



On 4 Mar 2009 09:57:37 -0800, Johnny wrote:

>Hi Breck,
>
>I like your idea of just backing up the log. My backup
>program does an offline backup once a day in the evening, in
>addition to the backups it does every hour during the day.
>(I use a scheduled task to turn off the db engine for the
>evening backup)Does that mean, that since it is backing up
>the log file (dental.log)every hour that I would not even
>need to use dbbackup.exe? Because, if I understand
>correctly, I could say, take Tuesday nights offline backup
>of "dental.db" that my backup program copied, and run the
>"dbeng/srv7.exe -a" command referencing the "dental.log"
>transaction log file from say, Wednesday's 3PM backup, and
>then be able to restore the "dental.db" file to the 3pm
>time? As I mentioned, I don't truncate the log so I am not
>sure how that would affect things. I think it might only
>truncate during a software update of database reindex.
>
>Thanks,
>
>Johnny
>
>> How big is the database? How fast does the log grow? Are
>> you truncating/renaming the log?
>>
>> Have you considered doing a transaction-log-only backup
>> every hour, and a full backup less frequently?
>>
>> A differential online backup uses dbbackup -t to back up
>> the transaction log. To recover, you restore the *.db and
>> *.log created by the previous full online backup and then
>> use dbeng/srv7.exe -a to apply the *.log created by the
>> LATEST differential online backup.
>>
>> An incremental online backup uses dbbackup -r -t (or -x -t
>> if you are brave) to backup the the transaction log and
>> then start a new transaction log. To recover, you restore
>> the *.db and *.log created by the previous full online
>> backup and then apply ALL the *.log files created by the
>> ALL the subsequent differential online backups.
>>
>> Needless to say, differential backups have their
>> advantages. Incrementals are useful if log growth is fast
>> and must be kept in check; e.g., Gbytes an hour, or you
>> are backing up across a slow line. But... use differential
>> if you can, IMO.
>>
>> Final point: You should absolutely practice recovery!
>>
>> To answer your questions about BACKUP vs dbbackup, here's
>> my op ed piece on that:
>>
>http://sqlanywhere.blogspot.com/2008/11/rotating-database-backups.html
>>
>> Breck
>>
>> On 3 Mar 2009 12:02:26 -0800, Johnny wrote:
>>
>> >Hi Breck,
>> >
>> >Thanks so very much for answering my post. The DB version
>> is >7.0.3.2046. I am not sure why Eaglesoft has stuck with
>> the >old version for so long but they have. I am just a
>> database >novice, but I assume that I would need to stick
>> with the >version they support...unless you think there
>> would be very >little difference in terms of how the
>> program would interact >with the engine? In terms of the
>> freezing of dbbackup, the >the server is new....plenty of
>> spare RAM and plenty of disk >space. It hangs
>> intermittently...maybe 30% of the time >somewhere in the
>> export process. The other installation I >support in a
>> seperate office has the same issue. Does the >"BACKUP"
>> statement do the same thing as dbbackup.exe except >for
>> exporting the database files? If so...that would be a
>> >great solution. I used to stop the service and backup
>> >offline as you mentioned now I have a backup solution
>> that >backs up every hour while the database is in use. I
>> do this >so I can virtualize the single server in case of
>> failure. Do >you know how I would use the "BACKUP"
>> statement in a batch >file...one batch file to backup,
>> then another batch file to >resume the database? My backup
>> program allows me to run a >batch file both before and
>> after the vss disk snapshot >(backup)which lasts a few
>> seconds. >
>> >Thanks again for you help...much appreciated,
>> >
>> >Johnny
>> >
>> >
>> >> Yes, this is the wrong forum, but I will start
>> answering >> here and now (the right newsgroup is
>> >> sybase.public.sqlanywhere.general)
>> >>
>> >> What you are asking for is technically called an
>> "online >> backup" meaning a backup while the database is
>> online. A >> "live backup" goes above and beyond that by
>> continuously >> shipping transaction log records to a
>> second computer for >> immediate failover if the first
>> machine is, say, utterly >> destroyed along with the city
>> it's in :) >>
>> >> The dbbackup.exe utility IS the one you want to use. It
>> >> does NOT freeze updates, and "quiesce database hold" is
>> >> not a feature of SQL Anywhere. The only alternative to
>> >> dbbackup.exe for online backups is the BACKUP statement
>> , >> and it pretty much does the same thing.
>> >>
>> >> If you really want a quick and dirty solution, do an
>> >> "offline backup": stop the engine, copy the *.db and
>> *.log >> files, and start the engine. There is no utility
>> to do >> that because, well, you can write your own
>> command file to >> run dbstop.exe, copy, and
>> dbeng/srv7.exe. >>
>> >> Soooo... the question remains, why does it stall for
>> you? >> SQL Anywhere 7 is very very very old and there may
>> be a >> bug, especially if you are using the 7.0.0 GA
>> (original) >> release. Upgrades to 7.0.later-than-that and
>> EBFs (express >> builds) are free to download.
>> >>
>> >> If you are doing LOTS of updates and there's not much
>> RAM >> and disk space free, it may be having trouble
>> there: the >> backup process suspends checkpoints so all
>> user updates go >> into the RAM cache and temporary file
>> (as well as the >> transaction log) until the backup
>> finishes. I.e., the *.db >> file remains unchanged until
>> its backup copy is closed. >> The backup copy of the
>> transaction log is up-to-date as of >> the end of the
>> backup, so that's why it is necessary when >> you do a
>> restore (i.e., start the backup database as >> current):
>> the automatic recovery process applies the log >> changes
>> to the out-of-date backup *.db. >>
>> >> If your application or users issue explicit CHECKPOINT
>> >> commands (usually a bad idea), they will (should) be
>> >> blocked. Historically that has caused problems similar
>> to >> "stall" (but I remember it in V9... it may have been
>> an >> old persistent bug).
>> >>
>> >> What exact version and build of SQL Anywhere 7 are you
>> >> using? e.g. 7.0.3.2046. SELECT @@version will tell you.
>> >>
>> >> Can you move up? say, to 10.0.1 or 11.0.0?
>> >>
>> >> Breck
>> >>
>> >>
>> >>
>> >> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
>> >>
>> >> >Hello everyone,
>> >> >
>> >> >I am not sure if this is the correct group, but I am
>> >> trying >to develop a solution to do a live backup of
>> >> Sybase adaptive >server anywhere 7 .db and .log files.
>> >> (backup while database >is running) The software using
>> the >> database is called >Eaglesoft (dental software) and
>> >> includes a utility called >dbbackup.exe. I have written
>> a >> script to use dbbackup.exe >that exports the
>> transaction >> log and database file from the >live sybase
>> database >> hourly to a seperate directory just >before my
>> backup >> program takes a vss snapshot of the disk >but
>> the problem >> is that dbbackup often stalls and does not
>> >work. I have >> read about the "quiesce database hold". I
>> >assume that >> dbbackup.exe uses this kind of command to
>> >"freeze" the >> database to take a "snapshot" before
>> exporting >the data. >> My backup program allows me to
>> specify "pre" and >"post" >> commands to initiate before
>> and after the backup vss >> >shapshot is taken of the
>> drive. Does anyone know of an >> >alternate solution to
>> using "dbbackup.exe" such as a >> >"quiesce database hold"
>> command that I could use as a pre >> >snaphot command? >
>> >> >Thanks very much,
>> >> >
>> >> >Johnny
>> >>
>> >> --
>> >> Breck Carter http://sqlanywhere.blogspot.com/
>> >>
>> >> RisingRoad SQL Anywhere and MobiLink Professional
>> Services >> breck.carter@risingroad.com
>>
>> --
>> Breck Carter http://sqlanywhere.blogspot.com/
>>
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> breck.carter@risingroad.com

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Johnny Posted on 2009-03-05 04:55:49.0Z
Sender: 4d3c.49af4df2.1804289383@sybase.com
From: Johnny
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: backup of Adaptive Server Anywhere 7...one more thought
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49af5b55.4ea5.1681692777@sybase.com>
References: <8cqtq45f56noho3hsk8ktc6ihqcmqtjdum@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Mar 2009 20:55:49 -0800
X-Trace: forums-1-dub 1236228949 10.22.241.41 (4 Mar 2009 20:55:49 -0800)
X-Original-Trace: 4 Mar 2009 20:55:49 -0800, 10.22.241.41
Lines: 300
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:265
Article PK: 103982

Hi Breck...wow...this is really starting to make sense now!
Thanks! When you say shut down the db engine "cleanly",
would stopping the "Adaptive Server Anywhere" windows
service qualify for "cleanly"?

What I mean by not having to use dbbackup is that since I am
doing an offline backup every evening with my backup
program, I will not need to use dbbackup during my daily
backups the next day because since I will only need to
capture the log file in order to restore that day. (my
backup program should have no trouble capturing the log file
on an hourly basis since it uses vss)Am I correct in this
assumption?

So for example to restore a 3pm Wednesday sybase database, I
would:

1. Extract the dental.db file from Tuesday nights offline
backup that my backup program captured from the sybase
source directory.
2. Extract the dental.log file from Wendesday's 3pm backup
that my backup program captured from the sybase source
directory.
3. Run dbsrv7.exe -a to merge the transaction log with the
dental.db file.

Am I correct?

This is all based on, for me, that sybase (this version
anyway) is not VSS compatible like MS SQL is...which means
that you can't back it up with Microsoft's Volume Shadow
Copy service. Volume shadow copy cannot capture the .db file
but I am assuming that it would have no troble capturing the
log file since it's much less complex.

Am I correct on that?

Thanks again Breck. Nice to have you experts out there for
database novices like me.

-Johnny

> You *cannot* use dbbackup to do an offline backup because,
> by definition, the server is not running when you make an
> offline copy of the *.db and *.log, and dbbackup is just
> another steenking client application that needs to connect
> to the database (well, it doesn't actually steenk, it has
> a special relationship with the engine, but it does need a
> connection).
>
> For the hourly online differential backups, the word
> "online" implies you *must* use dbbackup.
>
> So, I don't understand the statement "I would not even
> need to use dbbackup.exe"... Danger Will Robinson! It Does
> Not Compute! <g>
>
> >Because, if I understand
> >correctly, I could say, take Tuesday nights offline
> backup >of "dental.db" that my backup program copied, and
> run the >"dbeng/srv7.exe -a" command referencing the
> "dental.log" >transaction log file from say, Wednesday's
> 3PM backup, and >then be able to restore the "dental.db"
> file to the 3pm >time?
>
> Now THAT computes :)
>
> As far as truncating is concerned, when you shut down the
> engine cleanly, the final checkpoint flushes *everything*
> to the *.db file,s so the transaction log is no longer
> needed. Just delete it, or rename it, or move it somewhere
> else before restarting your production server. It will
> automatically start a brand new teeny log. Cool, huh?
>
> Like so many things with SQL Anywhere, the final answer is
> often much simpler, faster and better than you expected
> :)... that's the number one reason there are so very few
> dedicated SQL Anywhere consultants in the world (me, and
> some folks in Sybase Professional Services, and...?)
>
> If you want to share (by email, whatever) your command
> files I will be happy to pass comment. You might have to
> rename the file(s) to *.rename_to_bat to get past
> firewalls.
>
> Tip: When applying logs with -a, use the SAME program and
> SAME parameters plus the -a, as in production; e.g.,
> dbsrv7.exe if that's what you run. Rolling forward
> basically re-runs everything and if 50 connections were in
> use originally then they will be needed in the roll
> forward.
>
> You might enjoy parts of my book, even though it was
> written for V9 most (all?) of Chapter 9 Protecting applies
> to V7. Especially section 9.13 Restore.
>
> (but I just looked, and I can't find that Tip in it :)
>
> Breck
>
>
>
> On 4 Mar 2009 09:57:37 -0800, Johnny wrote:
>
> >Hi Breck,
> >
> >I like your idea of just backing up the log. My backup
> >program does an offline backup once a day in the evening,
> in >addition to the backups it does every hour during the
> day. >(I use a scheduled task to turn off the db engine
> for the >evening backup)Does that mean, that since it is
> backing up >the log file (dental.log)every hour that I
> would not even >need to use dbbackup.exe? Because, if I
> understand >correctly, I could say, take Tuesday nights
> offline backup >of "dental.db" that my backup program
> copied, and run the >"dbeng/srv7.exe -a" command
> referencing the "dental.log" >transaction log file from
> say, Wednesday's 3PM backup, and >then be able to restore
> the "dental.db" file to the 3pm >time? As I mentioned, I
> don't truncate the log so I am not >sure how that would
> affect things. I think it might only >truncate during a
> software update of database reindex. >
> >Thanks,
> >
> >Johnny
> >
> >> How big is the database? How fast does the log grow?
> Are >> you truncating/renaming the log?
> >>
> >> Have you considered doing a transaction-log-only backup
> >> every hour, and a full backup less frequently?
> >>
> >> A differential online backup uses dbbackup -t to back
> up >> the transaction log. To recover, you restore the
> *.db and >> *.log created by the previous full online
> backup and then >> use dbeng/srv7.exe -a to apply the
> *.log created by the >> LATEST differential online backup.
> >>
> >> An incremental online backup uses dbbackup -r -t (or -x
> -t >> if you are brave) to backup the the transaction log
> and >> then start a new transaction log. To recover, you
> restore >> the *.db and *.log created by the previous full
> online >> backup and then apply ALL the *.log files
> created by the >> ALL the subsequent differential online
> backups. >>
> >> Needless to say, differential backups have their
> >> advantages. Incrementals are useful if log growth is
> fast >> and must be kept in check; e.g., Gbytes an hour,
> or you >> are backing up across a slow line. But... use
> differential >> if you can, IMO.
> >>
> >> Final point: You should absolutely practice recovery!
> >>
> >> To answer your questions about BACKUP vs dbbackup,
> here's >> my op ed piece on that:
> >>
> >http://sqlanywhere.blogspot.com/2008/11/rotating-database
> -backups.html >>
> >> Breck
> >>
> >> On 3 Mar 2009 12:02:26 -0800, Johnny wrote:
> >>
> >> >Hi Breck,
> >> >
> >> >Thanks so very much for answering my post. The DB
> version >> is >7.0.3.2046. I am not sure why Eaglesoft has
> stuck with >> the >old version for so long but they have.
> I am just a >> database >novice, but I assume that I would
> need to stick >> with the >version they support...unless
> you think there >> would be very >little difference in
> terms of how the >> program would interact >with the
> engine? In terms of the >> freezing of dbbackup, the >the
> server is new....plenty of >> spare RAM and plenty of disk
> >space. It hangs >> intermittently...maybe 30% of the time
> >somewhere in the >> export process. The other
> installation I >support in a >> seperate office has the
> same issue. Does the >"BACKUP" >> statement do the same
> thing as dbbackup.exe except >for >> exporting the
> database files? If so...that would be a >> >great
> solution. I used to stop the service and backup >>
> >offline as you mentioned now I have a backup solution >>
> that >backs up every hour while the database is in use. I
> >> do this >so I can virtualize the single server in case
> of >> failure. Do >you know how I would use the "BACKUP"
> >> statement in a batch >file...one batch file to backup,
> >> then another batch file to >resume the database? My
> backup >> program allows me to run a >batch file both
> before and >> after the vss disk snapshot >(backup)which
> lasts a few >> seconds. >
> >> >Thanks again for you help...much appreciated,
> >> >
> >> >Johnny
> >> >
> >> >
> >> >> Yes, this is the wrong forum, but I will start
> >> answering >> here and now (the right newsgroup is
> >> >> sybase.public.sqlanywhere.general)
> >> >>
> >> >> What you are asking for is technically called an
> >> "online >> backup" meaning a backup while the database
> is >> online. A >> "live backup" goes above and beyond
> that by >> continuously >> shipping transaction log
> records to a >> second computer for >> immediate failover
> if the first >> machine is, say, utterly >> destroyed
> along with the city >> it's in :) >>
> >> >> The dbbackup.exe utility IS the one you want to use.
> It >> >> does NOT freeze updates, and "quiesce database
> hold" is >> >> not a feature of SQL Anywhere. The only
> alternative to >> >> dbbackup.exe for online backups is
> the BACKUP statement >> , >> and it pretty much does the
> same thing. >> >>
> >> >> If you really want a quick and dirty solution, do an
> >> >> "offline backup": stop the engine, copy the *.db and
> >> *.log >> files, and start the engine. There is no
> utility >> to do >> that because, well, you can write your
> own >> command file to >> run dbstop.exe, copy, and
> >> dbeng/srv7.exe. >>
> >> >> Soooo... the question remains, why does it stall for
> >> you? >> SQL Anywhere 7 is very very very old and there
> may >> be a >> bug, especially if you are using the 7.0.0
> GA >> (original) >> release. Upgrades to
> 7.0.later-than-that and >> EBFs (express >> builds) are
> free to download. >> >>
> >> >> If you are doing LOTS of updates and there's not
> much >> RAM >> and disk space free, it may be having
> trouble >> there: the >> backup process suspends
> checkpoints so all >> user updates go >> into the RAM
> cache and temporary file >> (as well as the >> transaction
> log) until the backup >> finishes. I.e., the *.db >> file
> remains unchanged until >> its backup copy is closed. >>
> The backup copy of the >> transaction log is up-to-date as
> of >> the end of the >> backup, so that's why it is
> necessary when >> you do a >> restore (i.e., start the
> backup database as >> current): >> the automatic recovery
> process applies the log >> changes >> to the out-of-date
> backup *.db. >> >> >> If your application or users issue
> explicit CHECKPOINT >> >> commands (usually a bad idea),
> they will (should) be >> >> blocked. Historically that has
> caused problems similar >> to >> "stall" (but I remember
> it in V9... it may have been >> an >> old persistent bug).
> >> >>
> >> >> What exact version and build of SQL Anywhere 7 are
> you >> >> using? e.g. 7.0.3.2046. SELECT @@version will
> tell you. >> >>
> >> >> Can you move up? say, to 10.0.1 or 11.0.0?
> >> >>
> >> >> Breck
> >> >>
> >> >>
> >> >>
> >> >> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
> >> >>
> >> >> >Hello everyone,
> >> >> >
> >> >> >I am not sure if this is the correct group, but I
> am >> >> trying >to develop a solution to do a live backup
> of >> >> Sybase adaptive >server anywhere 7 .db and .log
> files. >> >> (backup while database >is running) The
> software using >> the >> database is called >Eaglesoft
> (dental software) and >> >> includes a utility called
> >dbbackup.exe. I have written >> a >> script to use
> dbbackup.exe >that exports the >> transaction >> log and
> database file from the >live sybase >> database >> hourly
> to a seperate directory just >before my >> backup >>
> program takes a vss snapshot of the disk >but >> the
> problem >> is that dbbackup often stalls and does not >>
> >work. I have >> read about the "quiesce database hold". I
> >> >assume that >> dbbackup.exe uses this kind of command
> to >> >"freeze" the >> database to take a "snapshot"
> before >> exporting >the data. >> My backup program allows
> me to >> specify "pre" and >"post" >> commands to initiate
> before >> and after the backup vss >> >shapshot is taken
> of the >> drive. Does anyone know of an >> >alternate
> solution to >> using "dbbackup.exe" such as a >> >"quiesce
> database hold" >> command that I could use as a pre >>
> >snaphot command? > >> >> >Thanks very much,
> >> >> >
> >> >> >Johnny
> >> >>
> >> >> --
> >> >> Breck Carter http://sqlanywhere.blogspot.com/
> >> >>
> >> >> RisingRoad SQL Anywhere and MobiLink Professional
> >> Services >> breck.carter@risingroad.com
> >>
> >> --
> >> Breck Carter http://sqlanywhere.blogspot.com/
> >>
> >> RisingRoad SQL Anywhere and MobiLink Professional
> Services >> breck.carter@risingroad.com
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


Breck Carter [TeamSybase] Posted on 2009-03-05 11:01:24.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: backup of Adaptive Server Anywhere 7...one more thought
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <o3cvq4p7dfefgm56o9avijm9766ellsqk6@4ax.com>
References: <8cqtq45f56noho3hsk8ktc6ihqcmqtjdum@4ax.com> <49af5b55.4ea5.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 5 Mar 2009 03:01:24 -0800
X-Trace: forums-1-dub 1236250884 10.22.241.152 (5 Mar 2009 03:01:24 -0800)
X-Original-Trace: 5 Mar 2009 03:01:24 -0800, vip152.sybase.com
Lines: 317
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:266
Article PK: 103983

Please post a new message (not a reply) on the
sybase.public.sqlanywhere.general newsgroup to ask your VSS-related
question. Be sure to start it with a single simple sentence such as
"How do I [do some thing]? or "Will [this thing] work?"... you have to
get people's attention, and longgggg preambles don't do that... put
the simple question first, follow it with all the detail you want.

Breck

On 4 Mar 2009 20:55:49 -0800, Johnny wrote:

>Hi Breck...wow...this is really starting to make sense now!
>Thanks! When you say shut down the db engine "cleanly",
>would stopping the "Adaptive Server Anywhere" windows
>service qualify for "cleanly"?
>
>What I mean by not having to use dbbackup is that since I am
>doing an offline backup every evening with my backup
>program, I will not need to use dbbackup during my daily
>backups the next day because since I will only need to
>capture the log file in order to restore that day. (my
>backup program should have no trouble capturing the log file
>on an hourly basis since it uses vss)Am I correct in this
>assumption?
>
>So for example to restore a 3pm Wednesday sybase database, I
>would:
>
>1. Extract the dental.db file from Tuesday nights offline
>backup that my backup program captured from the sybase
>source directory.
>2. Extract the dental.log file from Wendesday's 3pm backup
>that my backup program captured from the sybase source
>directory.
>3. Run dbsrv7.exe -a to merge the transaction log with the
>dental.db file.
>
>Am I correct?
>
>This is all based on, for me, that sybase (this version
>anyway) is not VSS compatible like MS SQL is...which means
>that you can't back it up with Microsoft's Volume Shadow
>Copy service. Volume shadow copy cannot capture the .db file
>but I am assuming that it would have no troble capturing the
>log file since it's much less complex.
>
>Am I correct on that?
>
>Thanks again Breck. Nice to have you experts out there for
>database novices like me.
>
>-Johnny
>
>
>
>
>
>> You *cannot* use dbbackup to do an offline backup because,
>> by definition, the server is not running when you make an
>> offline copy of the *.db and *.log, and dbbackup is just
>> another steenking client application that needs to connect
>> to the database (well, it doesn't actually steenk, it has
>> a special relationship with the engine, but it does need a
>> connection).
>>
>> For the hourly online differential backups, the word
>> "online" implies you *must* use dbbackup.
>>
>> So, I don't understand the statement "I would not even
>> need to use dbbackup.exe"... Danger Will Robinson! It Does
>> Not Compute! <g>
>>
>> >Because, if I understand
>> >correctly, I could say, take Tuesday nights offline
>> backup >of "dental.db" that my backup program copied, and
>> run the >"dbeng/srv7.exe -a" command referencing the
>> "dental.log" >transaction log file from say, Wednesday's
>> 3PM backup, and >then be able to restore the "dental.db"
>> file to the 3pm >time?
>>
>> Now THAT computes :)
>>
>> As far as truncating is concerned, when you shut down the
>> engine cleanly, the final checkpoint flushes *everything*
>> to the *.db file,s so the transaction log is no longer
>> needed. Just delete it, or rename it, or move it somewhere
>> else before restarting your production server. It will
>> automatically start a brand new teeny log. Cool, huh?
>>
>> Like so many things with SQL Anywhere, the final answer is
>> often much simpler, faster and better than you expected
>> :)... that's the number one reason there are so very few
>> dedicated SQL Anywhere consultants in the world (me, and
>> some folks in Sybase Professional Services, and...?)
>>
>> If you want to share (by email, whatever) your command
>> files I will be happy to pass comment. You might have to
>> rename the file(s) to *.rename_to_bat to get past
>> firewalls.
>>
>> Tip: When applying logs with -a, use the SAME program and
>> SAME parameters plus the -a, as in production; e.g.,
>> dbsrv7.exe if that's what you run. Rolling forward
>> basically re-runs everything and if 50 connections were in
>> use originally then they will be needed in the roll
>> forward.
>>
>> You might enjoy parts of my book, even though it was
>> written for V9 most (all?) of Chapter 9 Protecting applies
>> to V7. Especially section 9.13 Restore.
>>
>> (but I just looked, and I can't find that Tip in it :)
>>
>> Breck
>>
>>
>>
>> On 4 Mar 2009 09:57:37 -0800, Johnny wrote:
>>
>> >Hi Breck,
>> >
>> >I like your idea of just backing up the log. My backup
>> >program does an offline backup once a day in the evening,
>> in >addition to the backups it does every hour during the
>> day. >(I use a scheduled task to turn off the db engine
>> for the >evening backup)Does that mean, that since it is
>> backing up >the log file (dental.log)every hour that I
>> would not even >need to use dbbackup.exe? Because, if I
>> understand >correctly, I could say, take Tuesday nights
>> offline backup >of "dental.db" that my backup program
>> copied, and run the >"dbeng/srv7.exe -a" command
>> referencing the "dental.log" >transaction log file from
>> say, Wednesday's 3PM backup, and >then be able to restore
>> the "dental.db" file to the 3pm >time? As I mentioned, I
>> don't truncate the log so I am not >sure how that would
>> affect things. I think it might only >truncate during a
>> software update of database reindex. >
>> >Thanks,
>> >
>> >Johnny
>> >
>> >> How big is the database? How fast does the log grow?
>> Are >> you truncating/renaming the log?
>> >>
>> >> Have you considered doing a transaction-log-only backup
>> >> every hour, and a full backup less frequently?
>> >>
>> >> A differential online backup uses dbbackup -t to back
>> up >> the transaction log. To recover, you restore the
>> *.db and >> *.log created by the previous full online
>> backup and then >> use dbeng/srv7.exe -a to apply the
>> *.log created by the >> LATEST differential online backup.
>> >>
>> >> An incremental online backup uses dbbackup -r -t (or -x
>> -t >> if you are brave) to backup the the transaction log
>> and >> then start a new transaction log. To recover, you
>> restore >> the *.db and *.log created by the previous full
>> online >> backup and then apply ALL the *.log files
>> created by the >> ALL the subsequent differential online
>> backups. >>
>> >> Needless to say, differential backups have their
>> >> advantages. Incrementals are useful if log growth is
>> fast >> and must be kept in check; e.g., Gbytes an hour,
>> or you >> are backing up across a slow line. But... use
>> differential >> if you can, IMO.
>> >>
>> >> Final point: You should absolutely practice recovery!
>> >>
>> >> To answer your questions about BACKUP vs dbbackup,
>> here's >> my op ed piece on that:
>> >>
>> >http://sqlanywhere.blogspot.com/2008/11/rotating-database
>> -backups.html >>
>> >> Breck
>> >>
>> >> On 3 Mar 2009 12:02:26 -0800, Johnny wrote:
>> >>
>> >> >Hi Breck,
>> >> >
>> >> >Thanks so very much for answering my post. The DB
>> version >> is >7.0.3.2046. I am not sure why Eaglesoft has
>> stuck with >> the >old version for so long but they have.
>> I am just a >> database >novice, but I assume that I would
>> need to stick >> with the >version they support...unless
>> you think there >> would be very >little difference in
>> terms of how the >> program would interact >with the
>> engine? In terms of the >> freezing of dbbackup, the >the
>> server is new....plenty of >> spare RAM and plenty of disk
>> >space. It hangs >> intermittently...maybe 30% of the time
>> >somewhere in the >> export process. The other
>> installation I >support in a >> seperate office has the
>> same issue. Does the >"BACKUP" >> statement do the same
>> thing as dbbackup.exe except >for >> exporting the
>> database files? If so...that would be a >> >great
>> solution. I used to stop the service and backup >>
>> >offline as you mentioned now I have a backup solution >>
>> that >backs up every hour while the database is in use. I
>> >> do this >so I can virtualize the single server in case
>> of >> failure. Do >you know how I would use the "BACKUP"
>> >> statement in a batch >file...one batch file to backup,
>> >> then another batch file to >resume the database? My
>> backup >> program allows me to run a >batch file both
>> before and >> after the vss disk snapshot >(backup)which
>> lasts a few >> seconds. >
>> >> >Thanks again for you help...much appreciated,
>> >> >
>> >> >Johnny
>> >> >
>> >> >
>> >> >> Yes, this is the wrong forum, but I will start
>> >> answering >> here and now (the right newsgroup is
>> >> >> sybase.public.sqlanywhere.general)
>> >> >>
>> >> >> What you are asking for is technically called an
>> >> "online >> backup" meaning a backup while the database
>> is >> online. A >> "live backup" goes above and beyond
>> that by >> continuously >> shipping transaction log
>> records to a >> second computer for >> immediate failover
>> if the first >> machine is, say, utterly >> destroyed
>> along with the city >> it's in :) >>
>> >> >> The dbbackup.exe utility IS the one you want to use.
>> It >> >> does NOT freeze updates, and "quiesce database
>> hold" is >> >> not a feature of SQL Anywhere. The only
>> alternative to >> >> dbbackup.exe for online backups is
>> the BACKUP statement >> , >> and it pretty much does the
>> same thing. >> >>
>> >> >> If you really want a quick and dirty solution, do an
>> >> >> "offline backup": stop the engine, copy the *.db and
>> >> *.log >> files, and start the engine. There is no
>> utility >> to do >> that because, well, you can write your
>> own >> command file to >> run dbstop.exe, copy, and
>> >> dbeng/srv7.exe. >>
>> >> >> Soooo... the question remains, why does it stall for
>> >> you? >> SQL Anywhere 7 is very very very old and there
>> may >> be a >> bug, especially if you are using the 7.0.0
>> GA >> (original) >> release. Upgrades to
>> 7.0.later-than-that and >> EBFs (express >> builds) are
>> free to download. >> >>
>> >> >> If you are doing LOTS of updates and there's not
>> much >> RAM >> and disk space free, it may be having
>> trouble >> there: the >> backup process suspends
>> checkpoints so all >> user updates go >> into the RAM
>> cache and temporary file >> (as well as the >> transaction
>> log) until the backup >> finishes. I.e., the *.db >> file
>> remains unchanged until >> its backup copy is closed. >>
>> The backup copy of the >> transaction log is up-to-date as
>> of >> the end of the >> backup, so that's why it is
>> necessary when >> you do a >> restore (i.e., start the
>> backup database as >> current): >> the automatic recovery
>> process applies the log >> changes >> to the out-of-date
>> backup *.db. >> >> >> If your application or users issue
>> explicit CHECKPOINT >> >> commands (usually a bad idea),
>> they will (should) be >> >> blocked. Historically that has
>> caused problems similar >> to >> "stall" (but I remember
>> it in V9... it may have been >> an >> old persistent bug).
>> >> >>
>> >> >> What exact version and build of SQL Anywhere 7 are
>> you >> >> using? e.g. 7.0.3.2046. SELECT @@version will
>> tell you. >> >>
>> >> >> Can you move up? say, to 10.0.1 or 11.0.0?
>> >> >>
>> >> >> Breck
>> >> >>
>> >> >>
>> >> >>
>> >> >> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
>> >> >>
>> >> >> >Hello everyone,
>> >> >> >
>> >> >> >I am not sure if this is the correct group, but I
>> am >> >> trying >to develop a solution to do a live backup
>> of >> >> Sybase adaptive >server anywhere 7 .db and .log
>> files. >> >> (backup while database >is running) The
>> software using >> the >> database is called >Eaglesoft
>> (dental software) and >> >> includes a utility called
>> >dbbackup.exe. I have written >> a >> script to use
>> dbbackup.exe >that exports the >> transaction >> log and
>> database file from the >live sybase >> database >> hourly
>> to a seperate directory just >before my >> backup >>
>> program takes a vss snapshot of the disk >but >> the
>> problem >> is that dbbackup often stalls and does not >>
>> >work. I have >> read about the "quiesce database hold". I
>> >> >assume that >> dbbackup.exe uses this kind of command
>> to >> >"freeze" the >> database to take a "snapshot"
>> before >> exporting >the data. >> My backup program allows
>> me to >> specify "pre" and >"post" >> commands to initiate
>> before >> and after the backup vss >> >shapshot is taken
>> of the >> drive. Does anyone know of an >> >alternate
>> solution to >> using "dbbackup.exe" such as a >> >"quiesce
>> database hold" >> command that I could use as a pre >>
>> >snaphot command? > >> >> >Thanks very much,
>> >> >> >
>> >> >> >Johnny
>> >> >>
>> >> >> --
>> >> >> Breck Carter http://sqlanywhere.blogspot.com/
>> >> >>
>> >> >> RisingRoad SQL Anywhere and MobiLink Professional
>> >> Services >> breck.carter@risingroad.com
>> >>
>> >> --
>> >> Breck Carter http://sqlanywhere.blogspot.com/
>> >>
>> >> RisingRoad SQL Anywhere and MobiLink Professional
>> Services >> breck.carter@risingroad.com
>>
>> --
>> Breck Carter http://sqlanywhere.blogspot.com/
>>
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> breck.carter@risingroad.com

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Johnny Posted on 2009-03-05 18:39:49.0Z
Sender: 4eaf.49af5b79.1804289383@sybase.com
From: Johnny
Newsgroups: sybase.public.commercial-isv.general
Subject: Re: backup of Adaptive Server Anywhere 7...one more thought
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49b01c75.610a.1681692777@sybase.com>
References: <o3cvq4p7dfefgm56o9avijm9766ellsqk6@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Mar 2009 10:39:49 -0800
X-Trace: forums-1-dub 1236278389 10.22.241.41 (5 Mar 2009 10:39:49 -0800)
X-Original-Trace: 5 Mar 2009 10:39:49 -0800, 10.22.241.41
Lines: 324
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.commercial-isv.general:270
Article PK: 103987

OK...Thanks.

> Please post a new message (not a reply) on the
> sybase.public.sqlanywhere.general newsgroup to ask your
> VSS-related question. Be sure to start it with a single
> simple sentence such as "How do I [do some thing]? or
> "Will [this thing] work?"... you have to get people's
> attention, and longgggg preambles don't do that... put the
> simple question first, follow it with all the detail you
> want.
>
> Breck
>
> On 4 Mar 2009 20:55:49 -0800, Johnny wrote:
>
> >Hi Breck...wow...this is really starting to make sense
> now! >Thanks! When you say shut down the db engine
> "cleanly", >would stopping the "Adaptive Server Anywhere"
> windows >service qualify for "cleanly"?
> >
> >What I mean by not having to use dbbackup is that since I
> am >doing an offline backup every evening with my backup
> >program, I will not need to use dbbackup during my daily
> >backups the next day because since I will only need to
> >capture the log file in order to restore that day. (my
> >backup program should have no trouble capturing the log
> file >on an hourly basis since it uses vss)Am I correct in
> this >assumption?
> >
> >So for example to restore a 3pm Wednesday sybase database
> , I >would:
> >
> >1. Extract the dental.db file from Tuesday nights offline
> >backup that my backup program captured from the sybase
> >source directory.
> >2. Extract the dental.log file from Wendesday's 3pm
> backup >that my backup program captured from the sybase
> source >directory.
> >3. Run dbsrv7.exe -a to merge the transaction log with
> the >dental.db file.
> >
> >Am I correct?
> >
> >This is all based on, for me, that sybase (this version
> >anyway) is not VSS compatible like MS SQL is...which
> means >that you can't back it up with Microsoft's Volume
> Shadow >Copy service. Volume shadow copy cannot capture
> the .db file >but I am assuming that it would have no
> troble capturing the >log file since it's much less
> complex. >
> >Am I correct on that?
> >
> >Thanks again Breck. Nice to have you experts out there
> for >database novices like me.
> >
> >-Johnny
> >
> >
> >
> >
> >
> >> You *cannot* use dbbackup to do an offline backup
> because, >> by definition, the server is not running when
> you make an >> offline copy of the *.db and *.log, and
> dbbackup is just >> another steenking client application
> that needs to connect >> to the database (well, it doesn't
> actually steenk, it has >> a special relationship with the
> engine, but it does need a >> connection).
> >>
> >> For the hourly online differential backups, the word
> >> "online" implies you *must* use dbbackup.
> >>
> >> So, I don't understand the statement "I would not even
> >> need to use dbbackup.exe"... Danger Will Robinson! It
> Does >> Not Compute! <g>
> >>
> >> >Because, if I understand
> >> >correctly, I could say, take Tuesday nights offline
> >> backup >of "dental.db" that my backup program copied,
> and >> run the >"dbeng/srv7.exe -a" command referencing
> the >> "dental.log" >transaction log file from say,
> Wednesday's >> 3PM backup, and >then be able to restore
> the "dental.db" >> file to the 3pm >time?
> >>
> >> Now THAT computes :)
> >>
> >> As far as truncating is concerned, when you shut down
> the >> engine cleanly, the final checkpoint flushes
> *everything* >> to the *.db file,s so the transaction log
> is no longer >> needed. Just delete it, or rename it, or
> move it somewhere >> else before restarting your
> production server. It will >> automatically start a brand
> new teeny log. Cool, huh? >>
> >> Like so many things with SQL Anywhere, the final answer
> is >> often much simpler, faster and better than you
> expected >> :)... that's the number one reason there are
> so very few >> dedicated SQL Anywhere consultants in the
> world (me, and >> some folks in Sybase Professional
> Services, and...?) >>
> >> If you want to share (by email, whatever) your command
> >> files I will be happy to pass comment. You might have
> to >> rename the file(s) to *.rename_to_bat to get past
> >> firewalls.
> >>
> >> Tip: When applying logs with -a, use the SAME program
> and >> SAME parameters plus the -a, as in production; e.g.
> , >> dbsrv7.exe if that's what you run. Rolling forward
> >> basically re-runs everything and if 50 connections were
> in >> use originally then they will be needed in the roll
> >> forward.
> >>
> >> You might enjoy parts of my book, even though it was
> >> written for V9 most (all?) of Chapter 9 Protecting
> applies >> to V7. Especially section 9.13 Restore.
> >>
> >> (but I just looked, and I can't find that Tip in it :)
> >>
> >> Breck
> >>
> >>
> >>
> >> On 4 Mar 2009 09:57:37 -0800, Johnny wrote:
> >>
> >> >Hi Breck,
> >> >
> >> >I like your idea of just backing up the log. My backup
> >> >program does an offline backup once a day in the
> evening, >> in >addition to the backups it does every hour
> during the >> day. >(I use a scheduled task to turn off
> the db engine >> for the >evening backup)Does that mean,
> that since it is >> backing up >the log file
> (dental.log)every hour that I >> would not even >need to
> use dbbackup.exe? Because, if I >> understand >correctly,
> I could say, take Tuesday nights >> offline backup >of
> "dental.db" that my backup program >> copied, and run the
> >"dbeng/srv7.exe -a" command >> referencing the
> "dental.log" >transaction log file from >> say,
> Wednesday's 3PM backup, and >then be able to restore >>
> the "dental.db" file to the 3pm >time? As I mentioned, I
> >> don't truncate the log so I am not >sure how that would
> >> affect things. I think it might only >truncate during a
> >> software update of database reindex. > >> >Thanks,
> >> >
> >> >Johnny
> >> >
> >> >> How big is the database? How fast does the log grow?
> >> Are >> you truncating/renaming the log?
> >> >>
> >> >> Have you considered doing a transaction-log-only
> backup >> >> every hour, and a full backup less
> frequently? >> >>
> >> >> A differential online backup uses dbbackup -t to
> back >> up >> the transaction log. To recover, you restore
> the >> *.db and >> *.log created by the previous full
> online >> backup and then >> use dbeng/srv7.exe -a to
> apply the >> *.log created by the >> LATEST differential
> online backup. >> >>
> >> >> An incremental online backup uses dbbackup -r -t (or
> -x >> -t >> if you are brave) to backup the the
> transaction log >> and >> then start a new transaction
> log. To recover, you >> restore >> the *.db and *.log
> created by the previous full >> online >> backup and then
> apply ALL the *.log files >> created by the >> ALL the
> subsequent differential online >> backups. >>
> >> >> Needless to say, differential backups have their
> >> >> advantages. Incrementals are useful if log growth is
> >> fast >> and must be kept in check; e.g., Gbytes an hour
> , >> or you >> are backing up across a slow line. But...
> use >> differential >> if you can, IMO.
> >> >>
> >> >> Final point: You should absolutely practice
> recovery! >> >>
> >> >> To answer your questions about BACKUP vs dbbackup,
> >> here's >> my op ed piece on that:
> >> >>
> >>
> >http://sqlanywhere.blogspot.com/2008/11/rotating-database
> >> -backups.html >> >> >> Breck
> >> >>
> >> >> On 3 Mar 2009 12:02:26 -0800, Johnny wrote:
> >> >>
> >> >> >Hi Breck,
> >> >> >
> >> >> >Thanks so very much for answering my post. The DB
> >> version >> is >7.0.3.2046. I am not sure why Eaglesoft
> has >> stuck with >> the >old version for so long but they
> have. >> I am just a >> database >novice, but I assume
> that I would >> need to stick >> with the >version they
> support...unless >> you think there >> would be very
> >little difference in >> terms of how the >> program would
> interact >with the >> engine? In terms of the >> freezing
> of dbbackup, the >the >> server is new....plenty of >>
> spare RAM and plenty of disk >> >space. It hangs >>
> intermittently...maybe 30% of the time >> >somewhere in
> the >> export process. The other >> installation I
> >support in a >> seperate office has the >> same issue.
> Does the >"BACKUP" >> statement do the same >> thing as
> dbbackup.exe except >for >> exporting the >> database
> files? If so...that would be a >> >great >> solution. I
> used to stop the service and backup >> >> >offline as you
> mentioned now I have a backup solution >> >> that >backs
> up every hour while the database is in use. I >> >> do
> this >so I can virtualize the single server in case >> of
> >> failure. Do >you know how I would use the "BACKUP" >>
> >> statement in a batch >file...one batch file to backup,
> >> >> then another batch file to >resume the database? My
> >> backup >> program allows me to run a >batch file both
> >> before and >> after the vss disk snapshot
> >(backup)which >> lasts a few >> seconds. >
> >> >> >Thanks again for you help...much appreciated,
> >> >> >
> >> >> >Johnny
> >> >> >
> >> >> >
> >> >> >> Yes, this is the wrong forum, but I will start
> >> >> answering >> here and now (the right newsgroup is
> >> >> >> sybase.public.sqlanywhere.general)
> >> >> >>
> >> >> >> What you are asking for is technically called an
> >> >> "online >> backup" meaning a backup while the
> database >> is >> online. A >> "live backup" goes above
> and beyond >> that by >> continuously >> shipping
> transaction log >> records to a >> second computer for >>
> immediate failover >> if the first >> machine is, say,
> utterly >> destroyed >> along with the city >> it's in :)
> >> >> >> >> The dbbackup.exe utility IS the one you want
> to use. >> It >> >> does NOT freeze updates, and "quiesce
> database >> hold" is >> >> not a feature of SQL Anywhere.
> The only >> alternative to >> >> dbbackup.exe for online
> backups is >> the BACKUP statement >> , >> and it pretty
> much does the >> same thing. >> >>
> >> >> >> If you really want a quick and dirty solution, do
> an >> >> >> "offline backup": stop the engine, copy the
> *.db and >> >> *.log >> files, and start the engine. There
> is no >> utility >> to do >> that because, well, you can
> write your >> own >> command file to >> run dbstop.exe,
> copy, and >> >> dbeng/srv7.exe. >>
> >> >> >> Soooo... the question remains, why does it stall
> for >> >> you? >> SQL Anywhere 7 is very very very old and
> there >> may >> be a >> bug, especially if you are using
> the 7.0.0 >> GA >> (original) >> release. Upgrades to
> >> 7.0.later-than-that and >> EBFs (express >> builds) are
> >> free to download. >> >>
> >> >> >> If you are doing LOTS of updates and there's not
> >> much >> RAM >> and disk space free, it may be having
> >> trouble >> there: the >> backup process suspends
> >> checkpoints so all >> user updates go >> into the RAM
> >> cache and temporary file >> (as well as the >>
> transaction >> log) until the backup >> finishes. I.e.,
> the *.db >> file >> remains unchanged until >> its backup
> copy is closed. >> >> The backup copy of the >>
> transaction log is up-to-date as >> of >> the end of the
> >> backup, so that's why it is >> necessary when >> you do
> a >> restore (i.e., start the >> backup database as >>
> current): >> the automatic recovery >> process applies the
> log >> changes >> to the out-of-date >> backup *.db. >> >>
> >> If your application or users issue >> explicit
> CHECKPOINT >> >> commands (usually a bad idea), >> they
> will (should) be >> >> blocked. Historically that has >>
> caused problems similar >> to >> "stall" (but I remember
> >> it in V9... it may have been >> an >> old persistent
> bug). >> >> >>
> >> >> >> What exact version and build of SQL Anywhere 7
> are >> you >> >> using? e.g. 7.0.3.2046. SELECT @@version
> will >> tell you. >> >>
> >> >> >> Can you move up? say, to 10.0.1 or 11.0.0?
> >> >> >>
> >> >> >> Breck
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> On 2 Mar 2009 23:20:36 -0800, JohnnyD wrote:
> >> >> >>
> >> >> >> >Hello everyone,
> >> >> >> >
> >> >> >> >I am not sure if this is the correct group, but
> I >> am >> >> trying >to develop a solution to do a live
> backup >> of >> >> Sybase adaptive >server anywhere 7 .db
> and .log >> files. >> >> (backup while database >is
> running) The >> software using >> the >> database is
> called >Eaglesoft >> (dental software) and >> >> includes
> a utility called >> >dbbackup.exe. I have written >> a >>
> script to use >> dbbackup.exe >that exports the >>
> transaction >> log and >> database file from the >live
> sybase >> database >> hourly >> to a seperate directory
> just >before my >> backup >> >> program takes a vss
> snapshot of the disk >but >> the >> problem >> is that
> dbbackup often stalls and does not >> >> >work. I have >>
> read about the "quiesce database hold". I >> >> >assume
> that >> dbbackup.exe uses this kind of command >> to >>
> >"freeze" the >> database to take a "snapshot" >> before
> >> exporting >the data. >> My backup program allows >> me
> to >> specify "pre" and >"post" >> commands to initiate >>
> before >> and after the backup vss >> >shapshot is taken
> >> of the >> drive. Does anyone know of an >> >alternate
> >> solution to >> using "dbbackup.exe" such as a >>
> >"quiesce >> database hold" >> command that I could use as
> a pre >> >> >snaphot command? > >> >> >Thanks very much,
> >> >> >> >
> >> >> >> >Johnny
> >> >> >>
> >> >> >> --
> >> >> >> Breck Carter http://sqlanywhere.blogspot.com/
> >> >> >>
> >> >> >> RisingRoad SQL Anywhere and MobiLink Professional
> >> >> Services >> breck.carter@risingroad.com
> >> >>
> >> >> --
> >> >> Breck Carter http://sqlanywhere.blogspot.com/
> >> >>
> >> >> RisingRoad SQL Anywhere and MobiLink Professional
> >> Services >> breck.carter@risingroad.com
> >>
> >> --
> >> Breck Carter http://sqlanywhere.blogspot.com/
> >>
> >> RisingRoad SQL Anywhere and MobiLink Professional
> Services >> breck.carter@risingroad.com
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com