|
Home > Archive > SQL Anywhere Mobile > April 2006 > Truncate of DB LOG on Device
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Truncate of DB LOG on Device
|
|
| armanporky@bigfoot.com 2006-04-07, 3:43 am |
| Environment:
ASA 9.0.2.3228 (Uses Mobilink)
HP iPAQ PC WM2003SE
PocketBuilder 2.0.4 Build 240
Windows XP Development
I have been trying to truncate the LOG of an ASA 9 database
after a
successful synchronization (Mobilink) on my PDA application.
I use
"BACKUP DATABASE DIRECTORY '' TRANSACTION LOG ONLY
TRANSACTION LOG
TRUNCATE". I've tried this on the development environment
(PC), and
the log is indeed truncated. However, when I'm trying to
synchronize
again, a synchronization error occurs. I even try the
DELETE_OLD_LOGS
option, but still get the same synchronization error.
Error message on sync window (pk generated sync window):
>Begin synchronization User: rncruz
>Pub Names: gttread_rem_api
>Begin log scan. Rescan = 0.
>E. 03/22 18:14:15. No off-line transaction log file found
and on-line transaction log starts at >offset 0002614031.
>E. 03/22 18:14:16. Upload aborted at offset 0001991300
>E. 03/22 18:14:16. Download aborted
>End Synchronization. Status = 256
>Synchronization error 256.
The application is already deployed to several users in the
field and
I'm doing this modification in order to minimize the space
occupied by
the database on the device, particularly the transaction
log. However,
since this occurs during development (testing), I haven't
provided any
solution yet to the growing transaction log.
Any help will be very appreciated.
TIA,
Arman
| |
| Greg Fenton 2006-04-07, 3:43 am |
| armanporky@bigfoot.com wrote:
>
> I have been trying to truncate the LOG of an ASA 9 database
> after a
> successful synchronization (Mobilink) on my PDA application.
You do NOT want to truncate the log with dbbackup (or BACKUP DATABASE).
You want to RENAME the log to a backup directory and let dbmlsync
manage those old logs. If you truncate the logs, then you have deleted
all of the operations that are needed for synchronization (recognize
that dbmlsync does not look at the data in the .db file to
synchronize...it scans the .log file(s)!!!)
You said you set the DELETE_OLD_LOGS option, but you did not indicate
whether you also used the "-x" option to dbmlsync. You need *both* of
these configuration items to have dbmlsync manage the *old* logs for you.
If you are using both configuration items and the log is not truncating
after a successful synchronization, then it is likely that you have more
than one publication in your database. dbmlsync can only remove the old
logs once all operations in them have been synchronized. If a
publication exists that has not been synchronized in a long time, then
all the logs back to that pub's previous successful synchronization must
remain.
For more info, in the SQLAnywhere 9.x online docs see:
MobiLink Clients
Adaptive Server Anywhere Client Synchronization Parameters
dbmlsync options
-x option
You could also use Google Groups to search this newsgroup for:
group:sybase.public.sqlanywhere.mobilink delete_old_logs
Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
|
|
|
|
|