How to reduce the size of SQL transaction logs after upgrading Enterprise Vault (EV) Compliance Accelerator (CA) or Discovery Accelerator (DA)

Article:TECH70794  |  Created: 2009-01-21  |  Updated: 2011-05-04  |  Article URL http://www.symantec.com/docs/TECH70794
Article Type
Technical Solution

Product(s)

Environment

Issue



How to reduce the size of SQL transaction logs after upgrading Enterprise Vault (EV) Compliance Accelerator (CA) or Discovery Accelerator (DA)


Solution



Overview:
 
When Enterprise Vault (EV) Compliance Accelerator (CA) or Discovery Accelerator (DA) are upgraded, the upgrade process writes all needed upgrade transactions to the appropriate SQL database's transaction log.  When all upgrade transactions are written, they are committed to the database.  This activity can leave the transaction log using more space than needed.  The excess space can be removed from the log at the discretion of the SQL Database Administrator (DBA).
 

 
Solution 1:
 
Perform the recommended routine database maintenance:
 
Steps:
1) Stop the Enterprise Vault Accelerator Manager Service (EVAMS) or the appropriate Customer's Background Task (CBT)
 
2) Backup the CA or DA Customer database
 
3) Backup and truncate the CA or DA Customer database's transaction log
 
4) Shrink the database
 
5) Rebuild the database table indexes
 
6) Update the database statistics
 
7) Restart the SQL Server
 
8) Start the EVAMS or CBT as appropriate
 
 
 
Solution 2:
 
1) Verify the Initial Size of the Transaction log
     a) Open SQL Server Manager Studio (SSMS)
     b) Connect to the appropriate Database Engine that hosts the EV database of concern
     c)  Expand the list of databases
     d)  Right click on the appropriate database and select properties
     e)  From the new pop up properties windows, select Files from the left pane
     f )  Scroll to the column 'Initial Size' and make a note the number (to be used in the shrink process)

2) Stop the Enterprise Vault Accelerator Manager Service (EVAMS) or the appropriate Customer's Background Task (CBT)
 
3) Verify the file size before shrinking by running the following command in SQL Query Analyzer, with the focus on the CA or DA Customer database
 
DBCC SQLPERF(LOGSPACE)
 
4) Switch the database recovery mode to Simple
 
ALTER DATABASE databasename             -- replace databasename with the name of the CA or DA Customer database
 
SET RECOVERY SIMPLE
 
GO
 
5) Shrink the truncated log file to the 'Initial Size' in Mega Bytes.
 
USE databasename                                   -- Replace the databasename with the name of the CA or DA Customer database
 
DBCC SHRINKFILE (logname_Log, X)         -- Replace the logname_log with the name of the database's transaction log file 
                                                                             -- Replace the X with the number obtained in step 1
GO
 
6) Reset the database recovery mode to Full.
 
ALTER DATABASE databasename             -- replace databasename with the name of the CA or DA Customer database
 
SET RECOVERY FULL
 
GO
 
7) Determine new file size after shrinking
 
DBCC SQLPERF(LOGSPACE)                   - check the space that has been created to ensure it is less than the size prior to shrinking
 
8)  Restart the EVAMS or CBT as appropriate.
 
 
NOTE:  If the upgrade of the database failed part way through due to the transaction logs being full, the upgrade needs to be restarted:
 
- Browse to the EVBAAdmin website
- Right click on the Accelerator customer in the left hand pane
- Click on Properties, then click on Retry Upgrade



Legacy ID



325419


Article URL http://www.symantec.com/docs/TECH70794


Terms of use for this information are found in Legal Notices