我已经实现了基于函数的唯一索引。
CREATE UNIQUE INDEX "UK_ACCOUNT_TYPE" ON "ACCOUNT" (
CASE "ACTIVE"
WHEN '1'
THEN "FK_PARTNERID"
ELSE NULL
END,
CASE "ACTIVE"
WHEN '1'
THEN "TYPE"
ELSE NULL
END
);
[注意:FK_PARTNERID 是外键。基本上,我们只想为特定类型的用户(FK_PARTNERID)和特定类型的帐户(TYPE)保留 1 条记录。]
之后,如果我尝试从该表中删除一条记录,它会断开与服务器的连接并给出这样的错误:“没有更多数据可以从套接字读取。提交失败。”
我必须将客户端重新连接到服务器。当我尝试从编码中删除记录时,也会出现此问题。
插入/更新/选择语句正常工作。
如果我删除此索引,删除工作正常。
Oracle服务器版本为11g(11.2.0.3)
这是 SQL Developer 中显示的日志:
这是侦听器警报日志:(来自路径:/opt/oracle/product/diag/tnslsnr/dev-vm/listener/alert)
<msg time='2013-10-04T14:43:04.079+00:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='dev-vm'
host_addr='192.168.56.101'>
<txt>04-OCT-2013 14:43:04 * service_update * ORCL * 0
</txt>
</msg>
<msg time='2013-10-04T14:43:20.365+00:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='dev-vm'
host_addr='192.168.56.101'>
<txt>04-OCT-2013 14:43:20 * (CONNECT_DATA=(SID=orcl)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=glassfish))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.101)(PORT=45602)) * establish * orcl * 0
</txt>
</msg>
<msg time='2013-10-04T14:44:01.112+00:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='dev-vm'
host_addr='192.168.56.101'>
<txt>04-OCT-2013 14:44:01 * service_update * ORCL * 0
</txt>
</msg>
<msg time='2013-10-04T14:44:04.115+00:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='dev-vm'
host_addr='192.168.56.101'>
<txt>04-OCT-2013 14:44:04 * service_update * ORCL * 0
</txt>
</msg>
<msg time='2013-10-04T14:44:34.128+00:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='dev-vm'
host_addr='192.168.56.101'>
<txt>04-OCT-2013 14:44:34 * service_update * ORCL * 0
</txt>
</msg>
警报日志:
Mon Oct 07 07:38:12 2013
Time drift detected. Please check VKTM trace file for more details.
Mon Oct 07 13:30:09 2013
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x6] [PC:0x8A7767C, evakdustoopn()+76] [flags: 0x0, count: 1]
Errors in file /opt/oracle/product/diag/rdbms/orcl/ORCL/trace/ORCL_ora_12500.trc (incident=104683):
ORA-07445: exception encountered: core dump [evakdustoopn()+76] [SIGSEGV] [ADDR:0x6] [PC:0x8A7767C] [Address not mapped to object] []
Incident details in: /opt/oracle/product/diag/rdbms/orcl/ORCL/incident/incdir_104683/ORCL_ora_12500_i104683.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Mon Oct 07 13:30:12 2013
Dumping diagnostic data in directory=[cdmp_20131007133012], requested by (instance=1, osid=12500), summary=[incident=104683].
Mon Oct 07 13:30:13 2013
Sweep [inc][104683]: completed
Sweep [inc2][104683]: completed