Sorry if this is posted, but I couldn't find it. I've got a simple SQL 2005, single file database which includes the .mdf,.ndf and .ldf. I need to move the log file. I've found the following online:
Detach the database
use master
go
sp_detach_db 'mydb'
go
Move the file(s) and Reattach the database
use master
go
sp_attach_db 'mydb','E:\Sqldata\mydbdata.mdf','E:\Sqldata\mydblog.ldf'
go
:-k Question - perhaps obvious, do I change the attach statement to include the .ndf? I'll only be moving the .ldf.
thanks in advance
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!