Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Weird Query Hangs

    I am running Coldfusion 6, and I am trying to do debug an action page for a
    form. Basically, I isolated the problem to one query, and then I simplified the
    query to just do this: "UPDATE table SET PK=1 WHERE REC_NUM=6" Even this
    simple update query does not work. I run the query and the server grinds to a
    halt, it takes for ever and never does anything. The error logs dont really
    help. I decided to change the query to an insert on the same table, that query
    works without any problems. I also put in the query into another DB app (Toad),
    and the query works fine, and I doubt my sql is off on those three lines. I
    have no idea what is going on. Anybody have any idea why such a simple query
    would fail, but an insert query would work?

    niravpatel Guest

  2. Similar Questions and Discussions

    1. FLV Issue...and it's weird weird weird
      I have a playlist that shows thumbnails of each of the .flv's available. I auto-start the first in the list and it plays just fine. If you select...
    2. CF hangs when database server hangs or crashes
      This may be as simple as a configuration change, but hoping someone understands this behavior and can offer suggestions (or at least additional...
    3. Query of Queries on query New type query
      In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could...
    4. query of query throwing weird exception
      One workaround: I had added rows to a cfsearch query, and set a numeric value in custom1 field that that query provides. A query of queries...
    5. Weird! Problem of query the date for January and October
      It's weird! I am writing an asp code to retireving data from the MS access. Any records before today will not be populated. It works fine except...
  3. #2

    Default Re: Weird Query Hangs

    can you post some code and the enviroment you are using


    jorgepino Guest

  4. #3

    Default Re: Weird Query Hangs

    REC_NUM=6 is that the record ID?
    does the rec_num 6 exist?


    jorgepino Guest

  5. #4

    Default Re: Weird Query Hangs

    It could be problem if you are trying to update primary key or column having
    UNIQUE KEY constraint and value 1 allready exist.
    Another reason - child record(s) exist in one or more tables and it's
    checking for it and prohibits to do but usually error message indicates that.
    Also check with DBA user permissions for this table. Maybe you have INSERT
    but not UPDATE rights (strange b ut possible).


    CF_Oracle Guest

  6. #5

    Default Re: Weird Query Hangs

    Sorry, I tried to change the titles of the cols up, the "PK" field is not a
    Primary Key, the primary Key is REC_NUM, and there are no unique constraints on
    the PK column. Also, All permissions are set for Select, Insert, Delete,
    Update. There are no child record constraints either. Also, REC_NUM 6 does
    exist, the SQL i posted is fine and works when I directly connect to the DB
    Server (using direct SQL).

    Also, I found that when i try to run the SQL as a script through TOAD it
    hangs, and if i wait for 15 minute on CF server, I get a Execution timeout
    expired Error for the query, with SQL STATE HYT00

    niravpatel Guest

  7. #6

    Default Re: Weird Query Hangs

    Get your DBA involved. Since it also fails in TOAD, it must be something wrong
    with the database itself, perhaps a Trigger or Function that has a loop, or
    maybe a Cascade Integrity rule that recursively spins out. At least you now to
    look for UPDATE rather that INSERT events.

    JMGibson3 Guest

  8. #7

    Default Re: Weird Query Hangs

    I have talked with the DBA, and there are no constraints being used right now on the table (we got rid of all of them to debug). Any other possible culprits?
    niravpatel Guest

  9. #8

    Default Re: Weird Query Hangs

    can you post ther error you are getting?

    jorgepino Guest

  10. #9

    Default Re: Weird Query Hangs

    You mentioned constraints explicitly in your discussions with the DBA. Did you
    explicitly chase down Triggers and Functions they may in turn call?
    For example ( I'm assume it's Oracle due to Toad reference, and also my Oracle
    is rusty and no examples available):

    If your table has an OnBeforeUpdate(trigWhatever) Trigger defined (or
    OnAfterUpdate) then that Trigger WILL be fired.
    If that Trigger has an inadvertant loop the Update query would never return.
    Triggers can get as horribly complicated as anyone could wish (i've had to mess
    with a few bad ones). Perhaps the trigger has an outdated reference to a no
    longer existing Oracle instance or a table with 10 million rows or calls a
    function to Update something else which also has a trigger which recurses or
    deadlocks or .......................

    JMGibson3 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139