I had configured logshipping on our production databases.And all the jobs(restore/copy/backup/alert) were running fine on both primary and secondary servers.Restore on secondary was also running fine.Now suddenly all jobs are running except Copy job on secondary server.It s failing with an error Error: The network path was not found. (mscorlib) *** ----- END OF TRANSACTION LOG COPY ----- I checked all the permissions on shared path on primary as well as local path on secondary.The user: logshipadmin which i had created has full control over the folders. I checked the error logs and event viewer.And one thing as the tlog backups are very large in size resotore is taking time. Thats the other issue.But i couldnt figure out why the copy job is failing.
I do not think this is a folder permissions problem. If it was, your error message is more likely to return "Access Denied" instead of "path not found". My first guess here is a network timeout during the copy. You mention that the files have become increasingly large. How large ? How fast is the network line between servers and what other network traffic uses that line ? Do multiple logs ship at the same time on separate jobs ? If you have several large files all copying at the same time across the same network line, it can very easily timeout, returning the error that you see. I have not done much log shipping myself, but I have had a remote server that received large report files, located at another site across a VPN. When that network line became congested due to traffic, weather, ISP problems, I would sometimes get a "network path was not found" error on copy jobs.
Thanks David for the reply.I guess its a network issue because the job is sometimes succesfully executed and log files are getting copied.As you mentioned Do multiple logs ship at the same time on separate jobs you mean to say i need to execute the same step in LS_Copy by creating multiple jobs
Not really what I meant, no. I was saying that "multiple logs ship at the same time on separate jobs " might be causing the problem. If it is a network issue, and if you have multiple jobs, then schedule the jobs to run at different times, or create one job that ships all files one at a time after each other. However you do it, you should try to ensure that there is never more than one log file being copied over the same line at the same time.
Simple Example of Cursor using AdventureWorks Database is listed here. USE AdventureWorks GO DECLARE @ProductID INT DECLARE @getProductID CURSOR SET @getProductID = CURSOR FOR SELECT ProductID FROM Production.Product OPEN @getProductID FETCH NEXT FROM @getProductID INTO @ProductID WHILE @@FETCH_STATUS = 0 BEGIN PRINT @ProductID FETCH NEXT FROM @getProductID INTO @ProductID END CLOSE @getProductID DEALLOCATE @getProductID GO
Hi Vandana12345, You might want to try using insert into...select statement which I believe is way faster instead of inserting data using cursor. Also, did you try putting a delay/waitfor on your log shipping copy script?