Recently I had to move all databases including the content database in a MOSS 2007 farm from one SQL server to another. I tried few methods and found the following steps are the easiest:
[Assumption: All databases in the farm are on one SQL server and the SQL server was not assigned to any other roles]
[Assumption: WSS/MOSS was installed on a single box - the new SQL server name will be "NewSQL"]
select ID from objects
where parentid = (
select Id from objects
where name = 'NewSQL')
SET parentid = 'InstanceID_GUID'
WHERE id IN
FROM objects o
INNER JOIN classes c on c.id = o.classid
WHERE c.Fullname LIKE '%Administration.SPConfigurationDatabase%'
OR c.Fullname LIKE '%Administration.SPContentDatabase%'
[Disclaimer] The methods stated above are just how I did and provided as is for informational purpose only and I have not tested them in production environment and do not know if they are supported methods.