RE: Database Availability
> > > 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 You should use an automatic failover. A quick search on the all knowing oracle revealed this gnomic answer " I think that "Merge replication with updating subscribers" should work for you: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/replsql /reploptions_34hf.asp Cheers" And "http://doc.ddart.net/mssql/sql70/2_003_16.htm"; These are sql server specific, as you don't seem to identify which product you are using. Jon. ~| 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 Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Database Availability
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 , and call it as you would cfquery: . 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 >> > >> > >> > >> > >> > 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
Re: Database Availability
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 , and call it as you would cfquery: . 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, "admin" <[EMAIL PROTECTED]> 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 >> > >> > >> > >> > >> > 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 Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Database Availability
No need to write a custom program...all you need is an uptime monitor that can fire an external executable, like What's Up, and a program that will modify a registry key when the service you are monitoring goes down...like this one from the Resource Kit. http://www.mkssoftware.com/docs/man1/registry.1.asp -- jon mailto:[EMAIL PROTECTED] Tuesday, June 24, 2003, 4:23:07 PM, you wrote: a> wow - thank you all so much for the useful info. I do like the idea of the a> external app. I wonder if an app like that could be used for load a> balancing - but of course my VB and C++ skills suck. a> Cheers a> Richard a> - Original Message - a> From: "Jim McAtee" <[EMAIL PROTECTED]> a> To: "CF-Talk" <[EMAIL PROTECTED]> a> Sent: Tuesday, June 24, 2003 1:13 PM a> Subject: Re: Database Availability >> Assuming you're using an ODBC datasource... How about an external a> application >> this is constantly checking the availability of the databases in question, a> 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 a> asked >> before. >> > >> > I have a two identical databases on different sql boxes. One primary and a> one >> back up. I would like to be able to do something like this in the >> application.cfm >> > >> > >> > >> > >> > 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 Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Database Availability
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 > > > > > > > > > > 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
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 > > > > > 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 Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Database Availability
I used to have a script that ran a query and if it failed(using cfcatch) it fired an ASP page that used ADSI and recycled the cf server. This was on a CF4 box and the cf server would lose contact with the database and resetting the cf service fixed that. Clint - Original Message - From: "jon hall" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, June 24, 2003 3:09 PM Subject: Re: Database Availability > I can't say if it works or not, but you could try the > cf_IsColdFusionDataSource(dsn) function. > > One probably crazy idea off the top of my head, would be to write a > program that checked to see if the database is up, if not, switch the > ip address in the CF DSN settings in the registry (or wherever MX > stores it), and the switch should be transparent to pretty much > everything. > ...or maybe have the above connection testing set a server variable to > the connect string or provider dsn, and just use that server variable > in your cfquerys. > > Lot's more ways really...these ideas are pretty low tech as redundancy > solutions go. If you want to hit everything with the CF hammer > though... ;-) > > -- > jon > mailto:[EMAIL PROTECTED] > > Tuesday, June 24, 2003, 3:33:47 PM, you wrote: > a> I hope that this isn't a stipid question but I'm sure it must have been asked before. > > a> 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 > > a> > a> > a> > a> 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
Re: Database Availability
I can't say if it works or not, but you could try the cf_IsColdFusionDataSource(dsn) function. One probably crazy idea off the top of my head, would be to write a program that checked to see if the database is up, if not, switch the ip address in the CF DSN settings in the registry (or wherever MX stores it), and the switch should be transparent to pretty much everything. ...or maybe have the above connection testing set a server variable to the connect string or provider dsn, and just use that server variable in your cfquerys. Lot's more ways really...these ideas are pretty low tech as redundancy solutions go. If you want to hit everything with the CF hammer though... ;-) -- jon mailto:[EMAIL PROTECTED] Tuesday, June 24, 2003, 3:33:47 PM, you wrote: a> I hope that this isn't a stipid question but I'm sure it must have been asked before. a> 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 a> a> a> a> 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Database Availability
cf doesn't handle this well at all. I have a check in an app like the below. The alivetest datasource has a short login timeout set on it. If the DB is up but there is an issue, this works. If the DB server is dead, as in off, or has disappeared, as in a network issue, this thing bombs. It, as well as any connection to the DB when this happens, ties up threads and causes general mayhem. I've thought about writing something that performs a ping/tnsping, but have not got to it. Our DB goes down so rarely that its not a high priority for me. This topic has seen some discussion before around here. select 42 as one from dual do whatever etc Doug >-Original Message- >From: Eric Creese [mailto:[EMAIL PROTECTED] >Sent: Tuesday, June 24, 2003 3:40 PM >To: CF-Talk >Subject: RE: Database Availability > > >Wouldn't these boxes be out of sync then as far as data goes? >I would hope you are applying some type of replication. > >I think you could set something up in the application file and >run a simple query to return a output from your prod box. If >there is a connection problem then you would know when you did >not return a value. you would want to trap that error so the >page would not fail though. > >-Original Message- >From: admin [mailto:[EMAIL PROTECTED] >Sent: Tuesday, June 24, 2003 2:34 PM >To: CF-Talk >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 > > > > >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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Database Availability
run a query and catch any db errors... if an error is caught use the second one... - Original Message - From: "admin" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, June 24, 2003 3:45 PM Subject: Re: Database Availability > the dbs's in quesion are read only and are automatically sync'd > - Original Message - > From: "Michael T. Tangorre" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Tuesday, June 24, 2003 12:41 PM > Subject: Re: Database Availability > > > > I think the bigger issue would be how to keep them synched up if you > switch > > between them :-) > > > > > > - Original Message - > > From: "admin" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Tuesday, June 24, 2003 3: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 > > > > > > > > > > > > > > > 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Database Availability
the dbs's in quesion are read only and are automatically sync'd - Original Message - From: "Michael T. Tangorre" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, June 24, 2003 12:41 PM Subject: Re: Database Availability > I think the bigger issue would be how to keep them synched up if you switch > between them :-) > > > - Original Message - > From: "admin" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Tuesday, June 24, 2003 3: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 > > > > > > > > > > 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Database Availability
I think the bigger issue would be how to keep them synched up if you switch between them :-) - Original Message - From: "admin" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, June 24, 2003 3: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 > > > > > 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Database Availability
Wouldn't these boxes be out of sync then as far as data goes? I would hope you are applying some type of replication. I think you could set something up in the application file and run a simple query to return a output from your prod box. If there is a connection problem then you would know when you did not return a value. you would want to trap that error so the page would not fail though. -Original Message- From: admin [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 2:34 PM To: CF-Talk 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 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
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 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4