<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Not sure how you are accessing your remote
db, but it seems odd that it should open a connection before one is required. The
settings.php shouldn&#8217;t cause a connection to the db, it just defines the
connection stirng. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>It seems that when set_active is called then
the conection gets opened.&nbsp; &nbsp;If that only happens in&nbsp; a cron hook then that
should only happen then.&nbsp; Where are your set_active calls coming into play
here? <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><br>
Dave <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> support-bounces@drupal.org
[mailto:support-bounces@drupal.org] <b><span style='font-weight:bold'>On Behalf
Of </span></b>Ms. Nancy Wichmann<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, July 11, 2011 11:36
AM<br>
<b><span style='font-weight:bold'>To:</span></b> support drupal<br>
<b><span style='font-weight:bold'>Subject:</span></b> [support] Dynamic remote
database access</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div style='right:auto'>

<p class=MsoNormal style='background:white'><font size=3 color=black
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:black'>I know
that the &quot;standard&quot; way to access another database is to include it
in $db_url in the settigs.php file. This has the undesireable effect that the
remote database must be available all the time. In my case, we only need to
access the remote DB a few times a week via a cron job, where much better error
handling is available. I haven't yet found a way (I'm still searching DO) to do
this. Does anyone have any good ideas? This is Drupal 6 - don't bother suggesting
an upgrade. Replication is probably not an option because we shouldn't have
access to, nor need, everything in the remote DB.<br style='right:auto'>
<br>
<o:p></o:p></span></font></p>

</div>

</span>

<div style='right:auto'>

<p class=MsoNormal style='background:white'><font size=3 color=black
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:black'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div style='right:auto'>

<p class=MsoNormal style='background:white'><st1:City w:st="on"><st1:place
 w:st="on"><strong><b><i><font size=4 color="#ff007f" face="Bookman Old Style"><span
  style='font-size:13.5pt;font-family:"Bookman Old Style";color:#FF007F;
  font-style:italic'>Nancy</span></font></i></b></strong></st1:place></st1:City><font
color=black face=Arial><span style='font-family:Arial;color:black'><o:p></o:p></span></font></p>

</div>

<div style='right:auto'>

<p class=MsoNormal style='background:white'><font size=3 color=black
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:black'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='background:white'><font size=3 color=black
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:black'>Injustice
anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.<o:p></o:p></span></font></p>

</div>

</div>

</div>

</body>

</html>