Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

How to shrink the CDR, CAR Database Size

Core Issue

There are some general procedures that can be completed in order to recover hard drive space in a Cisco CallManager server, such as to shrink CDR and ART (CAR) databases or erase/disable Cisco CallManager traces.

Resolution

In order to resolve this issue, complete these steps in order to shrink the CDR Dabatase.

  1.   From the Cisco CallManager server, open a command prompt and type:

    C:\>osql -E
    1> use cdr
    2> go
    1> backup log cdr with no_log
    2> go
    1> dbcc shrinkdatabase (cdr)
    2> go
    DbId  FileId CurrentSize MinimumSize UsedPages  EstimatedPages
    ------ ------ ----------- ----------- ----------- --------------
      13  1  368  96  360  360
      13  2  96  63  96  56

    (2 rows affected)



    DBCC execution completed. If DBCC printed error messages, contact your system administrator.


    1> create table Test (test int DEFAULT NULL NULL)
    2> go
    1> insert into Test (test) VALUES (1)
    2> go
    (1 row affected)
    1> declare @t integer
    2> set @t = 0
    3> use cdr
    4> while (@t <_ _="_" _100000br="_100000br">5> BEGIN
    6> update Test set test=1 where test=1
    7> select @t = @t + 1
    8> if ((@t % 500) = 0)
    9> BEGIN
    10> select @t
    11> END
    12> END
    13> go
    // you will see a lot of "(1 row affected)"
    (1 row affected)

    1> drop table test
    2> go
    1> checkpoint
    2> go
    1> dbcc shrinkdatabase (cdr)
    2> go
    DbId   FileId CurrentSize MinimumSize UsedPages   EstimatedPages
    ------ ------ ----------- ----------- ----------- --------------
         13      1         368          96         360            360
         13      2          96          63          96             56


       
  2.   When this procedure finishes, a message similar to this appears:


    (1 row affected) DBCC execution completed. If DBCC printed error messages, contact your system administrator.



    That procedure is for CDR, but you can shrink the ART database in the same way. 

       
  3. Change cdr for art in the previous procedure. This restores hard drive space.

       
  4. Also, if it is not necessary to capture Cisco CallManager trace files, disable trace output files.

       
  5.   Choose CCM Admin > Application > Serviceability >Trace > Configuration > select your server > select 'Cisco CallManager' > Uncheck the button for
    'Enable File Trace Log'.


    Also, check if there are unnecessary trace files at c:\ProgramFiles\Cisco\Trace\CCM\*.txt.
       

Refer to Shrink the CDR/CAR Database Size for more information.

Note
: The information applies to both Cisco CallManager 3.x and Cisco CallManager 4.0.

1243
Views
0
Helpful
0
Comments