please help me [message #384083] |
Mon, 02 February 2009 02:39 |
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
Dont know y....
please help me out
thanks in advance
|
|
|
|
|
|
|
Re: please help me [message #384103 is a reply to message #384098] |
Mon, 02 February 2009 03:14 |
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 #384110 is a reply to message #384106] |
Mon, 02 February 2009 03:29 |
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 |
|
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 #384119 is a reply to message #384114] |
Mon, 02 February 2009 03:44 |
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 |
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 #384475 is a reply to message #384455] |
Wed, 04 February 2009 00:33 |
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.
|
|
|
|
|