• goher2000 - Friday, March 9, 2018 2:24 PM

    goher2000 - Friday, March 9, 2018 2:20 PM

    Jeff Moden - Friday, March 9, 2018 2:13 PM

    goher2000 - Friday, March 9, 2018 1:31 PM

    you can probably avoid additional resources used by power-shell by simply mapping the drive on the destination server through tsql and restore the backup, you do not even need to copy file

    exec xp_cmdshell "net use x: \\sourceserver\backupdir /user:domain\user password"
    go
    restore database demodb from disk='x:\demodb.bak'
    go
    exec xp_cmdshell "net use x: /delete"
    go

    GOD NO!!!!   NEVER EVER PUT A PASSWORD IN CLEAR TEXT!!!!

    well you dont  have to if you give permission to service account of your destination server  on backup folder..

    another way, you can create credentials and use them

    I never tried but you might be able to run it using 

    EXECUTE AS