Here are the steps you will need to take Lets call content DB “MyTESTContentDB”
- Do a database backup for the content db “MyTESTContentDB” from sql management studio
- Go to target DB Server and create a empty database naming “MyTESTContentDB” after the content DB
- Restore the backup from step 1 to empty database create in step 2 “MyTESTContentDB”
- Go to SharePoint server and run following script Dismount-spcontentdatabase “MyTESTContentDB” and type “Y” to confirm
- Run the following script
stsadm -o addcontentdb -url http://local.company.com/mytestsite -databasename MyTESTContentDB -databaseserver TARGETDBSERVER
You will have to input actual URL, actual db name and correct target db server name
Please refer this:http://sharepoint.stackexchange.com/questions/81172/moving-content-db-for-a-site-collection-to-another-db-server