HOWTO

Small Guide for Maintaining the IpPbx Database (kb3630)

The information in this article applies to:

  • 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

[ Summary | Information | Links ]


Summary

Small Guide for Maintaining the IpPbx Database for non SQL Administrators.


Information

Database Maintenance:

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:

  1. Simple Recovery Mode
    Call once:IpPbxDBAssist /m SIMPLE This 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.
  2. Full Recovery Mode
    Call once: IpPbxDBAssist /m FULL” This sets the database to full recovery mode.
    Call: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.

Troubleshooting 

  • 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.



Glossar:

  • Transaction Log:
    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.

Links

As far as software supplied or used by us, includes open source elements the additional terms under https://www.swyx.com/open-source apply in addition. An overview which products from the Swyx portfolio include open source elements and which open source license is relevant can be found under https://www.swyx.com/open-source.

The third-party contact information included in this article is provided to help you find the technical support you need. This contact information is subject to change without notice. Swyx in no way guarantees the accuracy of this third-party contact information nor is responsible for it's content.


Comment

Comment on this article



If we have any follow-up questions, where can we contact you?

E-Mail Address (optional)


Note

This feedback form can't be used for support requests. Those requests must be directed to your Swyx reseller or distributor.