|
Home > Archive > SQL Anywhere Mobile > July 2005 > Not sure about Trucating the Log File
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 |
Not sure about Trucating the Log File
|
|
| Paul Davis 2005-07-13, 7:24 am |
| Hi Folks,
I need to truncate the database log file . Currenty I have a
remote database that 120 MB and the database log file is
currently over 1.5 GB.
The database replciates data using mobilink synchronization
server to a consolidated database 3 times daily.
Do I use -m switch on the database engine. Im unsure what to
do , if anyone can offer a speedy solution - I would be very
greatful.
Paul - Ireland
| |
| Reg Domaratzki \(iAnywhere Solutions\) 2005-07-13, 9:24 am |
| DO NOT USE -m on the engine.
DO NOT USE -m on the engine.
DO NOT USE -m on the engine.
DO NOT USE -m on the engine.
There are three common options :
1) If the database engine is not running, simply RENAME (do not delete!)
your current log file to a different file name.
2) Add the -x switch to the dbmlsync command line. This will cause the
transaction log to be renamed after each synchronization.
3) Run dbbackup with the -r switch. This will backup your database and log
file and rename your current transaction log.
After having done one of the above, if your renamed log file is not in the
same directory as your current log file, and you are using v702 or below
(I'm not positive about the version), you may need to tell dbmlsync where
your old transaction log is location using either the OfflineDirectory (dir)
extended option or by adding the directory as the last option on your
dbmlsync command line.
Finally, set the database option delete_old_logs to 'on', and when dbmlsync
has confirmed that all the data in a renamed log has been successfully
applied to the consolidated database, the log file will be erased.
The following on-line tech doc, although it deals with SQL Remote discusses
maintaining your transaction log : http://www.sybase.com/detail?id=1012988.
--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup
iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL
<Paul Davis> wrote in message news:42d4e805.3f0a.1681692777@sybase.com...
> Hi Folks,
>
> I need to truncate the database log file . Currenty I have a
> remote database that 120 MB and the database log file is
> currently over 1.5 GB.
>
> The database replciates data using mobilink synchronization
> server to a consolidated database 3 times daily.
>
> Do I use -m switch on the database engine. Im unsure what to
> do , if anyone can offer a speedy solution - I would be very
> greatful.
>
> Paul - Ireland
| |
| Shuchit 2005-07-13, 9:24 am |
| Paul Davis wrote in news:42d4e805.3f0a.1681692777@sybase.com:
>
> I need to truncate the database log file . Currenty I have a
> remote database that 120 MB and the database log file is
> currently over 1.5 GB.
You would typically use the -x switch on dbmlsync and turn on the database
option "delete_old_logs". See information about -x switch in the
documentation.
See <http://tinyurl.com/9zcsp> which points to
<http://www.ianywhere.com/developer/...e/0902/en/html/
dbmnen9/00000169.htm>
Shuchit
| |
| Reg Domaratzki \(iAnywhere Solutions\) 2005-07-13, 9:24 am |
| Shuchit forgot to mention that you DO NO USE THE -m SWITCH ON THE DATABASE
ENGINE.
--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup
iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL
"Shuchit" <me@privacy.net> wrote in message
news:Xns96925E139DB7
8svelkarprivacynet@1
27.0.0.1...
> Paul Davis wrote in news:42d4e805.3f0a.1681692777@sybase.com:
>
>
> You would typically use the -x switch on dbmlsync and turn on the
database
> option "delete_old_logs". See information about -x switch in the
> documentation.
>
> See <http://tinyurl.com/9zcsp> which points to
>
<http://www.ianywhere.com/developer/...re/0902/en/html
/
> dbmnen9/00000169.htm>
>
> Shuchit
| |
| Breck Carter [TeamSybase] 2005-07-13, 9:24 am |
| Do not use dbeng9 -m. That is fatal to synchronization. Arguably, the
remote log file is *more* important to synchronization than the
database file, and must be protected at all costs.
I assume you are using dbmlsync.exe to synchronize. If you do this in
the remote database:
SET OPTION PUBLIC.DELETE_OLD_LOGS = 'ON';
or this:
SET OPTION PUBLIC.DELETE_OLD_LOGS = 'DELAY';
then dbmlsync.exe will automatically take care of renaming and
restarting the log file, and deleting old renamed log files it no
longer needs. It must have access to the remaining renamed log files
in case sync sessions fail and have to be rerun. You will notice that
the "steady state" will be one whatever.log file plus two or three
renamed log files. Do not move, delete, rename or otherwise mess with
these files, and do *not* rely on the file names to tell you anything
about "order of creation" within a single day.
It may take two or three sync sessions to zap your giant log.
See the Help for dbmlsync and DELETE_OLD_LOGS. In particular read
about the transaction-logs-directory parameter; it can be omitted but
you must understand the rules.
Breck
On 13 Jul 2005 03:08:05 -0700, Paul Davis wrote:
>Hi Folks,
>
>I need to truncate the database log file . Currenty I have a
>remote database that 120 MB and the database log file is
>currently over 1.5 GB.
>
>The database replciates data using mobilink synchronization
>server to a consolidated database 3 times daily.
>
>Do I use -m switch on the database engine. Im unsure what to
>do , if anyone can offer a speedy solution - I would be very
>greatful.
>
>Paul - Ireland
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| David Fishburn 2005-07-13, 9:24 am |
| Paul Davis wrote in news:42d4e805.3f0a.1681692777@sybase.com
of sybase.public.sqlanywhere.mobilink:
PD> Do I use -m switch on the database engine. Im unsure what to
PD> do , if anyone can offer a speedy solution - I would be very
PD> greatful.
Do not EVER even consider thinking of that switch again ...
See the other posts for the right way to do things.
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).
EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm
Developer Community / Whitepapers
http://www.ianywhere.com/developer
CaseXpress - to report bugs
http://casexpress.sybase.com
CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
| |
|
| thanks all for your comprehensive help....
i knew the -m switch would scare you....
Kind Regards ......Paul/Ireland
> Do not use dbeng9 -m. That is fatal to synchronization.
> Arguably, the remote log file is *more* important to
> synchronization than the database file, and must be
> protected at all costs.
>
> I assume you are using dbmlsync.exe to synchronize. If you
> do this in the remote database:
>
> SET OPTION PUBLIC.DELETE_OLD_LOGS = 'ON';
>
> or this:
>
> SET OPTION PUBLIC.DELETE_OLD_LOGS = 'DELAY';
>
> then dbmlsync.exe will automatically take care of renaming
> and restarting the log file, and deleting old renamed log
> files it no longer needs. It must have access to the
> remaining renamed log files in case sync sessions fail and
> have to be rerun. You will notice that the "steady state"
> will be one whatever.log file plus two or three renamed
> log files. Do not move, delete, rename or otherwise mess
> with these files, and do *not* rely on the file names to
> tell you anything about "order of creation" within a
> single day.
>
> It may take two or three sync sessions to zap your giant
> log.
>
> See the Help for dbmlsync and DELETE_OLD_LOGS. In
> particular read about the transaction-logs-directory
> parameter; it can be omitted but you must understand the
> rules.
>
> Breck
>
>
> On 13 Jul 2005 03:08:05 -0700, Paul Davis wrote:
>
> have a >remote database that 120 MB and the database log
> file is >currently over 1.5 GB.
> synchronization >server to a consolidated database 3 times
> daily. >
> to >do , if anyone can offer a speedy solution - I would
> be very >greatful.
>
> --
> SQL Anywhere Studio 9 Developer's Guide
> Buy the book:
>
http://www.amazon.com/exec/obidos/A...7/risingroad-20
> bcarter@risingroad.com
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com
|
|
|
|
|