![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
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 |
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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" |
![]() |
| Thread Tools | |
| Display Modes | |
| |