Jump to content
Sign in to follow this  
vchris

ColdFusion/SQL problem

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I don't have any access to the CF panel or the CF server but I will let them know about the cache.

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Glad you guys found solution.:-D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...