How to Truncate the of a SQL

Although E2 is not responsible for the integrity of your database or for creating your backup routines, we are providing this Help Paper as an aid to help resolve a problem that is the result of not backing up or maintaining the transaction logs correctly.

Your E2 SQL Database was created using the “Full Recovery Model” setting. This means that if your backup routine is created correctly you can actually restore your database in an emergency to a specific point in time by restoring backed up transaction logs.

The downside is that when you do a full backup of the database, the transaction log is not automatically truncated and will continue to grow and use disk space. You can prevent this happening by periodically truncating the transaction log or by implementing transaction log backups.

Provided below is a script you may modify to manually your transaction logs. To begin, make sure that all users are out of E2 including DataCollection, PC DataCollection, the E2 Server, and QuickView.

1. Go to a PC or Server that has the SQL Client Tools installed.

2. Launch the SQL Query Analyzer.

3. You may be prompted to login. Be sure to the correct SQL Server from the drop down list and enter a valid Login name and Password. Then click OK.

4. The window that opens shows you the names of your in the pane on the left.

5. In the Query pane, the is flashing. Type the following text.

USE XXXXX BACKUP LOG XXXXX WITH TRUNCATE_ONLY DBCC SHRINKFILE (XXXXX_LOG,2)

**Note: You will need to replace XXXXX above with the name of your SQL Database.

6. Click the Green Arrow in the toolbar to execute your query.

7. The query may take some time to complete. When complete you should see a grid similar to the picture below.

It is strongly recommended that you make a full backup of the database immediately after you truncate the transaction log.

If you have further questions regarding this process, feel free to contact Shoptech Support at (800) 677-9640 option 2.

THE INFORMATION PROVIDED IN THIS TECHNICAL SUPPORT DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. SHOPTECH SOFTWARE CORP. DISCLAIMS ALL WARRANTIES,

EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SHOPTECH SOFTWARE CORP. OR ITS

SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF SHOPTECH

SOFTWARE CORP. OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.