CREATE DATABASE DBname ON (FILENAME = 'D:\SalesData\DBname_data.mdf') FOR ATTACH_REBUILD_LOG ; GO
简单好用