Are you also stuck with that stupid limited express edition of SQL Server 2005, which has no GUI whatsoever?
Well, I already tried the hassle of installing the Management Studio of the full blown SEL Server once – and I don’t feel like doing that any time again. So there has to be a better way.
OK – so check out the SSEUtil and with just:
SSEUtil.exe -s .\SQLEXPRESS -attach Northwnd.mdf
we get our beloved Northwind Database in SQL Express!
Wow – this is slick!
UPDATE:
OK, the excitment settled pretty quick – seems like I cannot access that attached Database from anywhere. This makes attaching databases kinda useless.
Anyway, I figured another approach – and this time it’s for real. Try:
%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn>SQLCMD.EXE -S.\sqlexpress -E -iattach.sql
where ‘attach.sql” contains the SQL to attache a database: