Mdf文件不在窗口Xp中复制 [英] Mdf file not copy in window Xp

查看:73
本文介绍了Mdf文件不在窗口Xp中复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好..



我试图从C:\Program Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \\复制文件\\ data\db.mdf到另一个地方。



但是弹出一条消息



无法复制db:它正由另一个人或程序使用。

关闭所有可能正在使用该文件的程序,然后重试。

我重启了机器但仍然得到了它。没有人使用除我以外的文件。



为什么?谢谢。

Hello..

I tried to copy a file from "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\db.mdf" to a different place.

But a message pop out

Cannot copy db: It is being used by another person or program.
Close any programs that might be using the file and try again.
I restarted the machine but still got it. Nobody use the file except me.

Why? Thank you .

推荐答案

这是数据库文件。几个SQL服务器使用它。这就是发生错误的原因。
你可以下面之一后复制文件

1 =>使用SQL Server Mgmt Studio分离数据库 - >复制文件 - >再次附加



2 =>运行 - > CMD-> Services.msc

- >停止sql server服务 - >并复制数据文件所需的位置 - >启动服务。
This is database file.Several SQL server services used it.That''s why error occured.
You can copy file after one of below
1=>Detach database using SQL Server Mgmt Studio->copy file->attach it again

2=>Run->CMD->Services.msc
->stop sql server services -> and copy data file desired location-> start services.


您好,



您不能只通过selectng复制和粘贴复制mdf文件:)。分离数据库文件后,您需要从数据库中分离文件(因此数据库将处于脱机状态),然后只能将其复制到另一个位置。



系统确实不允许您复制,因为数据库服务器正在为任何数据库事务使用数据库文件(.mdf)。
Hi,

You can not just copy a mdf file just by selectng copy and paste :). You need to detach the file from the database ( so the database would be offline) once the database file is detached then only you can copy to another location.

System does not allow you to copy as your database file(.mdf) is being used by database server for any database transaction.


这篇关于Mdf文件不在窗口Xp中复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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