Can an application connect to databases from on-premise SQL Server Instance and Azure SQL together?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












Can a single application connect to two different databases each of which is in different Instances. One instance has on-premise deployment, the other one is Azure SQL(not SQL in Azure VM). So basically is it possible for an application to access data from both Instances?










share|improve this question





















  • By "application" do you mean some sort of executable file or web application?
    – McNets
    1 hour ago










  • If the answer will differ for each one then both.
    – Eleonora Grigoryan
    1 hour ago
















up vote
1
down vote

favorite












Can a single application connect to two different databases each of which is in different Instances. One instance has on-premise deployment, the other one is Azure SQL(not SQL in Azure VM). So basically is it possible for an application to access data from both Instances?










share|improve this question





















  • By "application" do you mean some sort of executable file or web application?
    – McNets
    1 hour ago










  • If the answer will differ for each one then both.
    – Eleonora Grigoryan
    1 hour ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Can a single application connect to two different databases each of which is in different Instances. One instance has on-premise deployment, the other one is Azure SQL(not SQL in Azure VM). So basically is it possible for an application to access data from both Instances?










share|improve this question













Can a single application connect to two different databases each of which is in different Instances. One instance has on-premise deployment, the other one is Azure SQL(not SQL in Azure VM). So basically is it possible for an application to access data from both Instances?







sql-server azure-sql-database






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









Eleonora Grigoryan

48513




48513











  • By "application" do you mean some sort of executable file or web application?
    – McNets
    1 hour ago










  • If the answer will differ for each one then both.
    – Eleonora Grigoryan
    1 hour ago
















  • By "application" do you mean some sort of executable file or web application?
    – McNets
    1 hour ago










  • If the answer will differ for each one then both.
    – Eleonora Grigoryan
    1 hour ago















By "application" do you mean some sort of executable file or web application?
– McNets
1 hour ago




By "application" do you mean some sort of executable file or web application?
– McNets
1 hour ago












If the answer will differ for each one then both.
– Eleonora Grigoryan
1 hour ago




If the answer will differ for each one then both.
– Eleonora Grigoryan
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










Yes, you can use so many connections you need.



For instance, if you're programming for .Net framework simply instantiate two or more SqlConnection class and set up the ConnectionString property according the DB you are trying to access.



You can find some examples about ConnectionString's here.



And MS Docs about Azure ConnectionString's here.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "182"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f220652%2fcan-an-application-connect-to-databases-from-on-premise-sql-server-instance-and%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    Yes, you can use so many connections you need.



    For instance, if you're programming for .Net framework simply instantiate two or more SqlConnection class and set up the ConnectionString property according the DB you are trying to access.



    You can find some examples about ConnectionString's here.



    And MS Docs about Azure ConnectionString's here.






    share|improve this answer
























      up vote
      2
      down vote



      accepted










      Yes, you can use so many connections you need.



      For instance, if you're programming for .Net framework simply instantiate two or more SqlConnection class and set up the ConnectionString property according the DB you are trying to access.



      You can find some examples about ConnectionString's here.



      And MS Docs about Azure ConnectionString's here.






      share|improve this answer






















        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        Yes, you can use so many connections you need.



        For instance, if you're programming for .Net framework simply instantiate two or more SqlConnection class and set up the ConnectionString property according the DB you are trying to access.



        You can find some examples about ConnectionString's here.



        And MS Docs about Azure ConnectionString's here.






        share|improve this answer












        Yes, you can use so many connections you need.



        For instance, if you're programming for .Net framework simply instantiate two or more SqlConnection class and set up the ConnectionString property according the DB you are trying to access.



        You can find some examples about ConnectionString's here.



        And MS Docs about Azure ConnectionString's here.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        McNets

        13k41553




        13k41553



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f220652%2fcan-an-application-connect-to-databases-from-on-premise-sql-server-instance-and%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            What does second last employer means? [closed]

            One-line joke