none
Query Redirection from one DB to another DB RRS feed

  • Question

  • Hi All,

         Is it possible to redirect queries from 1 database to another? Let say, one DB from Lake Forest. If it yields 0 result, it will redirect the query to a DB in Philippines. Is this possible considering all tables of the 2 DBs are the same and connection between the 2 DBs is not a problem?

      If yes, can you share any ideas?

     

    JMPryde  

    • Moved by Bob Beauchemin Friday, October 22, 2010 10:07 PM Moved to a hopefully more relevent forum (From:.NET Framework inside SQL Server)
    Friday, October 22, 2010 6:45 AM

Answers

  • I'm not sure what question you're asking. If you're asking "is this possible if I write custom code myself" the answer is probably yes. If you're asking "does SQL Server do anything to facilitate such a scenario happening automatically", the answer is no. If you're looking to do some type of smart load balancing, this is usually called data-dependent routing. Have a look at this whitepaper: http://technet.microsoft.com/en-us/library/cc966448.aspx.

    Because this is most likely a client .NET question (unless I'm misinterpreting it, you wouldn't use a .NET stored procedure for this), I'm going to move the thread to the .NET client forum. If I'm mistaken (and this question has to do with .NET stored procedures or other in-database objects) just ask the moderator to move it back. Perhaps you'll get some different ideas there...

    Hope this helps, Bob Beauchemin, SQLskills

    • Marked as answer by liurong luo Wednesday, October 27, 2010 9:04 AM
    Friday, October 22, 2010 10:06 PM

All replies

  • Your ideas are greatly appreciated :)

     

    JMPryde

    Friday, October 22, 2010 6:54 AM
  • I'm not sure what question you're asking. If you're asking "is this possible if I write custom code myself" the answer is probably yes. If you're asking "does SQL Server do anything to facilitate such a scenario happening automatically", the answer is no. If you're looking to do some type of smart load balancing, this is usually called data-dependent routing. Have a look at this whitepaper: http://technet.microsoft.com/en-us/library/cc966448.aspx.

    Because this is most likely a client .NET question (unless I'm misinterpreting it, you wouldn't use a .NET stored procedure for this), I'm going to move the thread to the .NET client forum. If I'm mistaken (and this question has to do with .NET stored procedures or other in-database objects) just ask the moderator to move it back. Perhaps you'll get some different ideas there...

    Hope this helps, Bob Beauchemin, SQLskills

    • Marked as answer by liurong luo Wednesday, October 27, 2010 9:04 AM
    Friday, October 22, 2010 10:06 PM
  • Thanks for the response Bob. Really appreciate it :)

    I will be reading the article you've given but I've generated an idea from your answers... so many thanks again.

     

    JMPryde

    Monday, October 25, 2010 7:20 PM