I've done this, and it worked well. Before I set my DSN, I did a cfquery, "Select "foo" as bar from myTable"
Another way to do it is to write a custom tag wrapper for <cfquery>, and call it as you would cfquery: <cf_failoverQuery name="myQuery" datasource="dsn1,dsn2">. The internals of the custom tag do a try, and if the query fails, they use dsn2. I've done things like this, too, and they also worked well, with little extra overhead. Jamie On Tue, 24 Jun 2003 13:23:07 -0700, in cf-talk you wrote: >wow - thank you all so much for the useful info. I do like the idea of the >external app. I wonder if an app like that could be used for load >balancing - but of course my VB and C++ skills suck. >Cheers > >Richard >----- Original Message ----- >From: "Jim McAtee" <[EMAIL PROTECTED]> >To: "CF-Talk" <[EMAIL PROTECTED]> >Sent: Tuesday, June 24, 2003 1:13 PM >Subject: Re: Database Availability > > >> Assuming you're using an ODBC datasource... How about an external >application >> this is constantly checking the availability of the databases in question, >and >> modifies the ODBC DSN to point at a working one? >> >> >> ----- Original Message ----- >> From: "admin" <[EMAIL PROTECTED]> >> To: "CF-Talk" <[EMAIL PROTECTED]> >> Sent: Tuesday, June 24, 2003 1:33 PM >> Subject: Database Availability >> >> >> > I hope that this isn't a stipid question but I'm sure it must have been >asked >> before. >> > >> > I have a two identical databases on different sql boxes. One primary and >one >> back up. I would like to be able to do something like this in the >> application.cfm >> > >> > <cfif primary_available> >> > <cfset use_database="primary"> >> > <cfelseif Secondary_available> >> > <cfset use_database="secondary> >> > <cfelse> >> > .... no database available >> > </cfif> >> > >> > Any thought on how I can easily check to see which box is available. >> > >> > Cheers >> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

