master - shut down the server, move the files, then restart the server using
the -d and -l switches. See SQL Server Startup Options in BOL. You could
also do a backup and RESTORE WITH MOVE (so long as you start the server in
single-user mode using the -m switch).
model - do a backup and use RESTORE WITH MOVE. See RESTORE in BOL for
msdb - I think sp_detach_db and sp_attach_db might work, but you could also
do a backup and RESTORE WITH MOVE.
tempdb - see Keith's post.
QualChoice of NC
> Has anyone tried moving system databases (master, model, msdb, tempdb)
> C drive to D drive. I have only 330 MB left on C drive. Problem arose
> week when temdb log file got huge and filed up all the spaces in C drive.
> Since I have over 6 GB left in D drive and for consistency purposes, I
> like to move my system databases to D drive where all the user databases
> are. I know I can't use backup and restore for tempdb. I have not been
> able to come up with any other way to do it. Any help in this matter will
> be greatly appreciated.
> Thanks, Biva