甲骨文提交杀死 [英] oracle commit kills

查看:82
本文介绍了甲骨文提交杀死的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个oracle db 10g,下面以表格为例

I got an oracle db 10g, here a table as an example

create table Dienstplan
(
Montag Number(2),
Dienstag Number(2),
Mittwoch Number (2),
Donnerstag Number (2),
Freitag Number (2),
Samstag Number (2),
Sonntag Number (2),
gueltigAb DATE default SYSDATE NOT NULL,
PersonalNr Number(10) references Mitarbeiter(PersonalNr) INITIALLY DEFERRED DEFERRABLE,
PRIMARY KEY (PersonalNr, gueltigAb),
check (Montag <= 24),
check (Dienstag <= 24),
check (Mittwoch <= 24),
check (Donnerstag <= 24),
check (Freitag <= 24),
check (Samstag <= 24),
check (Sonntag <= 24)
);
/

现在的问题是,每当我插入包含外键的行(不是该表的独占行)(引用是有效的,所以它不是那样)时,它都会忠实地插入,并且在我提交整个混乱后,它会再次消失

now the problem is that whenever I insert a row (not exclusive to this table) that contains a foreign key (the reference is valid so its not that) it inserts dutifully and as soon as I commit the whole mess it disappears again.

INSERT INTO Dienstplan (Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag,   Sonntag, PersonalNr) values ('1', '2','3','4','5','6','7','1');

真正的缺点是手动插入sqldeveloper(插入行-对话框和提交)就像一个超级按钮一样,对我完全没有帮助...

the real kicker is that the manual insert in sqldeveloper (insert row - dialog & commit) works like a charm, which does not help me at all...

任何帮助表示赞赏 欢呼骗局

any help is appreciated cheer hoax

推荐答案

确保您没有在插入或提交中隐藏任何异常. (由于推迟了FK约束,所以在违反FK的提交中会得到一个例外.)

Make sure you are not hiding any exceptions from either the insert or the commit. (Since the FK constraint is deferred, you would get an exception from the commit on an FK violation.)

作为更一般的调试建议,我会说使用 SQL跟踪,这样您就可以看到到底发生了什么.

As a more general debugging suggestion, I would say use SQL Trace so you can see exactly what's happening.

这篇关于甲骨文提交杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆