We have a SQL Server instance with ~200 DBs on it. Each one is log shipped to a remote site. To avoid all jobs going off at once, I've scripted sqllogship.exe to run in 1 job sequentially. Anyway, I am finding that each DB is taking 30 seconds to complete. I have log shipping on servers with ~100 DBs similarly sized and with similar data that works fine, taking seconds on each DB. I have invoked sqllogship.exe from the command prompt and indeed it took 30 seconds. So the problem lies within sqllogship.exe. I thought perhaps these 200 DBs have created a large MSDB that is slowing down sqllogship so I ran sp_delete_backuphistory and eventually deleted everything but the last 30 days, which leaves about 100k records, which is very small compared to the other servers that have a much faster time running sqllogship. I also added some indexes I thought could help (backupset(media_set_id), restorefile(restore_history_id), restorefilegroup(restore_history_id)) but they did not affect the 30 second runtime. What is odd is that it has been 30 seconds exactly on several databases. Another clue is that backupset logs the backups being made by sqllogship.exe as being finished in a second or so...so where are the other 29 seconds coming from? I tried setting verboselevel to 0 in sqllogship but that doesn't help either.
All of our servers have this version:
Microsoft SQL Server 2012 (SP1) - 11.0.3368.0 (X64)
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)