Ask a Question related to Coldfusion Database Access, Design and Development.
-
niravpatel #1
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
-
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... -
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... -
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... -
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... -
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... -
jorgepino #2
Re: Weird Query Hangs
can you post some code and the enviroment you are using
jorgepino Guest
-
jorgepino #3
Re: Weird Query Hangs
REC_NUM=6 is that the record ID?
does the rec_num 6 exist?
jorgepino Guest
-
CF_Oracle #4
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
-
niravpatel #5
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
-
JMGibson3 #6
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
-
niravpatel #7
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
-
-
JMGibson3 #9
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



Reply With Quote

