VS 2010 & 2010 SQL Server 2008:我正在尝试备份我的数据库(.mdf 文件),但不知道如何备份
我在我的网站的 App_Data 目录中创建了一个 .mdf 数据库。但我不知道如何备份它。我打算将其复制/粘贴到另一个驱动器,但不确定这实际上是否像我希望的那样安全地备份它。我知道 SQL Server 2008 有一个备份选项,可以创建 .bak 文件和所有内容,但我似乎无法将我的数据库附加到那里,然后能够执行此操作。任何帮助将不胜感激!
I have a .mdf database I created in my App_Data directory for my site. I'm not sure how to back it up however. I was going to just copy/paste it to another drive but not sure that's actually backing it up as securely as I'd like. I know SQL Server 2008 has a back up option that creates a .bak file and everything but I can't seem to get my database to attach there and then be able to do that. Any help would be greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
打开 Sql Server Management Studio (SSMS)。通过选择 mdf 文件附加您的数据库。它也应该拉入您的 ldf 日志文件。然后,您将能够在对象资源管理器中右键单击数据库,并在任务下将数据库备份到 bak 文件中。
Open up Sql Server Managment Studio (SSMS). Attach your database by selecting the mdf file. It should pull in your ldf log file as well. Then you will be able to right click the database in object explorer and under tasks you can backup your database into a bak file.