Hello all,
I am new to SQL server and I am looking for a good solution to :
- archive (and delete) rows from multiple tables to one archive file every month.
- on demand, restore an archive to its origin table.
Tables have different columns but I would like to select them all.
Each table has a column containing a date in order to archive rows older than 6 months (example).
The big deal is that I cannot reconfigure my DB to use partition. Also, I must use Control-M to schedule the archive task.
If I am not wrong, bcp is not suitable as I have n tables for 1 archive.
Partition is not suitable as I cannot modify BD.
So, last solution is to use DELETED statement somehow, then DUMP the temp tables created from DELETED. To restore an archive, I may load the archive and then copy rows from temp tables to their origin tables.
Can you please tell me the best way to do it for a production environment?
Also do not hesitate to illustrate your answers with beautiful SQL commands :)
Thanks for your help and sorry if my English is too bad.