Monday, July 12, 2010

Stored procedure to Attach Database in SQL Server 2005

just write given sp in new query window

sp_attach_single_file_db
@dbname= 'databasename', @physname= '.mdf file path'

and execute that
ur database will be successfully created

No comments:

Post a Comment