How can you do an index defrag of a log shipping secondary? It's read-only at best. Or do you mean index rebuild on the primary and log shipping copied that over? If the latter caused that error on the secondary, there's something wrong with that DB or server.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability