Small Guide for Maintaining the IpPbx Database (kb3630)
Le informazioni contenute nel presente articolo riguardano i seguenti prodotti:
- Microsoft SQL Server 2008
- SwyxWare v7.00
- Microsoft SQL Server 2005
- Microsoft Database Engine 2000
- Microsoft SQL Server 2000
- SwyxWare v6.x, MS SQL Server 2005/2008 Express
Small Guide for Maintaining the IpPbx Database for non SQL Administrators.
The maintenance of a MS SQL database usually consists of:
- Periodical backups of the database and the transaction log.
- Create and update statistics used by query optimizer.
If there is no database maintenance the transaction log file can grow to an unlimited size. (results in a full disk).
The maintenance is usually done by the SQL Agent service (not included in SQL EXPRESS 2005) using maintenance plans defined by an SQLServer administrator.
To offer a convenient way for administrators who are not familiar with MS SQL Server administration this article contains a command line tool to do minimal maintenance of the ippbx database.
There are two possible maintenance strategies:
Simple Recovery Mode
IpPbxDBAssist /m SIMPLEThis sets the database to simple recovery mode.
Consider establishing a regular backup, e.g. with the backup.wsf script located in the SwyxWare program folder or by using a backup software compatible with Microsoft SQLServer.
Advantages: You have to no longer care about growing transaction logs.
Disadvantage: In case of a failure all changes made after last backup are lost.
Full Recovery Mode
IpPbxDBAssist /m FULL”This sets the database to full recovery mode.
IpPbxDBAssist /t /backup <BackupFolder>in a scheduled task, e.g. every week.
This makes backups of the database and shrinks the transaction logs. Note that the SQLServer service account needs read/write access in the backup folder.
Advantages: You have a continuously logged database. After a failure you can restore the database from weekly backups and from the transaction log.
Disadvantages: You have to check the disk space of the backup folder. The backup folder has to be on a local hard disk. A more safe way for a backup would store it on another medium.
If you have a backup software capable of backing up Microsoft SQLServer databases you probably don't need this tool. Your backup software will shrink the transaction log during backup. Please consult the documentation of you backup software to make sure that this is the case.
If you had no backup and the SwyxWare database transaction log got huge, call:
IpPbxDBAssist /t /backup <BackupFolder> /timeout 3800If the file size has reached several 10 GB, this operation can take a long time.
The transaction log of a Microsoft SQL database contains open transactions, closed but not physically saved transactions and closed and saved transactions.
The intention of the first type of transaction is obviously. Closed but not saved transactions will bee needed during a database recovery after an accidental shutdown.
Old transactions will be used to recover a database to the state of a specified time. For this purpose a database backup will be needed too.
The size of the transaction log of a database will grow endless per default. There are several possibilities to avoid this:
- Setting the recovery model to simple mode will truncate all old transaction each time the database reaches a so called safe point.
- Another possibility is to backup the database and the transaction log periodically. During the backup of a transaction log it will be truncated, old transactions will be removed. This will be commonly done by a database maintenance plan.
Truncate the Transaction Log:
Deleting old transactions from the log. Truncating will not reduce the size of the transaction log file.
Shrink the Transaction Log File:
Shrinking the log file will reduce the size of a log file if there is free space in the log.
- IpPbx Maintenance for NetPhone
- IpPbx Maintenance for SwyxWare
Informazioni di altri produttori proposte in questo articolo hanno il compito di appoggiare la ricerca di informazioni tecniche. I contenuti potrebbero essere modificati senza preavviso. Swyx non garantisce per la veridicità dei contenuti di articoli di terzi e declina ogni responsabilità per essi.