如何在 XP 中备份本地 SQL Server 数据库?

发布于 2024-10-23 20:09:10 字数 714 浏览 5 评论 0原文

我在我的 PC 上开发了一个 ASP.NET 3.5 网站,

为了在我使用的主机上部署数据库,他们要求我使用数据库备份“恢复”它。

如何在运行 XP 的 PC 上创建数据库备份?

在 Visual Web Developer 中有什么方法可以做到这一点吗?我还下载了 SQL Server 配置管理器,但没有看到备份选项。

任何帮助表示赞赏!

(Visual Web Developer Express 与 SQL Server Express 2005)

谢谢。

编辑
我的解决方案感谢以下答案:
就在 Visual Web Developer Express SQL 窗格中,我执行了该语句 -

BACKUP DATABASE [C:\Mysite\App_Data\ASPNETDB.MDF] TO DISK = N'C:\Backup.bak' WITH NOFORMAT, NOINIT, NAME = N'YourDB-Full Database Backup', 
SKIP, NOREWIND, NOUNLOAD, STATS = 10;

这创建了备份,并带有一些警告,不太确定它们的含义,因为它提到了我不熟悉的“缺失列”。将数据库上传到主机后,看起来一切都在那里,我将能够很快对其进行测试,如果我做错或错过了什么,我将进行更新。

I have developed an ASP.NET 3.5 website on my PC

To deploy the database on the host I use, they require I "restore" it, using a backup of the database.

How do I create this back up of my the database on my PC running XP?

Is there any way to do this in Visual Web Developer? I also downloaded the SQL Server Configuration Manager but I see no option for a backup.

Any help is appreciated!

(Visual Web Developer Express with SQL Server Express 2005)

Thank You.

EDIT
My solution thanks to the answers below:
Right in Visual Web Developer Express SQL pane I executed the statement -

BACKUP DATABASE [C:\Mysite\App_Data\ASPNETDB.MDF] TO DISK = N'C:\Backup.bak' WITH NOFORMAT, NOINIT, NAME = N'YourDB-Full Database Backup', 
SKIP, NOREWIND, NOUNLOAD, STATS = 10;

This created the back up, with some warnings, not really sure what they meant as it mentioned "missing columns" that I am not familiar with. After uploading the database on the host it looked like everything was there, I will be able to test it soon an will update if there is anything I did wrong or missed.

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

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

发布评论

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

评论(2

撞了怀 2024-10-30 20:09:10

您应该能够通过 Management Studio 中的 GUI 来完成此操作,或者调整以下脚本并运行。

BACKUP DATABASE [YourDB] TO  DISK = N'C:\Backup.bak' WITH NOFORMAT, NOINIT,  
NAME = N'YourDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10

您特别有可能需要将文件路径调整到服务帐户有权写入的位置(MSSQL 目录中的 Backup 文件夹是一个不错的选择)。

You should be able to do it through the GUI in management studio or adust the following script and run.

BACKUP DATABASE [YourDB] TO  DISK = N'C:\Backup.bak' WITH NOFORMAT, NOINIT,  
NAME = N'YourDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10

It is particularly likely that you will need to adjust the file path to somewhere that the service account has permissions to write to (The Backup folder in your MSSQL directory is a good bet).

游魂 2024-10-30 20:09:10

如果您不这样做,请获取 SQL Server Management Studio 2008 R2(仅选择管理工具)没有它。它将帮助您管理数据库。 UI很容易驱动——将左边的树展开到需要的数据库,然后右键->备份数据库

Get SQL Server Management Studio 2008 R2 (choose Management Tools only) if you don't have it. It will help you manage your database. The UI is easy to drive - expand the tree on the left to the database required, and right-click -> Backup Database

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