解决ORA-14450:试图访问已经在使用的事务处理临时表
在开发使用过程中,一个存储过程用到表TMP_DA_GMS,允许程序的时候报错,后台查询到错误原因是因为表里有个字段需要设置为可以为N
在开发使用过程中,一个存储过程用到表TMP_DA_GMS,允许程序的时候报错,后台查询到错误原因是因为表里有个字段需要设置为可以为NULL,,在PL_SQL中直接编写语句
alter table TMP_DA_GMS modify brid NUMBER(11) null;
执行,报错“ORA-14450:试图访问已经在使用的事务处理临时表”;
有一个解决办法是去重新启动下Oracle服务,但是这个方法不可取,用户正在使用时,是不能随便重启数据库服务的,后来在网上找到了处理办法,但是只告诉怎么
杀死导致死锁的会话,怎么找关于这个表的session却没有提到,这里做个说明:
--找到表对象
select * from dba_objects where object_name='TMP_DA_GMS'
--找到该对象导致的锁的Session会话,并编写语句
select 'alter system kill session '''||SID||','||SERIAL#||''';' from V$session where SID in ( select sid from v$enqueue_lock t where t.type='TO' and id1='99879' )
--执行生成后的SQL语句解除死锁
推荐阅读:
SPFILE 错误导致数据库无法启动(ORA-01565)
ORA-01172、ORA-01151错误处理
ORA-00600 [2662]错误解决

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)
