Results 1 to 4 of 4

Thread: Need Help with Triggers

  1. #1
    Join Date
    Apr 2003
    Location
    West Palm Beach, FL
    Posts
    23

    Need Help Intercepting a Query sent to the Server

    I am not actually sure if Triggers are the solution to my problem, but I have no experience with them and need help understanding if they will solve my problem.

    Users that Access the database through our Front End Software can search on any field (indexed or not). For the most part, they search on indexed fields, but the problem is when they enter and empty string and attempt a search.

    The Query that is passed to SQL essentially searches for everything - example below:

    SELECT FieldA, FieldB, FieldC FROM Table WHERE IndexedField LIKE ''%'' ORDER BY IndexedField

    The result of this is a timeout after 60 seconds and the server being practically coming to a halt during that wait. All users trying to make reads or writes are queued behind that query and it appears as though they are frozen. I have done a lot of monitoring with Profiler to figure out the problem, but I am stuck on how to stop it. The issue lies with the users and that is something I cannot fix. The Front End software cannot be modified. I cannot limit what they search on nor can I limit the fields they can search on.

    Being that I can't do anything there, I was hoping I could intercept this query when SQL receives and possibly time it out faster. The queries follow a format, so I was hoping a trigger would do the trick.

    Please provide any ideas or input that may help solve my problem. Also, if anybody has any good links to help me with triggers if that will take care of the problem.

    EDIT: After doing some reading it is looking like triggers may not be applicable to my problem, but I am still looking for a solution.

    Thanks in advance,

    Don
    Last edited by elitecobra; 08-30-2007 at 09:47 AM.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    But there is no select trigger.

  3. #3
    Join Date
    Apr 2003
    Location
    West Palm Beach, FL
    Posts
    23
    I understand that, I edited my post after I realized triggers weren't the answers, but I am still hoping that there is something I can do to intercept specific queries received by the server.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    You should do it in front end.

Posting Permissions

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