Guest

Cisco Security Agent

CSA MC: Procedure to Shrink the Database

Document ID: 109579

Updated: Feb 09, 2009

   Print

Introduction

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.

Refer to Database Maintenance (Free Up Disk Space on CSA MC) for more information about database maintenance on the CSA MC.

Prerequisites

Requirements

Ensure that you meet these requirements before you attempt this configuration:

  • Ensure that you have met Cisco Secure Agent MC installation prerequisites. Refer to System 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 Server 2000.

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

Components Used

The information in this document is based on these software and hardware versions:

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

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

Background Information

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.

Refer to CSA 5.1 with Remote SQL Server Configuration Sample for more information on how to configure CSA with a remote SQL server.

Configure

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.

Procedure to Shrink CSA MC Database

Perform these steps to shrink the CSA MC database in order to free the database:

  1. Turn off the csagent service on the VMS server by entering the net stop csagent command in the command prompt.

  2. 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 line:

    • osql –E

    • use csamc

    • backup log csamc with no_log

    • go

    • dbcc shrinkdatabase (csamc)

    • go

    After you perform these steps, the CSA MC database is compacted.

  3. Exit from the command shell.

  4. Check the sizes of the .mdf and .ldf files in the folder named db present in this location: C:/ProgramFiles/CSCOpx/CSAMC/db.

  5. Start the CSA again using the net start csagent command.

    This completes the procedure to shrink the CSA MC database.

How to Avoid Insufficient Database issue in CSA MC

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

  • Tweak your policies to not log as many events, only ones critical to your environment.

  • Upgrade your database to the full version of MS-SQL 2000.

Related Information

Updated: Feb 09, 2009
Document ID: 109579