http://blog.csdn.net/pool30000/article/details/6257466
1、查备份文件逻辑名:
restore filelistonly from disk='c:\ ufdata_001_2005 .bak'
2、用命令恢复数据库
Restore database ufdata_001_2005
from Disk='c:\ufDATA.bak'
WITH MOVE 'UFDATA_001_2005_data' TO 'C:\ss.mdf',
MOVE 'UFDATA_001_2005_log' TO 'C:\ss_log.ldf'
3、更改逻辑文件名:(第一次更名,不成功可以取其他的名字)
alter database ufdata_001_2005
modify file(name=UFDATA_001_2005_data, newname=UFMODELa)
alter database ufdata_001_2005
modify file(name=UFDATA_001_2005_log, newname=UFMODEL_loga)
4、更改逻辑文件名:(第二次更名,更成正确的UFMODEL及UFMODEL_log)
alter database ufdata_001_2005
modify file(name=UFDATA_001_2005_data, newname=UFMODEL)
alter database ufdata_001_2005
modify file(name=UFDATA_001_2005_log, newname=UFMODEL_log)