Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    3

    Unanswered: SQL search spanning mutliple servers

    I have a webpage which uses a .CGI file to search an existing SQL database with a specific nameserver. Unfortunately I need that search to span mutiple machines with different named data bases containig identical fields but differing dates.

    I backup earlier data to the backup SQL dbase. My existing cgi script will not access this backup server, I cannot get the CGI re-written.

    Is there a way around this problem using SQL commands?


    Thanks.

  2. #2
    Join Date
    Sep 2002
    Location
    Atlanta, GA USA
    Posts
    19

    Arrow Re: SQL search spanning mutliple servers

    If I understand you right, you archive older data to another machine running SQL Server and you cannot change the CGI.

    Depending on how the CGI accesses the data (i.e. queries against the base tables, runs stored procs to get the data, uses views, etc.) there are a number of options.

    If we assume the CGI is accessing the tables directly on the primary server, you could create views on each table in question and name them the same as the table (I really don't like doing that - but it may solve your problem). The view will do a UNION ALL between two queries, the first on the base table on the local machine and the second will query the table on the second machine (via a linked server).

    More than likely you will run into some performance problems doing it this way and may need to add logic to the second query so that it is basically not run if it does not need to.

    If the CGI is using stored procs... you can do basically the same thing, but can use additional logic to help with the performance.

    Originally posted by GPATS
    I have a webpage which uses a .CGI file to search an existing SQL database with a specific nameserver. Unfortunately I need that search to span mutiple machines with different named data bases containig identical fields but differing dates.

    I backup earlier data to the backup SQL dbase. My existing cgi script will not access this backup server, I cannot get the CGI re-written.

    Is there a way around this problem using SQL commands?


    Thanks.
    HueyStLoui

  3. #3
    Join Date
    Oct 2002
    Posts
    3
    Ok thanks Huey, I'll give it a try.

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •