truncate empty table ora-02266, why? cause

oracle 不允许truncate 一个启用外键引用的父表,因为truncate 不会触发任何trigger和任何constraint验证,当然它也不会关心子表是不是真的为空或是不是没有参照。

DBMS_SHARED_POOL包 创建与使用

DBMS_SHARED_POOL 是从10.2开始提供的包,可以访问shared_pool中的对象,功能检查大于批定大小的对象,加入/移除shared_pool对象,11.1再完善..

Script: Procedure 启用/禁用表上全部外键

一个充满外键的表中DML,因为验证的原因会浪费很多额外时间,如果在确保数据的合法性的前提下先禁用外键约束,操作完后再启用,可以提高你的DML速度,下面一个procedure启用/禁用表上的全部外键。

ORA-600 [25016] internal error when ALTER DATABASE OPEN ORA-01092

sql>ALTER DATABASE OPEN;
ALTER DATABASE OPEN
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced

Script: tom’s printtab code你值得拥有

–Tom Kyte’s printtab code
比如一个查询的列很多,在命令行窗口下看的很乱,就可以用tom的printtab转换成列打印出来

10046跟踪drop tablespace

这两天一个库因操作了基表的dictionary出错,测试一下正常的drop tablespace做了哪些操作

ORA-00600 [kghfrempty:ds] internal error issue

—- Error Stack Dump —–
ORA-00600: 内部错误代码, 参数: [kghrcdepth:ds], [0x7FFE37407008], [], [], [], [], [], [], [], [], [], []
—– SQL Statement (None) —–
Current SQL information unavailable – no cursor.

Script: oracle procedure error 生成txt日志文件

前天有网友问题这个问题,今天测试一把,需求应该是如果producre存储过程运行出错,可以写错误日志到OS的文本文件,这样系统管理员就可以看到,无需分配数据库权限.

AWR 之table scans (short tables)

Verify that your KEEP pool is sized properly to cache frequently referenced tables and indexes. Moving frequently-referenced tables and indexes to SSD or the WriteAccelerator will significantly increase the speed of small-table full-table scans.

impdp 挂起 tatement suspended, wait error to be cleared

ORA-39083: Object type INDEX failed to create with error:
ORA-30032: the suspended (resumable) statement has timed out
ORA-01659: unable to allocate MINEXTENTS beyond 59 in tablespace ICMETBS
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB

AWR中的physical writes

investigate moving your high-write datafiles to a smaller data buffer to improve the speed of the database writer process.

AWR 中的consistent gets – examination

“Consistent gets – examination” is different than regular consistent gets. It is used to read undo blocks for consistent read purposes, but also for the first part of an index read and hash cluster I/O

java 截取文件每行字符串

java 读取文件,截取每行字符串