Saturday, September 1, 2012

Move SQL Server 2008 Databases


use master
go

sp_detach_db 'mydb'
go

sp_attach_db 'ShowsTix',
'C:\Data\mydb_log.ldf',
'C:\Data\mydb.mdf'
go

use mydb
go
sp_helpfile
go

No comments: