dbTalk Databases Forums  

Problem to find the right dbbackup options

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Problem to find the right dbbackup options in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tduemesnil
 
Posts: n/a

Default Problem to find the right dbbackup options - 09-11-2009 , 10:40 AM






Perhaps some of you have an idea on this topic

Once a Month i need a Database snapshot at a specific Date/time point.
Means my monthly inventory backup at the first working day of a month
at 07:00h.

Due to the fact that our plant runs in 3 Shifts it is now common that
some users are working in the System when the backup runs. ( Only
short running processes < 5 sec)

when i call dbbackup it needs aprox. 5 min to finish. Database is 1GB.
To get closer to my target i prepare a full backup at 6:30 and a
logfile only backup at 7:00. Later i want load to second log in the
Backup Database and have my snapshot available.

Since two month i get the following error message:
Error: Cannot open transaction log file -- Can't use log file
"090911AC.LOG" since it has been used more recently than the database
file

the steps i use are
1. Run 6:30
dbbackup.exe -y -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get Database.db and 090911AB.log

2. Run 7:00
dbbackup.exe -y -t -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get 090911AC.log

3. Run Load the DB and append the log
dbeng10.exe -o rad8FBA7.tmp E:\month_save\Database.db -a 090911AC.LOG

<---------------------- file rad8FBA7.tmp
----------------------------------->
I. 09/11 17:04:55. SQL Anywhere Personal Server Version 10.0.1.3831
I. 09/11 17:04:55. 2 logical processor(s) on 1 physical processor(s)
detected.
I. 09/11 17:04:55. Running Windows Vista Build 6001 Service Pack 1 on
X86 (X86_64)
I. 09/11 17:04:55. Server built for X86 processor architecture
I. 09/11 17:04:55. 785760K of memory used for caching
I. 09/11 17:04:55. Minimum cache size: 2048K, maximum cache size:
1492448K
I. 09/11 17:04:55. Using a maximum page size of 16384 bytes
I. 09/11 17:04:55. Starting database "Databse" (E:\month_save
\Database.db) at Fri Sep 11 2009 17:04
I. 09/11 17:04:55. Database recovery in progress
I. 09/11 17:04:55. Last checkpoint at Fri Sep 11 2009 16:48
I. 09/11 17:04:55. Checkpoint log...
I. 09/11 17:04:56. Transaction log: 090911AC.LOG...
E. 09/11 17:04:56. Error: Cannot open transaction log file -- Can't
use log file "090911AC.LOG" since it has been used more recently than
the database file
I. 09/11 17:04:56. Error: Cannot open transaction log file -- Can't
use log file "090911AC.LOG" since it has been used more recently than
the database file
I. 09/11 17:04:56.
E. 09/11 17:04:56. Cannot open transaction log file -- Can't use log
file "090911AC.LOG" since it has been used more recently than the
database file
I. 09/11 17:05:13. Database server shutdown due to startup error
I. 09/11 17:05:13. Database server stopped at Fri Sep 11 2009 17:05
<---------------------- file rad8FBA7.tmp
----------------------------------->

I have run dbvalid against the first backup database but it shows no
error in DB.

My questions are

- Is there a better way to get a snapshot that is near to a point in
time ?
- Are the dbbackup options correct ?
- What about -k option

Any help appreciated
Thomas

Reply With Quote
  #2  
Old   
Reg Domaratzki [Sybase iAnywhere]
 
Posts: n/a

Default Re: Problem to find the right dbbackup options - 09-11-2009 , 11:31 AM






tduemesnil wrote:
Quote:
Perhaps some of you have an idea on this topic

Once a Month i need a Database snapshot at a specific Date/time point.
Means my monthly inventory backup at the first working day of a month
at 07:00h.

Due to the fact that our plant runs in 3 Shifts it is now common that
some users are working in the System when the backup runs. ( Only
short running processes < 5 sec)

when i call dbbackup it needs aprox. 5 min to finish. Database is 1GB.
To get closer to my target i prepare a full backup at 6:30 and a
logfile only backup at 7:00. Later i want load to second log in the
Backup Database and have my snapshot available.

Since two month i get the following error message:
Error: Cannot open transaction log file -- Can't use log file
"090911AC.LOG" since it has been used more recently than the database
file

the steps i use are
1. Run 6:30
dbbackup.exe -y -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get Database.db and 090911AB.log

2. Run 7:00
dbbackup.exe -y -t -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get 090911AC.log

3. Run Load the DB and append the log
dbeng10.exe -o rad8FBA7.tmp E:\month_save\Database.db -a 090911AC.LOG

When you take your backup at 6:30, the renamed transaction log that is
associated with the backup (in this example, E:\month_save\090911AB.log)
may contain operations that are not in the database file
(E:\month_save\Database.db). When you go to recover your database, you
need to apply both 090911AB.log and 090911AC.log to the backed up database.

dbeng10.exe -o rad8FBA7.tmp E:\month_save\Database.db -a 090911AB.LOG
dbeng10.exe -o rad8FBA8.tmp E:\month_save\Database.db -a 090911AC.LOG

Quote:
My questions are

- Is there a better way to get a snapshot that is near to a point in
time ?
Unless you want to shut down the database engine or kick active users
off the database and temporarily prevent new connections, then the
process you've described is probably as good as it will get.

Quote:
- Are the dbbackup options correct ?
Yes, but the recovery steps were not quite correct.

Quote:
- What about -k option
What about it? I don't believe the problem you're experiencing has
anything to do with the checkpoint log.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Please reply only to the newsgroup

Documentation : Exercise your WRITE @DocCommentXchange: DCX.sybase.com
SQL Anywhere Patches and EBFs : http://downloads.sybase.com/swd/base.do
-> Choose SQL Anywhere
-> Optionally set filter to "Display ALL platforms IN ALL MONTHS"

Reply With Quote
  #3  
Old   
R. Pods
 
Posts: n/a

Default Re: Problem to find the right dbbackup options - 09-14-2009 , 02:41 AM



Thomas,

If you're using a somewhat recent version of SQLA (it's always a good
idea to supply your version and build number) you might want to evaluate
the BACKUP statement. With the optional WAIT BEFORE START clause there
will be no need for recovery and the additional log may be loaded
directly. If your backup target is not on the server with the database,
that might be not applicable for you (or the server would require
network acces to the target drive).

Cheers
Reimer

tduemesnil wrote:
Quote:
Perhaps some of you have an idea on this topic

Once a Month i need a Database snapshot at a specific Date/time point.
Means my monthly inventory backup at the first working day of a month
at 07:00h.

Due to the fact that our plant runs in 3 Shifts it is now common that
some users are working in the System when the backup runs. ( Only
short running processes < 5 sec)

when i call dbbackup it needs aprox. 5 min to finish. Database is 1GB.
To get closer to my target i prepare a full backup at 6:30 and a
logfile only backup at 7:00. Later i want load to second log in the
Backup Database and have my snapshot available.

Since two month i get the following error message:
Error: Cannot open transaction log file -- Can't use log file
"090911AC.LOG" since it has been used more recently than the database
file

the steps i use are
1. Run 6:30
dbbackup.exe -y -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get Database.db and 090911AB.log

2. Run 7:00
dbbackup.exe -y -t -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get 090911AC.log

3. Run Load the DB and append the log
dbeng10.exe -o rad8FBA7.tmp E:\month_save\Database.db -a 090911AC.LOG

---------------------- file rad8FBA7.tmp
-----------------------------------
I. 09/11 17:04:55. SQL Anywhere Personal Server Version 10.0.1.3831
I. 09/11 17:04:55. 2 logical processor(s) on 1 physical processor(s)
detected.
I. 09/11 17:04:55. Running Windows Vista Build 6001 Service Pack 1 on
X86 (X86_64)
I. 09/11 17:04:55. Server built for X86 processor architecture
I. 09/11 17:04:55. 785760K of memory used for caching
I. 09/11 17:04:55. Minimum cache size: 2048K, maximum cache size:
1492448K
I. 09/11 17:04:55. Using a maximum page size of 16384 bytes
I. 09/11 17:04:55. Starting database "Databse" (E:\month_save
\Database.db) at Fri Sep 11 2009 17:04
I. 09/11 17:04:55. Database recovery in progress
I. 09/11 17:04:55. Last checkpoint at Fri Sep 11 2009 16:48
I. 09/11 17:04:55. Checkpoint log...
I. 09/11 17:04:56. Transaction log: 090911AC.LOG...
E. 09/11 17:04:56. Error: Cannot open transaction log file -- Can't
use log file "090911AC.LOG" since it has been used more recently than
the database file
I. 09/11 17:04:56. Error: Cannot open transaction log file -- Can't
use log file "090911AC.LOG" since it has been used more recently than
the database file
I. 09/11 17:04:56.
E. 09/11 17:04:56. Cannot open transaction log file -- Can't use log
file "090911AC.LOG" since it has been used more recently than the
database file
I. 09/11 17:05:13. Database server shutdown due to startup error
I. 09/11 17:05:13. Database server stopped at Fri Sep 11 2009 17:05
---------------------- file rad8FBA7.tmp
-----------------------------------

I have run dbvalid against the first backup database but it shows no
error in DB.

My questions are

- Is there a better way to get a snapshot that is near to a point in
time ?
- Are the dbbackup options correct ?
- What about -k option

Any help appreciated
Thomas

Reply With Quote
  #4  
Old   
tduemesnil
 
Posts: n/a

Default Re: Problem to find the right dbbackup options - 09-21-2009 , 01:30 AM



Dear Reg.

You have point me to the correct destination.
My problem was that i tried to use the first saved Logfile as Database
log. ( Renamed to Database.LOG ) This produced a recovery after i
started the Database Engine.
When i tried to loaded the second logfile i could not fit anymore
because new transactions have been written to the Database Log.

Anyway
Thanks very much for your help.

Thomas

On 11 Sep., 18:31, "Reg Domaratzki [Sybase iAnywhere]"
<firstname.lastn... (AT) ianywhere (DOT) com> wrote:
Quote:
tduemesnil wrote:
Perhaps some of you have an idea on this topic

Once a Month i need a Database snapshot at a specific Date/time point.
Means my monthly inventory backup at the first working day of a month
at 07:00h.

Due to the fact that our plant runs in 3 Shifts it is now common that
some users are working in the System when the backup runs. ( Only
short running processes < 5 sec)

when i call dbbackup it needs aprox. 5 min to finish. Database is 1GB.
To get closer to my target i prepare a full backup at 6:30 and a
logfile only backup at 7:00. Later i want load to second log in the
Backup Database and have my snapshot available.

Since two month i get the following error message:
Error: Cannot open transaction log file -- Can't use log file
"090911AC.LOG" since it has been used more recently than the database
file

the steps i use are
1. Run 6:30
dbbackup.exe -y -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get Database.db and 090911AB.log

2. Run 7:00
dbbackup.exe -y -t -r -n -c
"eng=---;DBN=---;uid=---;pwd=closed;LINKS=tcpip
(host=10.10.10.10;dobroad=none;port=2638)" E:\month_save

i get 090911AC.log

3. Run Load the DB and append the log
dbeng10.exe -o rad8FBA7.tmp E:\month_save\Database.db -a 090911AC.LOG

When you take your backup at 6:30, the renamed transaction log that is
associated with the backup (in this example, E:\month_save\090911AB.log)
may contain operations that are not in the database file
(E:\month_save\Database.db). *When you go to recover your database, you
need to apply both 090911AB.log and 090911AC.log to the backed up database.

dbeng10.exe -o rad8FBA7.tmp E:\month_save\Database.db -a 090911AB.LOG
dbeng10.exe -o rad8FBA8.tmp E:\month_save\Database.db -a 090911AC.LOG

*> My questions are
*
*> - Is there a better way to get a snapshot that is near to a point in
*> time ?

Unless you want to shut down the database engine or kick active users
off the database and temporarily prevent new connections, then the
process you've described is probably as good as it will get.

*> - Are the dbbackup options correct ?

Yes, but the recovery steps were not quite correct.

*> - What about -k option

What about it? *I don't believe the problem you're experiencing has
anything to do with the checkpoint log.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Please reply only to the newsgroup

Documentation : Exercise your WRITE @DocCommentXchange: DCX.sybase.com
SQL Anywhere Patches and EBFs :http://downloads.sybase.com/swd/base.do
* * -> Choose SQL Anywhere
* * -> Optionally set filter to "Display ALL platforms IN ALL MONTHS"

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.