exec sp_attach_db @dbname = N'EMployeeDB',
@DataBasefile1 = N'C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Data\EMployeeDB_Data.mdf',
@DataBasefilename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Data\EMployeeDB_log.ldf'this query helps you to attach the database without using any wizard
