asp .net页面备份sql数据库

发布于 2024-08-08 01:43:46 字数 181 浏览 1 评论 0原文

我正在尝试创建一个 asp .net 页面来从共享服务器上的远程主机备份和下载 mssql 数据库。 我尝试使用 SMO 创建备份并将其保存在与 .aspx 页面相同的文件夹中,但它引发了访问被拒绝异常,我后来发现 sql 服务器没有权限在除其本地备份文件夹之外的任何地方写入备份我无法从那里下载。

有没有其他方法可以使其正常工作?

I'm trying to create an asp .net page to backup and download an mssql db from my remote host on a shared server.
I tried using SMO to create a backup and save it the same folder as the .aspx page but it throws an access denied exception, I later found out that the sql server doesn't have permissions to write backups anywhere but its local backup folder which I can't download from.

Is there any alternative method to get this working?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听你说爱我 2024-08-15 01:43:46

您不能让 ASP.NET 页面从备份位置读取文件并将该文件流式传输给您吗?

当然,您可能需要与您的主人讨论此事。他们可能会明确阻止您的网站访问 SQL Server 文件夹。他们为什么不为您提供备份?我用于共享 SQL Server 托管的主机在执行此操作时没有任何问题。

Can't you have the ASP.NET page read the file from the backup location and stream the file to you?

Of course, you might have to talk to your host about this. They could be explicitly blocking your web site from accessing the SQL Server folders. Why won't they just provide a backup for you? The hosts I've used for shared SQL Server hosting have no problems doing this.

辞取 2024-08-15 01:43:46

您可以尝试使用SSIS创建包完成备份作业,完成文件传输。然后创建一个 Web 服务来与 SSIS 包进行通信。然后使用您的 Web 应用程序调用 Web 服务来启动所有操作。

You may try to use SSIS to create package finish backup job, finish file transfer. Then you create a web service to communicate with SSIS package. Then use your web application call web service to start all action.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文