Senstar
Safeguarding people, places and property
Contact       Xnet Login       English
Knowledge Base Article
Article Type: How To
Product: Symphony
Product Version:
Component: Symphony Server
Device Brands:
Created: 28-Feb-2013 2:21:49 PM
Last Updated:

How to shrink the database

Issue

SQL express has a size limit. Once the limit is reached, you must shrink the database.

Solution

Task 1: Shrink the Database

  1. Download and install Microsoft SQL Server Management Studio Express (SMSE) from Microsoft: http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=8961
  2. Launch Microsoft SQL Server Management Studio Express.
  3. Back up the database: Right-click on the database, select Tasks>Back Up.
  4. SQL server mangement studio express

     

  5. Run Shrink on both the database and the log file: Right-click on the database, select Tasks>Shrink>Database and Files.
  6. shrink database

     

Task 2: Manally purge the archive logs

Run the following SQL to delete all archives older than September 1st (from a command line):

dbupdater "sp_DeleteEventLogArchive '2012-09-01'"

Task 3: Truncate the tables eventlog and eventlogdata

For Symphony 6.x

From a command prompt on the Symphony server, enter:

dbupdater "truncate table eventlogdata"

Then enter:

dbupdater "truncate table eventlog"

For Symphony 7.0

From the command prompt on the Symphony server, enter:

dbupdater "ALTER TABLE EventLogData DROP CONSTRAINT FK_EventLogData_EventLog;TRUNCATE TABLE EventLogData;TRUNCATE TABLE EventLog;ALTER TABLE EventLogData WITH CHECK ADD CONSTRAINT FK_EventLogData_EventLog FOREIGN KEY (EventID) REFERENCES EventLog (ID);"

Task 4: Re-run the shrink command on the database again

Using Microsoft SQL Server Management Studio Express, run Shrink on the database: Right-click on the database, select Tasks>Shrink>Database.

Task 5: Run Setup Wizard again to complete the upgrade

In Windows, select All Programs>Aimetis>Setup Wizard.

Average rating:
Please log in to rate.
Rated by 1, Viewed by 3786