因为只有mdf文件,想恢复数据库,大家可以用下面的代码先测试
在查询中执行下列语句
EXEC sp_attach_single_file_db @dbname = 'tggov_Data',
@physname = 'E:\tggov_Data\www.jb51.net.MDF'
'tggov_Data'
为恢复的数据库名
'E:\tggov_Data\tggov_Data.MDF'
物理文件位置
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn