views:

59

answers:

1

I recently have been nominated to transfer a CF site from one host to another. While I have completed getting the site up on the new server I now need to set up the DB backup on to the new server. I am looking to find a config file or something similar but no one who had control of the site is being very helpful.

If someone can lead me in the right direction for making this transfer seamless it would be greatly appreciated. Mainly on where to find the DB info to pass into the new DB.

Thank you in advance,

JN

+1  A: 

You're going to need to create a datasource on the destination server via the ColdFusion administrator. Upon setup, it will ask you for the DB credentials -- server name, user name, password, and DB name... there's also some advanced features there that you play with but for getting it up and running they are unimportant.

The key here: somewhere in the site's code, there's going to be reference to the datasource. Up until ColdFusion 9, this had to be provided with each statement. Do some digging through the sight and see if you can come up with this. When you find a CFQUERY, look for the "datasource" parameter to the tag.

Example:

<cfquery name="myQuery" datasource="myDatasource">

In this case, the datasource name would be "myDatasource" (no quotes). You'd probably want to use the same name for the datasource in this case, otherwise you'd have to go through all the code for the site and change it to whatever you have named the datasource on the new server to be.

Many developers, however, might set this as a variable in their application.cfc (or .cfm for older CF versions). In which case you might find something like this:

<cfquery name="myQuery" datasource="#application.datasource#">

In this example, the datasource name is being passed through as a variable, most likely from the application.cfc (or application.cfm) file. You'll need to track that down and find out what it is being set to. The good thing about this though, is that if you can find where that is set, you can easily change the datasource name to whatever you want without having to fish through the code.

Good luck in finishing up the move!

Steve K.
Thanks so much! This worked great although there is a store component that is not working properly. I am getting the following error message when I am on that page. "The .remoting.com.notes name is not a valid component or interface name." I realize this may be a seperate topic. Again all help is appreciated.
jnolte