USE master; GO CREATE DATABASE CardioScansEerver ON (FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\CardioScanServer.mdf'), (FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\CardioScanServer.ldf') FOR ATTACH; GO
注意,执行命令之前需要把mdf与ldf放在命令指定路径下。