如何复制mdf文件 [英] how to copy mdf file

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

问题描述

如何复制mdf或ldf文件而不将其与sql服务器分离或不停止连接?

how can i copy an mdf or ldf file without detaching it from the sql server or without stopping the connection??

推荐答案

手动打开SQL Sever Management Studio并右键单击要复制的数据库

-选择任务"然后选择备份"并进行备份.

-右键单击数据库"

-选择还原数据库"

-输入新数据库的名称(您的复制目标),然后选择要复制的数据库作为源数据库

-点击确定" (SQL Server从备份创建一个新数据库,这意味着您实际上已复制了原始数据库).

据我所知,不可能直接复制而不分离.
Manually open SQL Sever Management Studio and right click on the database you want to copy

- select "Tasks" and subsequently select "Backup" and do a backup.

- right click on "Databases"

- select "Restore database"

- Enter the name of a new database (your copy target) and select the database to be copied as source database

- click "OK" (SQL Server creates a new database from the backup which means that you actually copied the original database)

Directly copying without detaching is not possible(as far as I know.)


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

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