I was able to set up log shipping from Primary to Secondary database. I need then to cleanup some old data from Primary database but I need that data in Secondary for reporting.
So my idea was to stop logs backup job, clean up data in Primary and truncate transaction log, so that delete commands will never get to the Secondary database and then restart log shipping process.
It seems, however, that doing just
DBCC SHRINKFILE(Primary_log,1)
is not enough to remove delete commands from transaction log and they are executed on Secondary.
I tried repeat the process but switch Primary to Recovery Model Simple and back to Full again to clean the log. This seems to break log sequence number (LSN) chain thus breaking the restore job and whole process.
So, is there any possible way to skip cleanup delete commands without breaking log shipping process?
Thanks,