Great Step by step…
How to change the location of a Windows SharePoint Services 3.0 content database
http://www.wssdemo.com/Pages/db.aspx
This is a necessary step where a client has a default OEM installation on the server…
I had one that's been bugging me the last couple of weeks, and the DB was close to 2 GB!!! We needed to move the DB over to the Data drive to free up space on the system partition. At first I could not connect to the SQL DB, finally today, I was able to connect using the sqlcmd utility and away I went.
Finally done, and I think for the most part the server is clean again, for now!