更新时间:2023-02-12 23:17:49
BACKUP DATABASE
适用于 所在的数据库 在SQL服务器内,而不是在你的项目文件夹中:SQL服务器实例不太可能在生产中访问你的项目文件夹。
由于文件在您的计算机中,为什么不以旧的传统方式备份它? File.Copy应该这样做......
BACKUP DATABASE
is intended for databases that are inside SQL server, not in your project folder: the SQL server instance is very unlikely to have any access to your project folder in production.
Since the file is in your computer, why not back it up the old, traditional way? File.Copy should do it...