remote drive recovery

  • Hi all,

    I would like to recover database from live to development using a backup from a remote drive.

    I do not know how to make sql recognize there is a new remote drive.

    Did you ever du this?

    Could you help

    Thanks

    Lmt

  • You can map the netword drive of the remote server from within SQL by using xp_cmdshell.

    Do

    exec master.dbo.xp_cmdshell 'NET USE X: \\Rem_Server\Remote_Path LoginPassword /User:Domain\user'

    Then you can restore from that path by

    restore database DBName FROM DISK = 'X:\BackupName.bkp'

    Or with out mapping any network, with admin rights, you can:

    restore database DBNAme FROM DISK = '\\Rem_Server\d$\Rem_Path\Backup_File.bkp'

  • Thank you.Done

    LMT

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

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