.

sql command for attaching database in SQL Server

USE [master]
GO
CREATE DATABASE cliniweb ON
( FILENAME = N'C:\work\NHS\Kings Colleage PHASE 1\old database\cliniweb.mdf' ),
( FILENAME = N'C:\work\NHS\Kings Colleage PHASE 1\old database\cliniweb.ldf' )
 FOR ATTACH ;
GO

/* verify as follows */
select name from sys.databases
go

What's your thoughts on this?

*

Protected by WP Anti Spam