Mimer Provider Manager

Configuration file sample

Below is a sample configuration file. Do not use this file directly. Construct your first configuration file by setting up a configuration with the Mimer Provider Manager Administrator and then save the objects in a configuration file. You will then get correct assembly versions for all referenced assemblies.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <!--
         Tell Windows configuration routines how to access the Mimer Provider Manager configuration assembly
     -->
    <configSections>
       <sectionGroup name="MimerProviderManager">
         <section name="dataSources" type="Mimer.Mpm.Data.ConfigFile.MpmDataSourceSectionHandler,Mimer.Mpm.Data.ConfigFile, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777"/>
         <section name="plugins"     type="Mimer.Mpm.Data.ConfigFile.MpmPluginDescriptorSectionHandler,Mimer.Mpm.Data.ConfigFile, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777"/>
         <section name="sqlFilters"  type="Mimer.Mpm.Data.ConfigFile.MpmSqlFilterDescriptorSectionHandler,Mimer.Mpm.Data.ConfigFile, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777"/>
      </sectionGroup>
   </configSections>
   <appSettings>
       <!--  Your application's settings goes here -->

       <!--  
                Tell Mimer
                Provider Manager to use this configuration file. Without the Mpm
                Configuration key, information from the Windows Registry is used instead
                (this information is managed by the Mimer Provider Manager Administrator)
        -->
       <add key="Mpm Configuration"
            value="Mimer.Mpm.Data.ConfigFile.MpmConfigStartup, Mimer.Mpm.Data.ConfigFile, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777"/>
   </appSettings> 
   <MimerProviderManager>
      <!--
          Define available data sources. This is the object referenced in the connection string
          of the MpmConnection object. Such as: Data Source=Test-Oracle
          There are many examples below, but typically you only have one or two. dbmsTypeName
          and dbmsVersion are optional. If you specify one of the predefined type names: Mimer SQL, Sql Server, or Oracle
          you can test which one of these you are using. Please refer to the class MpmDataSource.DbmsType in the documentation.
      -->
      <dataSources>
         <dataSource dataSourceName="Test-Sql" pluginName="Sql" dbmsTypeName="Sql Server" dbmsVersion="8" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="Server=localhost;InitialCatalog=recipe;UserId=recipe;Password=;" />
         <dataSource dataSourceName="Test-Oracle" pluginName="MsOracle" dbmsTypeName="Oracle" dbmsVersion="9" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DataSource=testdgus;UserID=recipe;Password=recipe;" />
         <dataSource dataSourceName="Test-SqlServer-OleDb" pluginName="OleDb" dbmsTypeName="Sql Server" dbmsVersion="7"
                     SQLFilter="ParameterMarkers" 
                     connectionString="Provider=sqloledb;server=localhost;database=recipe;UserId=recipe;Password=;" />
         <dataSource dataSourceName="OleDb-Oracle-Recipe" pluginName="OleDb" dbmsTypeName="Oracle" dbmsVersion="9" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="Provider=MMpmAORA;server=localhost;database=recipe;UserId=recipe;Password=recipe;" />
         <dataSource dataSourceName="Odbc-SqlServer-Recipe" pluginName="Odbc" dbmsTypeName="Sql Server" dbmsVersion="8" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DRIVER={SQLServer};SERVER=localhost;UID=recipe;DATABASE=recipe;" />
         <dataSource dataSourceName="Odbc-Oracle-Recipe" pluginName="Odbc" dbmsTypeName="Oracle" dbmsVersion="9" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DRIVER={OracleinOraHome92};SERVER=localhost;UID=recipe;PWD=recipe;DATABASE=recipe;" />
         <dataSource dataSourceName="Odbc-MS Oracle-Recipe" pluginName="Odbc" dbmsTypeName="Oracle" dbmsVersion= "9" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DSN=MsOracleRecipe;PWD=recipe;" /> 
         <dataSource dataSourceName="Odbc-Mimer-Recipe" pluginName="Odbc" dbmsTypeName="Mimer" dbmsVersion="9" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DSN=MIMTEST;UID=recipe;PWD=recipe;" /> 
         <dataSource dataSourceName="Oracle9-Recipe" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DataSource=test;UserId=recipe;Password=recipe;" pluginName="Oracle9" dbmsTypeName="Oracle" dbmsVersion="9"/>
         <dataSource dataSourceName="Generic-Sql" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="Server=localhost;InitialCatalog=recipe;UserId=recipe;Password=;" pluginName="Generic-Sql" dbmsTypeName="Sql Server" dbmsVersion="8" /> 
         <dataSource dataSourceName="Generic-MsOracle" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DataSource=test;UserID=recipe;Password=recipe;" pluginName="Generic-MsOracle" dbmsTypeName="Oracle" dbmsVersion="9"/>
         <dataSource dataSourceName="Generic-Oracle9" 
                     connectionString="DataSource=test;UserId=recipe;Password=recipe;" pluginName="Generic-Oracle9" dbmsTypeName="Oracle" dbmsVersion="9"/> 
         <dataSource dataSourceName="Generic-Odbc-Mimer" 
                     SQLFilter="ParameterMarkers" 
                     connectionString="DSN=MIMTEST;UID=recipe;PWD=recipe;" pluginName="Generic-Odbc" dbmsTypeName="Mimer SQL" dbmsVersion="9" /> 
         <dataSource dataSourceName="Generic-Odbc-SqlServer" 
                     connectionString="DRIVER={SQLServer};SERVER=localhost;UID=sa;DATABASE=;" pluginName="Generic-Odbc" dbmsTypeName="Sql Server" dbmsVersion="8"/>
         <dataSource dataSourceName="Generic-OleDb-SqlServer" 
                     connectionString="Provider=sqloledb;server=localhost;database=recipe;UserId=recipe;Password=;" pluginName="Generic-OleDb" dbmsTypeName="SqlServer" dbmsVersion="8" />
      </dataSources>
      <plugins>
         <!--
             Define available
             plugins. This section can left as is, as it is dependent on the Mimer Provider Manager distribution
         -->
         <plugin pluginName="Mimer" factoryClass="MpmMimerFactory" factoryNamespace="Mimer.Mpm.Data.MimerPlugin" factoryAssembly="Mimer.Mpm.Data.MimerPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777" />
         <plugin pluginName="Sql" factoryClass="MpmSqlFactory" factoryNamespace="Mimer.Mpm.Data.SqlPlugin" factoryAssembly="Mimer.Mpm.Data.SqlPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777" />
         <plugin pluginName="Oracle9" factoryClass="MpmOracle9Factory" factoryNamespace="Mimer.Mpm.Data.Oracle9Plugin" factoryAssembly="Mimer.Mpm.Data.Oracle9Plugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777" />
         <plugin pluginName="Odbc" factoryClass="MpmOdbcFactory" factoryNamespace="Mimer.Mpm.Data.OdbcPlugin" factoryAssembly="Mimer.Mpm.Data.OdbcPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777" />
         <plugin pluginName="OleDb" factoryClass="MpmOleDbFactory" factoryNamespace="Mimer.Mpm.Data.OleDbPlugin" factoryAssembly="Mimer.Mpm.Data.OleDbPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777" />
         <plugin pluginName="MsOracle" factoryClass="MpmMsOracleFactory" factoryNamespace="Mimer.Mpm.Data.MsOraclePlugin" factoryAssembly="Mimer.Mpm.Data.MsOraclePlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777" />
         <!--
             The following plugins are only for demonstration purpose. You should always use the plugin
             designed for a specific provider (the ones above) if one is available as the performance will be better!
             If you have a provider which is not supported yet, you can try it out by adding it in the
             following section.
         -->
         <plugin pluginName="Generic-Mimer" factoryClass="MpmGenericFactory" factoryNamespace="Mimer.Mpm.Data.GenericPlugin" factoryAssembly="Mimer.Mpm.Data.GenericPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777">
            <genericInfo genericPrefix="Mimer" genericNamespace="Mimer.Data.Client" genericAssemblyName="Mimer.Data.Client, Version=9.2.0.1, Culture=neutral, PublicKeyToken=36741a5a4e9064f1" 
            parameterMarker=":"></genericInfo>
         <plugin pluginName="Generic-Sql" factoryClass="MpmGenericFactory" factoryNamespace="Mimer.Mpm.Data.GenericPlugin" factoryAssembly="Mimer.Mpm.Data.GenericPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777">
            <genericInfo genericPrefix="Sql" genericNamespace="System.Data.SqlClient" genericAssemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
            parameterMarker="@"></genericInfo>
         </plugin>
         <plugin pluginName="Generic-Oracle9" factoryClass="MpmGenericFactory" factoryNamespace="Mimer.Mpm.Data.GenericPlugin" factoryAssembly="Mimer.Mpm.Data.GenericPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777">
            <genericInfo genericPrefix="Oracle" genericNamespace="Oracle.DataAccess.Client" genericAssemblyName="Oracle.DataAccess, Version=9.2.0.2102, Culture=neutral, PublicKeyToken=89b483f429c47342" 
            parameterMarker=":"></genericInfo>
         </plugin>
         <plugin pluginName="Generic-Odbc" factoryClass="MpmGenericFactory" factoryNamespace="Mimer.Mpm.Data.GenericPlugin" factoryAssembly="Mimer.Mpm.Data.GenericPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777">
            <genericInfo genericPrefix="Odbc" genericNamespace="System.Data.Odbc" genericAssemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
            parameterMarker="?"></genericInfo>
         </plugin>
         <plugin pluginName="Generic-OleDb" 
                        factoryClass="MpmGenericFactory" factoryNamespace="Mimer.Mpm.Data.GenericPlugin" factoryAssembly="Mimer.Mpm.Data.GenericPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777">
            <genericInfo genericPrefix="OleDb" genericNamespace="System.Data.OleDb" genericAssemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
            parameterMarker="?"></genericInfo>
         </plugin>
         <plugin pluginName="Generic-MsOracle" factoryClass="MpmGenericFactory" factoryNamespace="Mimer.Mpm.Data.GenericPlugin" factoryAssembly="Mimer.Mpm.Data.GenericPlugin, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777">
            <genericInfo genericPrefix="Oracle" genericNamespace="System.Data.OracleClient" genericAssemblyName="System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            parameterMarker=":"></genericInfo>
         </plugin>
      </plugins> 
      <!-- 
           SQL Filters are used to process the SQL passed from the application
           to the Mimer Provider Manager. Among other possibilites, it
           allows applications to use the same SQL towards several underlying
           brands of databases.
        --> 
      <sqlFilters>
         <sqlFilter sqlFilterName="ParameterMarkers" 
                    factoryClass="MpmSqlFilterParameterMarkers" 
                    factoryNamespace="Mimer.Mpm.Data.SqlFilterParameterMarkers" 
                    factoryAssembly="Mimer.Mpm.Data.SqlFilterParameterMarkers, Version=1.2.3.1, Culture=neutral, PublicKeyToken=90474c83ee7ec777"/>
      </sqlFilters>
   </MimerProviderManager>
</configuration>

You must check the provider specific documentation for the actual content of the connection string.

Please verify if the version number 1.2.3.1 should be updated. It should be set to the version of the Mimer Provider Manager you are currently using.

If you use a development version you should change the PulicKeyToken to ccf5603adb8282ac.

See Also

Configuration file overview |  Provider section | SQL Filter section | Data Source section