Results 1 to 3 of 3
  1. #1
    Rockitman31 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7

    changing SQL servers hurts Access query

    I have an Access database that has links to Microsoft SQL tables through ODBC.



    We have 2 SQL servers and we are retiring one of them.

    One of the queries in this Access database refers to a table on this soon to be retired SQL server.

    I have already recreated this table onto the other SQL server and have changed the reference to it in Linked Table Manager, prompted for its new location.

    Now when I run the query, it just appears to stall. The query usually takes about 15 seconds to complete. Now it runs forever and won't finish. I've let it go for over an hour once and it still didn't complete.

    I have no clue why this is not working.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Was the previous SQL table indexed? Is the new SQL table not indexed?

    Have you tried rebuilding the query step by step to see what's causing it to stall? If you can find out where it starts to have problem you may be able to change your SQL statement to be a bit more efficient. Start with a very basic table using the 'new' table just a simple select query that lists all the data and see how long it takes to run vs the old server then go from there.

  3. #3
    Rockitman31 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7
    thanks for the tip. I didn't have the primary key set and so the index was not working.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 03-23-2012, 09:20 AM
  2. changing average Query
    By joebox8 in forum Queries
    Replies: 1
    Last Post: 06-27-2011, 02:12 AM
  3. Query changing format
    By John Southern in forum Queries
    Replies: 3
    Last Post: 07-05-2010, 09:57 AM
  4. Replies: 2
    Last Post: 03-25-2010, 08:14 AM
  5. Changing Query on the Fly
    By pdouglas in forum Programming
    Replies: 0
    Last Post: 06-25-2009, 10:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums