— If you need to move a logfile onto another harddrive, you can do it this way.
— If this command just keeps running, then it properly is because there is connection against the database
ALTER DATABASE <Databasename> SET SINGLE_USER
— Now you can move the log file to the new location.
/*XP_CMDSHELL ‘COPY <source location\filename> <destination location\filename>*/
SP_ATTACH_DB ‘<Databasename>’, ‘<Data filename>’, ‘Log filename’