Restore from network location

  • Hello to all. This is the case. I run backups from each of my SQL Servers to a network location using UNC (\\etc, etc\etc\etc.bak)

    This tasks run fine, but now, I need to restore a database from a production nackup to a test server and the UNC cannot be found. Even though a backup from the test box is run nightly to the network lcoation.

    If I use EM to run the restore and I got to the step to choose device location, I cannot see the network drive where I have my backups. It was OK before upgrade the server from Win 2000 to Win 2003, is there any setting I need to run to be able to see the mapped drive? The drive is mapped to the test box, the account used by SQL Server services has domain rights as admin. In the mapped drive on the test box I can read, create folders, etc but SQL Serveer cannot see the mapped drive. Backup wizard from EM shows only the local drives and the location wher the database files are located (by the way they are also in a network drive!)

    Your help is and will be very much appreciated. Thank you

  • This was removed by the editor as SPAM

  • Fernando

    Try doing your restore with T-SQL.  Something like this:

    RESTORE DATABASE MyDB FROM DISK='\etc\etc\etc.bak'

    John

  • I have the same issue.

    I tried the transactSQL method offered by John -

    RESTORE DATABASE MyDB FROM DISK='\etc\etc\etc.bak'

    but received these errors:

     

    Server: Msg 3101, Level 16, State 1, Line 1

    Exclusive access could not be obtained because the database is in use.

    Server: Msg 3013, Level 16, State 1, Line 1

    RESTORE DATABASE is terminating abnormally.

    - djq0262

     

  • hi Doug, I resolved the problem by creating a backup device and then I can do the staright restore form EM. In any event, the syntax for UNC names should be

    \\etcserver\etclocation\etc.bak the double \\ is critical to be able to read the remote location

    Restore implies you have exclusive use of the database to restore it. If still a connection to the datbase the result will show the error message you printed.

    I created a quick kill all connections to the database I am restoring to ensure there is no user connections at the restore time. I do not know if there is one like that in SQLServerCentral. If interested, give a buzz and I will forward it to you.

    so when I run the restore I just type

    exec usp_killallprocesses 'MyDB'

    go

    exec usp_restoreDB 'MyDB', 'etclocation'             where the location name is identified by my restore procedure

     

    Good luck and feel free to drop any question, if known I will forward the answer.

     

    Fernando

Viewing 5 posts - 1 through 4 (of 4 total)

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