SQL Server Performance

Logshipping Copy Job Failing

Discussion in 'ALL SQL SERVER QUESTIONS' started by Hrishi_nk, Feb 1, 2012.

  1. Hrishi_nk New Member

    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) ***

    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.
  2. davidfarr Member

    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.
  3. Hrishi_nk New Member

    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
  4. davidfarr Member

    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.
  5. Asheesh pandey New Member

    I was also same problem in logshipping, once we have schedule it proper then it's fine.......
  6. Vandana12345 New Member

    Hey can any one give me some example of insert cursor...
  7. Luis Martin Moderator

    Welcome to the forums!.
    Kindly don't duplicate posts.
  8. Asheesh pandey New Member

    Simple Example of Cursor using AdventureWorks Database is listed here.

    USE AdventureWorks
    DECLARE @ProductID INT
    @getProductID CURSOR
    @getProductID = CURSOR FOR
    FROM Production.Product
    OPEN @getProductID
    FROM @getProductID INTO @ProductID
    FROM @getProductID INTO @ProductID
    DEALLOCATE @getProductID
  9. Vandana12345 New Member

    Thats fyn asheesh. But my quest was can we insert data through cursor in a table.
  10. Jon M Member

    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?
  11. Vandana12345 New Member

    Nups i never try this. And thnx for the info.

Share This Page