CREATE DATABASE XMS_Standar on (FileName='D:DBSXMS_Standar.mdf') FOR ATTACH_REBUILD_LOG; exec sp_detach_db 'XMS_Standar'