Jump to content

ColdFusion/SQL problem


vchris

Recommended Posts

Ok I find this problem very weird.I have a Live and Dev version of a site. On this site a query is done by the user and then data is displayed depending on the region the user chose. On the Dev version of the site the numbers are perfect but on the Live version the numbers are incorrect. I've checked with the Databasa guy here and the Live and Dev databases for this query site are exactly the same. I can't simply upload the Dev pages to the Live and see what the results would be.I was testing something with our database admin here. There are 10 tables that are on the Live that aren't on the Dev. If we import those tables to the Dev the numbers from the query become the same as the Live version (incorrect). So we then decided to rename the tables on the Live site to see if the query would display the correct numbers. We only got a CF error which indicated it couldn't find the tables. Then we renamed the tables on the Dev, no errors at all and the numbers are correct again.I don't understand why if we remove the tables on the Dev we get no errors and correct numbers and if we do the same on the Live we get errors.We are running CF 7.

Link to comment
Share on other sites

hmmmm, that is a little hard to follow. But if your dev site is not returning the same results of your life site, then your databases are not synchronized. I'm not going to play conspiracy theorists here, but the database person might have had ODBC pointers wrong on dev - pointing who knows where to who knows how old data - and then when going back or reverting back to the way it was just before your little experiment, he/she could have subconsciously corrected the the problem by reassigning and configuring ODBC connections correctly.Is your application.cfm file programmed to sniff out the environment that it is being executed on?

<!--- dev server settings ---><cfif #cgi.http_host# IS "dev.yourdomain.org">blah blah blah<!--- test server settings ---><cfelseif #cgi.http_host# IS "test.yourdomain.org">blah blah blah<!--- live server settings ---><cfelse>blah blah blah</cfif>

Set your environmental variables in the respective places and you can move your application.cfm file up and down as much as you like - at least unless there is some major changes going on - then that should be done entirely seperate anyway.I'm not sure how much help that is, but maybe something to look into.Let me know if you think of or learn anything else that might clarify the issue. Right now it just seems to be an DB configuration issue that was never really right.

Link to comment
Share on other sites

We kinda got it resolved yesterday. Now both Dev and Live have the same data displayed. It's the old one but it'll done for now. I still don't quite understand why they were different since both Dev and Live are an exact copy. The DB admin copied the tables over many times.

Link to comment
Share on other sites

The only thing I can think of that the CF code might have cached queries or even the CF admin has cached templates turned on. Still hard to completely tell without witnessing it first hand.

Link to comment
Share on other sites

The only thing I can think of that the CF code might have cached queries or even the CF admin has cached templates turned on. Still hard to completely tell without witnessing it first hand.
That would explain some of the data we've been getting. The DB administrator thought about that also. I got a meeting tomorrow about this problem so I'll ask my boss to look into clearing the CF cache from the CF admin panel.
Link to comment
Share on other sites

That would explain some of the data we've been getting. The DB administrator thought about that also. I got a meeting tomorrow about this problem so I'll ask my boss to look into clearing the CF cache from the CF admin panel.
Make sure you look at template cache and cached queries. Sometimes CF administrators check "Trusted Cache" and "Save Class Files" especially in the production environment. Unchecking these and then clicking the "Clear Template Cache Now" button can sometimes clear things up - this in the "Server Settings > Caching" section in the CF Admin tool. Sometimes starting and stopping the ColdFusion Service will also do the trick, but if it still acts funny, try this:Locate your ColdFusion Server Installation folder for classes:e.g. C:\CFusionMX\wwwroot\WEB-INF\cfclasses
  • Make a backup of all the (*.class) files in a separate folder.
  • Stop the ColdFusion Application Server
  • Delete all (*.class) files in the "cfclasses" folder specified in above.
  • Start the ColdFusion Application Server

Be sure to give the ColdFusion application server time to start completely. Here is an article that has some other things to try and/or consider:http://www.adobe.com/devnet/coldfusion/art...cacheclear.html

Link to comment
Share on other sites

RESOLVEDThe new database created for this year had a different structure than the previous year. The solution was that we took last years DB and updated it with new data. It's still pretty weird the way it still worked...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...