CREATE DATABASE Database_1b ON PRIMARY (FILENAME = 'c:\Database_1a.mdf') FOR ATTACH GO SELECT name, database_id FROM sys.databases EXEC sp_helpdb @dbname = N'Database_1b' GO