Database Partition Shrink Stored Procedure
search cancel

Database Partition Shrink Stored Procedure

book

Article ID: 260324

calendar_today

Updated On:

Products

Data Center Security Server

Issue/Introduction

Data Center Security (DCS) Database Partition Shrink Stored Procedure.

Environment

Release : 6.9.0

Resolution

Follow these instructions:

  • Using SQL Server Management Studio, select the DCS database (typically named "SCSPDB")
  • Open the stored procedure SQL file "ShrinkDBPartitions.sql" and execute (which compiles and adds the stored procedure to the database).
  • Now execute the Shrink DB Partitions procedure using the examples below.

Examples of how to run the stored procedure....

To TEST Real Events (CSPEVENT table):
     EXEC SCSP_ShrinkDbPartitions @eventClass='REALTIME', @dataFileShrinkTargetSizeInMB=50, @shrinkMode='TESTMODE';
To SHRINK Real Events (CSPEVENT table):
     EXEC SCSP_ShrinkDbPartitions @eventClass='REALTIME', @dataFileShrinkTargetSizeInMB=50, @shrinkMode='SHRINK';
To SHRINK Profile Events (PROFILE table):
     EXEC SCSP_ShrinkDbPartitions @eventClass='PROFILE', @dataFileShrinkTargetSizeInMB=50, @shrinkMode='SHRINK';
To SHRINK Analysis Events (ANALYSIS table):
     EXEC SCSP_ShrinkDbPartitions @eventClass='ANALYSIS', @dataFileShrinkTargetSizeInMB=50, @shrinkMode='SHRINK';

Note :- The above stored procedure added in our latest release 6.9.2 and 6.9.3 as enhancement. 

Attachments

ShrinkDBPartitions_1676953657809.sql get_app