locked
Multiple connections from a web.config to multiple Oracle DBs RRS feed

  • Question

  • User-1585262035 posted

    Completely new to Oracle connections and have limited knowledge of web.config files.  Please be patient with me.

    I have a web app that when a user hits the site the web.config uses this ODBC connection string: 

    DIWS ODBC Connection String
    add key "DIWSOdbcconnection" value=driver{oracle in oracle9201} server=2;dbq=stby;uid=XX_XXX;pwd=12345678"/>
    add key=diwsserviceprovider" value="xxxx.xx.xxxxx"/>-->
    add key="DIWSProvider" value="xxxx.data.subjects.diwsoracle"/>

    The question is can I add another string for a "server=4" to be used while server 2 is taken down and rebuilt?  Trying to manage this situation in the web.config file.

    Essentially, we want to point the App to multiple servers were the data is replicated in case of a failure of one of the servers or maintenance is involved.

    Thanks in advance.

    Tuesday, December 24, 2013 10:42 AM

Answers

  • User-166373564 posted

    Hi Garnerb

    For this issue, it's recommanded to get help from Oracle forum, more Oracle experts will help you there. At the same time you can also learn relevant topic about connecting to multiple oracle databases in bing, some resources are also available for you.

    Best regards

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 30, 2013 2:25 AM

All replies

  • User-166373564 posted

    Hi Garnerb

    Welcome to asp.net forum.

    I'm not familar with Oracle database, however, if you want to connect to multiple data-sources in web.config. Here is example for you:

     <connectionStrings>
            <add name="ConnStr" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\FeedBack.mdf;Integrated Security=True;User Instance=True"
                providerName="System.Data.SqlClient" />
           <add name="FeedBackConnectionString" connectionString="Data Source=WWW-91CC3E6A329;Initial Catalog=FeedBack;Integrated Security=True"
                providerName="System.Data.SqlClient" />
            <add name="ConnStr" connectionString="data source=192.168.1.108;Initial Catalog=asd;uid=sa;pwd=q"
                providerName="System.Data.SqlClient" />

    hope it helps,

    Best regards

    Angie

    Wednesday, December 25, 2013 10:00 PM
  • User-1585262035 posted

    Yes, old school ODBC...... 

    In this line, add key="DIWSODBCConnection" value="Driver={Oracle in racle9201}; Server=2; DBQ=STBY; uid=XX_XXXX; PWD=1234567890;" />

    Do I just seperate the different servers with a comma, Server=2.3.4

    Do I copy the enter connection screen and where needed change the server name?  All the other information stays the same....

    Thanks.

    Thursday, December 26, 2013 10:33 AM
  • User-166373564 posted

    Hi Garnerb

    For this issue, it's recommanded to get help from Oracle forum, more Oracle experts will help you there. At the same time you can also learn relevant topic about connecting to multiple oracle databases in bing, some resources are also available for you.

    Best regards

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 30, 2013 2:25 AM