Hopefully your server has separate spindles for your database’s data and log files. Here is the script to define the default directory / folder for database data and log files in Microsoft SQL Server 2005:
USE [master]
GO
EXEC xp_instance_regwrite N’HKEY_LOCAL_MACHINE’, N’Software\Microsoft\MSSQLServer\MSSQLServer’, N’DefaultData’, REG_SZ, N’ChangeThisToDefaultDataDrive:\data’
GO
EXEC xp_instance_regwrite N’HKEY_LOCAL_MACHINE’, N’Software\Microsoft\MSSQLServer\MSSQLServer’, N’DefaultLog’, REG_SZ, N’ChangeThisToDefaultLogDrive:\log’
GO