Which tools to use to backup SQL servers to csv files and delete?

1

I need an app which can do the following tasks:

  1. Log in into an SQL database (Microsoft, Oracle, etc.)
  2. Find the oldest data in some tables (can do with query; the tables have a "datetime" field)
  3. Save these data into a csv file
  4. Delete these data from database
  5. Repeat aumatically after X minutes

I searched for backup apps and couldn't find anyone which would do these steps. They normally simply do scheduled backups of the entire database or from data inserted since the last backup and I want something specific for just some tables. Moreover they usually don't erase the data and I need that to be done. Preference for freeware.

Momergil

Posted 2019-06-04T12:50:21.703

Reputation: 511

Previously I would have done this with Powershell. Have you considered doing this with Microsoft Flow? – pholcroft – 2019-06-05T05:40:12.423

@pholcroft well I was thinking about using an existing solution in case there were any. After all this seems a relativaly basic procedure. But if I need to do it myself, I'ld prefer to code a windows service instead. – Momergil – 2019-06-25T14:54:56.260

1I think powershell, agent jobs, microsoft flow are the existing solutions for this. You can script what should happen and set it to repeat regularly. I have done something very similar to this using a Windows Service which worked great, but with hindsight was overkill (I did it this way as I was experienced in C# / Windows Services and SQL Connections. If I were you I'd start with trying a SQL Agent Job. – pholcroft – 2019-06-26T08:18:31.160

No answers