Restore on remote server gives [SQLSTATE 42000] (Error 7399)

  • Hello again,

    Yes, I am still working on problems with shipping a database backup to a remote server (its a background task of mine).

    I have a job with three steps, the first backs up the database on the production server, the second step uses Xcopy to copy the backup to a mapped drive pointing at the backup server, and the third executes a stored procedure on the backup server which restores the database to that server.

    This all works fine when I run it from EM, logged in as SA.

    When the job runs at night however, I get the following error...

    Executed as user: sa. OLE DB provider 'SQLOLEDB' reported an error. [SQLSTATE 42000] (Error 7399)   [SQLSTATE 01000] (Error 7312)  OLE DB error trace [OLE/DB Provider 'SQLOLEDB' IDBInitialize::Initialize returned 0x80004005:   ]. [SQLSTATE 01000] (Error 7300).  The step failed.

    Looking around on this forum, reasons for this error seem to be linked to resource availability. Insufficient rights to resources or resource timeouts.

    I have already increased the remote connection query timeout to 900, might try a further increase to 1200.

    I can't understand why the job works when started manually, but not when started from the schedule.

    Any ideas please?

     

    David

    If it ain't broke, don't fix it...

  • Hi Dave,

    what accounts are your sql server and sql agent running under, this sounds like a security issue which generally means that the sql agent doesn't have the correct set of permissions to do the job.

    When you connect to it and run the job it runs under the context of your account, when it's scheduled it runs under the sql agent account, if this account doesn't have the access to do what you need then it will always come back with a fail.

    Hope this helps,

    Mike

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply