方法1: 可能大家都解决了,我也遇到这个问题,c#更新卡住,但是plsql更新没问题.一直没找到答案,无意中想起,可能是oracle的表锁定了. 用下面的方法,顺利解锁保存了. SELECT /*+ rule*/ a.sid, b.owner, object_name, object_type FROM v$lock a, all_objects b WHERE TYPE = 'TM' and a.id1 = b.object_id; 查到的都是被锁的表 替换&sid参数SELECT sid…
public class DBCon { // 数据库驱动对象 public static final String DRIVER = "oracle.jdbc.driver.OracleDriver"; // 数据库连接地址(数据库名) public static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl"; // 登陆名 public static final String USER = …
一.可用SYS登录, 二.查锁session_ID查找存储过程OPERATIONDATA_IMP被哪些session锁住而无法编译select * FROM dba_ddl_locks where name =upper('OPERATIONDATA_IMP'); 三.查出sid serial#从而得到session_id,然后通过select t.sid,t.serial# from v$session t where t.sid=&session_id; 四.根据得到sid和serial#…
///c# winform 操作oracle数据库的Blob字段,把图片存储到数据库,保存图片到数据库 闲话不多说,直接上代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; usin…
Oracle.DataAccess.dll方式操作oracle数据库 一.查询语句: using (OracleConnection conn = new OracleConnection(System.Configuration.ConfigurationManager.ConnectionStrings["local_Orcl"].ConnectionString)) { conn.Open(); using (OracleCommand cmd = conn.CreateComm…
System.Data.OracleClient.dll方式操作oracle数据库 一.查询语句: using (OracleConnection conn = new OracleConnection(System.Configuration.ConfigurationManager.ConnectionStrings["local_Orcl"].ConnectionString)) { conn.Open(); using (OracleCommand cmd = conn.Cre…
Oracle.ManagedDataAccess.dll方式操作oracle数据库 一.查询语句: using (OracleConnection conn = new OracleConnection(System.Configuration.ConfigurationManager.ConnectionStrings["local_Orcl"].ConnectionString)) { conn.Open(); using (OracleCommand cmd = conn.Cre…