MySQL Forums
Forum List  »  Microsoft SQL Server

convert MSSQL job to MySQL
Posted by: Craig Tompkins
Date: May 02, 2013 12:10PM

I have an application that dumps logs into 2 databases. They have been on MSSQL for years and I recently needed to move them to MySQL. In MSSQL 30 days worth of logs would be 150GB. So I had a job running at night that trimmed everything older than 30 days, then did a backup with truncate_only and a shrink log as such:
DELETE FROM ESSyslogMain WHERE recorddate < getdate()- 30
backup log syslog with truncate_only
DBCC SHRINKFILE(syslog_log, 1)

How can I accomplish this in MySQL?
DELETE FROM ESSyslogMain WHERE recorddate < curdate()- 30
seems to take care of the first line, but I'm stuck after that.

Can anyone tell me the code "conversion" for the 2nd and 3rd lines? Can anyone tell me how to schedule a job in MySQL? I have version 5.2.47CE of the workbench installed.
TIA
Craig

Options: ReplyQuote


Subject
Written By
Posted
convert MSSQL job to MySQL
May 02, 2013 12:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.