Thursday, April 9, 2009

Sql data base attach with query

sp_attach_db 'DATABASENAME' 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.dbfile.mdf'



this query will attach a database if you have .mdf file.. but it will create .ldf file so

first check weather .ldf file is Exist there or not.

a log file create by sqlserver.

Thank you for visit my Blog...

and Happy summer ....

No comments:

Post a Comment