How can I backup a remote SQL Server database to a local drive?

前端 未结 23 1573
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 16:20

I need to copy a database from a remote server to a local one. I tried to use SQL Server Management Studio, but it only backs up to a drive on the remote server.

Som

23条回答
  •  不知归路
    2020-11-30 17:11

    First, grant full control permissions to a local path on your machine (as shown below) with Everyone. (Or alternatively grant permissions specifically to the SQL Server Agent account).

    Second, execute the following:

    BACKUP DATABASE [dev] TO  DISK = N'\\myMachine\c\dev.bak' WITH COPY_ONLY, INIT;
    

提交回复
热议问题