Home » Developer & Programmer » Forms » please help me
please help me [message #384083] Mon, 02 February 2009 02:39 Go to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
Hi all ...

I have a table with 3 fields....id,cust_id,item_id
I have a composite key(cust_id,item_id) defined on my table.
When i say delete from table where inv_id=....;
my database hangs Sad

Dont know y....
please help me out
thanks in advance

Re: please help me [message #384087 is a reply to message #384083] Mon, 02 February 2009 02:52 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
the table you have shown, there is no inv_id
Re: please help me [message #384090 is a reply to message #384087] Mon, 02 February 2009 02:55 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
sorry tht id is actually inv_id....
i don know y my database hangs...
Re: please help me [message #384095 is a reply to message #384090] Mon, 02 February 2009 03:06 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
insteaed of using forms, try with sql prompt and test it since simple ddl command should not hang please give the feedback too


Re: please help me [message #384098 is a reply to message #384095] Mon, 02 February 2009 03:09 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
yes sir...i tried it at back end also bt it hangs...thn i have to just terminate the sql prompt....
Re: please help me [message #384103 is a reply to message #384098] Mon, 02 February 2009 03:14 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
create another table with the same three columns and populate few entries through insert and try the delete command. if it is not hanged then check the data behaviour of your original table. if still hangs, i have no solutions except of reinstallation.
Re: please help me [message #384104 is a reply to message #384103] Mon, 02 February 2009 03:16 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
it only hangs fr tht table....z it something 2 do with the constraints....composite key made of cust_id,item_id and nt null ?
Re: please help me [message #384106 is a reply to message #384104] Mon, 02 February 2009 03:20 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
do you mean to say disabling constraint works fine.
Re: please help me [message #384110 is a reply to message #384106] Mon, 02 February 2009 03:29 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
yes without constraints it works fine....
i created a copy of tht table and thn deleted...it worked bec copy takes only d structure nt d constraints..........

z it something 2 do with constraints/locks...?
Re: please help me [message #384114 is a reply to message #384110] Mon, 02 February 2009 03:36 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
charuamit, please, write in plain English.


If a record you are trying to delete is referenced by other records (i.e. referential integrity is to be violated), you are not allowed to do that. Also, if this record(s) is changed by another user who did not commit (or rollback) these changes, you can also not delete that record.

So, what is your situation?

[Updated on: Mon, 02 February 2009 03:40]

Report message to a moderator

Re: please help me [message #384115 is a reply to message #384110] Mon, 02 February 2009 03:38 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
how did you created the constraints can you post scripts and as well as the data you had at the time of testing (very few)
Re: please help me [message #384119 is a reply to message #384114] Mon, 02 February 2009 03:44 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
table definition is :

CREATE TABLE INVENTORY_DETAILS
(
INV_ID NUMBER,
INVE_CUST_ID NUMBER,
INVE_ITEM_ID NUMBER,
INVE_RECEVED_DATE DATE,
INVE_ENTBY VARCHAR2(35 BYTE),
INVE_ENTDT DATE,
INVE_MODBY VARCHAR2(35 BYTE),
INVE_MODDT DATE,
INVE_COMP_ID NUMBER
)

constraints are :

ALTER TABLE INVENTORY_DETAILS ADD (
CONSTRAINT PK_CUST_ITEM_ID PRIMARY KEY (INVE_ITEM_ID, INVE_CUST_ID))


the record that i want to delete is :


INV_ID INVE_CUST_ID INVE_ITEM_ID INVE_RECE INVE_ENTBY
------- ------------ ------------ --------- ------------
2757 2392 4434 28-DEC-08 RONNIE


i want to delete this record from my table....

thanks.
Re: please help me [message #384124 is a reply to message #384114] Mon, 02 February 2009 03:49 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
sorry sir..

I dont have foreign key in my table....just a composite key that is made of cust_id and item_id (cust_id and item_id are primary key in two different tables).....

And yes our system is being used by other users also but only this table is hanging ....rest other forms are working fine....

Thanks.

Re: please help me [message #384149 is a reply to message #384083] Mon, 02 February 2009 06:18 Go to previous messageGo to next message
cookiemonster
Messages: 13963
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do you have any database triggers on that table?
Re: please help me [message #384455 is a reply to message #384119] Tue, 03 February 2009 22:39 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
your test script works fine for me
Re: please help me [message #384475 is a reply to message #384455] Wed, 04 February 2009 00:33 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
yes i got the reason....i think it was not working because of multiple users accessing the database at the same time.
How can i control which user is blocking the database...


I ran :
select * from v$session;

can you give me some link where i can get the full description of the fields of this table....

And what happens if i kill the blocking user's session ,what will happen...will some data be lost ?


How can we specify how many users can access a schema at a time ?

Thanks in advance.

Re: please help me [message #385335 is a reply to message #384475] Mon, 09 February 2009 02:54 Go to previous messageGo to next message
sasipalarivattom
Messages: 121
Registered: June 2007
Location: Cochin ( INDIA )
Senior Member
Dear Charu,

Please look this blog.

http://www.orafaq.com/node/854


Regards,
Sasi..


[Updated on: Mon, 09 February 2009 02:54]

Report message to a moderator

Re: please help me [message #385548 is a reply to message #385335] Tue, 10 February 2009 02:08 Go to previous message
charuamit
Messages: 121
Registered: January 2009
Senior Member
Thanks Smile

The article is really good.

Charu.
Previous Topic: Forms column - reports row ????
Next Topic: Exporting to excel
Goto Forum:
  


Current Time: Mon Feb 03 18:03:05 CST 2025