cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2759
Views
10
Helpful
6
Replies

Clean up TMS database.

almelnikov
Beginner
Beginner

How can I clean up the database? Due to the license I have 4GB for MS SQL and the database and I have no free space (4095 from 4096). TMS is only used for Global Address Book provisioning and I think that can be a lot of useless data in it.

1 Accepted Solution

Accepted Solutions

Hi

use tmsng

DELETE FROM ScheduledCall WHERE EndTime <= '2013-05-20'

Always backup your database just in case before running this. Change the date as it will delete all entries with and endtime prior to the date you define, so in this case it will keep all entires with an endtime above 20th of may which would be the latest.

use tmsng

DELETE FROM ScheduledCall

Use this to clear up the whole table.

/Magnus

View solution in original post

6 Replies 6

Magnus Ohm
Cisco Employee
Cisco Employee

Hi

TMS collects CDRs from endpoints and if you have audit logging enabled and do not have a purgeplan for this then the database will fill up.

Go to TMS Server Maintenance in the TMS web interface (admin tools --> TMS Server Maintenance) and enable the database log purgeplan, you can set it to keep data for 1 day. Remember to check the checkbox as this enables the purging.

/Magnus

Hi Magnus!

Audit is disabled and no CDRs are on the TMS. I found out that the Table named Sheduled Call Log is about 1,5GB and number of entries in DB is very big (something about 160k). I set the number of days to keep data to 1 but nothing has happened yet. How soon will the server clean these logs? Other logs are no more than 150MBs so may be there is another data I can remove?:)

Hi,

No CDR´s in TMS.. hmm

Yea the scheduled call log is probably because you have the ad-hoc discovery mode set to on. I am sure it is something else as well. How many endpoints is added to TMS?

It takes 24 hours, but I do not beleive it can delete all the records in one go, from previos experience it deletes a portion at a time. Or you can run an SQL query to delete the logs in the database table manually. I can give you the query if you want it, its just a simple delete from

query.

/Magnus

250 EPs in GAB.

Yes, can you give me the script that can remove the logs from the table. If it is possible to set the time so that the logs not older than...would not be deleted it would be great:)

Hi

use tmsng

DELETE FROM ScheduledCall WHERE EndTime <= '2013-05-20'

Always backup your database just in case before running this. Change the date as it will delete all entries with and endtime prior to the date you define, so in this case it will keep all entires with an endtime above 20th of may which would be the latest.

use tmsng

DELETE FROM ScheduledCall

Use this to clear up the whole table.

/Magnus

Can someone help me clean up the Log DB files. Currently mine is 170GB and want to clean it. I have the Log Purge plan setup for 30 days but seems not like it is running. Cant the see the process in the Activity Status.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers