Wednesday, March 28, 2012

moving transaction log file to another disk

Hi all,
I have to give support to this new client of ours and the system out there was a real mess.The log files for all four databases were ranging from 5 to 9 GB's, no maintanance no nothing was done since the setup of the system. I have truncated the logs after taking proper backups since it all started after they compalined a DTS was not working, which was due to no disk space available ;).
Now I have to shift the log files to a seperate disk.
I know it can be done by detaching the database and attaching it back, I was wondering if we can do it without bringing the system offline?
Anycomments welcome.
Thankyou.
regards,
harshal.Backup db and restore it like this one:

RESTORE DATABASE testDB
FROM disk='f:\testDB.bak'
WITH RECOVERY,REPLACE,
MOVE 'testDBLog' TO 'F:\testDB.LDF'

No comments:

Post a Comment