Oracle Update遇到了问题 [英] Oracle Update got problems

查看:99
本文介绍了Oracle Update遇到了问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Oracle SQL Developer或我的.Net程序中创建了一个Oracle数据表,并且还可以更新。今天,我得到了一些奇怪的东西,总结如下:

在Oracle SQL Developer中

1)删除tbl_xxx - 工作删除所有记录

2)截断表tbl_xxx - 不工作,被冻结

3)删除表,编辑(例如添加新列或更改表名) - 不工作

In .Net代码

1)删除tbl_xxx - 运行时不工作

 尝试 {
使用(OracleCommand cmd = new OracleCommand( delete + tblName,connection)){
cmd.ExecuteNonQuery();
}
catch (System.IO.IOException e){
g.Write2Log( 错误消息: + e.Message);
}





冻结在cmd.ExecuteNonQuery(),但没有抛出任何错误消息。

我做了另一个测试:

1)在Oracle SQL Developer中,制作了数据表的副本。

2)可以执行所有可能的功能,如drop,截断,编辑等



我了解到如上所述出现问题的表目前在Web服务中使用。我不确定这是否可能导致计划锁定。



可能解决的问题是什么?如何通过错误消息进行调试?如果你能分享你的经验,请提前致谢。

解决方案

一个可能的原因是锁定。为了删除所有行,您需要足够的锁,并且在执行时可能会有活动锁阻止您的操作。



如果您有权访问V


表,你可以查询例如

- V


SESSION

- V

I created an Oracle Data Table either in Oracle SQL Developer or in my .Net program, and also OK in updating. Today, I got something strange, as summarized below:
In Oracle SQL Developer
1) Delete tbl_xxx - working to delete all of the records
2) Truncate Table tbl_xxx - Not working, got frozen
3) Drop table, Edit (e.g. add a new column, or change table name) - Not working
In .Net Code
1) Delete tbl_xxx - Not working when running

try {
using (OracleCommand cmd = new OracleCommand("delete " + tblName, connection)) {
    cmd.ExecuteNonQuery(); 
}
catch (System.IO.IOException e)  {
    g.Write2Log("Error Message: " + e.Message);
}



Got frozen at cmd.ExecuteNonQuery(), but no error message was thrown.
I did another test:
1) In Oracle SQL Developer, made a copy of the data table.
2) Could perform all of possible functions, like drop, truncate, edit,etc.

I learned that the table, which got problem as stated above, is currently used in a webservice. I am not sure this is could be the reason to cause the scheme lock or not.

What could be the problem be possibly solved? How can this be debugged w/ error message? Thanks in advance if you can share your experience.

解决方案

One posible reason is locks. In order to remove all the rows you need sufficient locks and at the time of execute there may be active locks blocking your operation.

If you have access to V


tables, you can query for example
- V


SESSION
- V


这篇关于Oracle Update遇到了问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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