Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Tue, 9 May 2006 04:01:01 -0700,    group: microsoft.public.vsnet.enterprise.tools        back       


Enterprise Library- Data configuration Block   
I am using the Microsoft enterprise Library (June 2005) with .NET Framework 
1.1 on a Windows 2003 IIS6 web server.

with an ASP.NET 1.1 application, I have a dataConfiguration.config as listed 
at the end of this post(configured with the Enterprise Library Configuration 
Tool)

I have this file in a "production" environment and what I found is that if I 
use the SQL Server 2000's Enterprise Manager's Current Activity viewer under 
the Management node on the DEV and PRDO SQL Server, I could detect connection 
from .Net SqlClient Data Provider from the IIS Host.  What is going on?

I want to leave the 2 settings there (if possible) and change 1 setting for 
Prod IIS to point to prod DB.

Help!

<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
  <xmlSerializerSection 
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, 
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral, 
PublicKeyToken=null">
    <enterpriseLibrary.databaseSettings 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
defaultInstance="appDev" 
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
      <databaseTypes>
        <databaseType name="Sql Server" 
type="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase, 
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null" />
      </databaseTypes>
      <instances>
        <instance name="appDev" type="Sql Server" connectionString="DEV" />
        <instance name="appProd" type="Sql Server" connectionString="PROD" />
      </instances>
      <connectionStrings>
        <connectionString name="DEV">
          <parameters>
            <parameter name="database" value="appDB" isSensitive="false" />
            <parameter name="password" value="pppassword" isSensitive="true" 
/>
            <parameter name="server" value="ProdServer" isSensitive="false" />
            <parameter name="uid" value="uid" isSensitive="false" />
          </parameters>
        </connectionString>
        <connectionString name="PROD">
          <parameters>
            <parameter name="database" value="appDB" isSensitive="false" />
            <parameter name="password" value="pppassword" isSensitive="true" 
/>
            <parameter name="server" value="prodServer" isSensitive="false" />
            <parameter name="uid" value="uid" isSensitive="false" />
          </parameters>
        </connectionString>
      </connectionStrings>
    </enterpriseLibrary.databaseSettings>
  </xmlSerializerSection>
</dataConfiguration>
date: Tue, 9 May 2006 04:01:01 -0700   author:   Patrick

RE: Enterprise Library- Data configuration Block   
change defaultInstance="appDev"  to "appProd"

"Patrick" wrote:

> I am using the Microsoft enterprise Library (June 2005) with .NET Framework 
> 1.1 on a Windows 2003 IIS6 web server.
> 
> with an ASP.NET 1.1 application, I have a dataConfiguration.config as listed 
> at the end of this post(configured with the Enterprise Library Configuration 
> Tool)
> 
> I have this file in a "production" environment and what I found is that if I 
> use the SQL Server 2000's Enterprise Manager's Current Activity viewer under 
> the Management node on the DEV and PRDO SQL Server, I could detect connection 
> from .Net SqlClient Data Provider from the IIS Host.  What is going on?
> 
> I want to leave the 2 settings there (if possible) and change 1 setting for 
> Prod IIS to point to prod DB.
> 
> Help!
> 
> <?xml version="1.0" encoding="utf-8"?>
> <dataConfiguration>
>   <xmlSerializerSection 
> type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, 
> Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral, 
> PublicKeyToken=null">
>     <enterpriseLibrary.databaseSettings 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> defaultInstance="appDev" 
> xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
>       <databaseTypes>
>         <databaseType name="Sql Server" 
> type="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase, 
> Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0, Culture=neutral, 
> PublicKeyToken=null" />
>       </databaseTypes>
>       <instances>
>         <instance name="appDev" type="Sql Server" connectionString="DEV" />
>         <instance name="appProd" type="Sql Server" connectionString="PROD" />
>       </instances>
>       <connectionStrings>
>         <connectionString name="DEV">
>           <parameters>
>             <parameter name="database" value="appDB" isSensitive="false" />
>             <parameter name="password" value="pppassword" isSensitive="true" 
> />
>             <parameter name="server" value="ProdServer" isSensitive="false" />
>             <parameter name="uid" value="uid" isSensitive="false" />
>           </parameters>
>         </connectionString>
>         <connectionString name="PROD">
>           <parameters>
>             <parameter name="database" value="appDB" isSensitive="false" />
>             <parameter name="password" value="pppassword" isSensitive="true" 
> />
>             <parameter name="server" value="prodServer" isSensitive="false" />
>             <parameter name="uid" value="uid" isSensitive="false" />
>           </parameters>
>         </connectionString>
>       </connectionStrings>
>     </enterpriseLibrary.databaseSettings>
>   </xmlSerializerSection>
> </dataConfiguration>
date: Tue, 9 May 2006 04:59:01 -0700   author:   Altaf Al-Amin Najwani

Re: Enterprise Library- Data configuration Block   
Patrick wrote:
> I am using the Microsoft enterprise Library (June 2005) with .NET
> Framework
> 1.1 on a Windows 2003 IIS6 web server.
>
> with an ASP.NET 1.1 application, I have a dataConfiguration.config as
> listed at the end of this post(configured with the Enterprise Library
> Configuration Tool)
>
> I have this file in a "production" environment and what I found is
> that if I use the SQL Server 2000's Enterprise Manager's Current
> Activity viewer under the Management node on the DEV and PRDO SQL
> Server, I could detect connection from .Net SqlClient Data Provider
> from the IIS Host.  What is going on?
>
> I want to leave the 2 settings there (if possible) and change 1
> setting for Prod IIS to point to prod DB.
>
> Help!

If I understand your question, I think all you need to do is change the 
defaultInstance="appDev" to "appProd". Unless you are specifying an instance 
name in your CreateDatabase calls, the DAAB will use the defaultInstance.

Or did I miss something?

-- 
Matt Noonan
EasyObjects.NET: The O/RM for the Enterprise Library
http://www.easyobjects.net
date: Thu, 11 May 2006 21:50:11 -0400   author:   Matt Noonan

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us