05-30-2013 01:18 AM - edited 03-18-2019 01:12 AM
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.
Solved! Go to Solution.
05-31-2013 10:55 AM
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
05-30-2013 01:22 AM
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
05-30-2013 02:27 AM
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?:)
05-30-2013 06:40 AM
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
05-30-2013 06:52 AM
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:)
05-31-2013 10:55 AM
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
02-05-2019 10:06 PM
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.
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: