I need some advise in the log shipping. The log files in the primary server get cleaned up according to what I have specified in the maintenance plan. But the log files that got shipped to the secondary server stay there for ever wasting my hard disc. Will it make any problem if I remove them or can I set it up to remove all files earlier than past 2 hrs? Please advise.
When log shipping, you can delete all of the logs that arrive before the most recent full backup arrives. So if you get a full backup every day at 02:00 and a log file sent every hour, when the new full backup arrives you can delete all 23 of the existing log files.
I do not get full backup everyday. The full backup came only once when I started the log shipping for the first time and then it is all just the transaction log files. Since I never get full backup anymore, can I remove all log files except the latest one?
The way that log shipping works is that you restore a full backup, then apply each log file in order to the database. Each of the log files effectively brings the database "up to the moment" that the log file was finished. If you encounter even one missing log file, you are done, you can't restore any more.
The short answer is that you need to keep your most recent full backup, plus all of the log files generated since then.