This document describes the procedure to shrink the database on the
Management Center for Cisco Security Agents (CSA MC) when you receive an alert
about the database size, or if your CSA MC event log contains an
insufficient disk space message.
Maintenance (Free Up Disk Space on CSA MC) for more information about
database maintenance on the CSA MC.
Ensure that you meet these requirements before you attempt this
Ensure that you have met Cisco Secure Agent MC installation
prerequisites. Refer to
Requirements for more information.
Ensure that you have full administrative access rights to Microsoft
SQL Server 2000 Management Console. This allows to you view and configure SQL
Note: The CSA needs to be configured with SQL server before performing the
task of Shrinking the Database.
Note: Always back up the CSA MC database under the CSA MC GUI
Maintenance section before you make any changes to the
The information in this document is based on these software and
Cisco CSA MC 5.1
MS SQL Server 2000
The information in this document was created from the devices in a
specific lab environment. All of the devices used in this document started with
a cleared (default) configuration. If your network is live, make sure that you
understand the potential impact of any command.
Technical Tips Conventions for more information on document
Occasionally, you might need to conduct database maintenance whether
you have the pre-packaged MSDE or the full version of SQL Server 2000. This
maintenance should be conducted after you have deleted large amounts of data
from the CSA database (csamc.mdf and csamc_log.ldf). Usually this occurs if you
delete a large number of events from the event log. Even after data is removed
the .mdf and .ldf files need to be compacted (similar to an Oulook *.pst file
after deleting emails) in order to recover disk space and increase efficiency,
and also to reduce seek time.
5.1 with Remote SQL Server Configuration Sample for more information on
how to configure CSA with a remote SQL server.
In this section, you are presented with the information to shrink the
database as described in this document.
Note: Use the
Command Lookup Tool
(registered customers only)
in order to obtain more
information on the commands used in this section.
Perform these steps to shrink the CSA MC database in order to free the
Turn off the csagent service on the VMS server by
entering the net stop csagent command in the command
The Microsoft SQL Desktop Edition (MSDE), which ships with the CSA
MC, does not have a GUI. Therefore, database maintenance needs to be done
through the command shell tool osql –E. Run these scripts via the command shell
when you are ready to shrink the database:
Press [enter] after each
backup log csamc with
After you perform these steps, the CSA MC database is
Exit from the command shell.
Check the sizes of the .mdf and
.ldf files in the folder named db present in
Start the CSA again using the net start
This completes the procedure to shrink the CSA MC database.
Make sure that these steps are performed at regular intervals of time
to make free space available in the CSA MC database:
Prune more aggressively to remove events from the database.
Compact your database to reclaim disk space reserved for future
Tweak your policies to not log as many events, only ones critical to
Upgrade your database to the full version of MS-SQL