如何在pendrive中使用sql mdf文件 [英] how to use sql mdf file in pendrive

查看:97
本文介绍了如何在pendrive中使用sql mdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在pendrive中使用sql mdf文件,我尝试使用AttachDbFilename但是它在一段时间后会破坏,请指导我如何使用pendrive中的mdf

use sql mdf file in pendrive, I tried using AttachDbFilename but it currupt after some time, please guide me how to use mdf from pendrive

推荐答案

基本上有使用笔式驱动器中的数据库文件没有错。关键是要确保在删除数据之前将数据正确写入驱动器。所以使用数据库文件的顺序应该是:

- 连接笔式驱动器

- 附上数据库文件

- 使用它

- 分离数据库文件

- 安全地移除笔式驱动器(指示Windows将其拆下)



原因因为腐败可能是所有数据在断开连接之前没有成功写入笔式驱动器。



要了解有关腐败原因的更多信息,从SQL Server调查错误日志。
Basically there is nothing wrong in using a database file from a pen drive. The critical thing is to ensure that data is written correctly to the drive before removing it. So the sequence to use the database file should be:
- connect the pen drive
- attach the database file
- use it
- detach the database file
- safely remove the pen drive (instruct Windows to detach it)

The reason for the corruption could be that all the data wasn't successfully written to the pen drive before it was disconnected.

To find out more about the reasons for the corruption, investigate the error log from the SQL Server.


这篇关于如何在pendrive中使用sql mdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆