ORA-12838: cannot read/modify an object after modifying it in parallel
anbob@ORCL> select * from testap;
select * from testap
ERROR at line 1:
ORA-12838: cannot read/modify an object after modifying it in parallel
linux tar、xargs对目录下多个文件分别批量打包压缩(原)
如果一个目录下有很多文件,现在对所有文件分别压缩打包,tar 文件名还为原文件名.tar.gz,用for 当然可以实现,但用管道符可不可以呢?可以
不配tnsnames dblink的简单创建方法
有时创建dblink ,而又只有数据库用户,没办法配置操作系统的tnsnames.ora,就可以以这种方法创建,信息存进数据库,缺点是后期改连接信息,只能删了重建
in, not in (null)
今天有人提起了 in 与not in 的数据集里如果有null 值的情况下返回数据,not in的怪现象,其实这不是not in 的bug,在sqlserver,mysql,oracle都一样
Oracle/PLSQL: Convert 函数
Oracle/PLSQL, the convert function converts a string from one character set to another.
The syntax of the convert function is:
oracle initrans and maxtrans
In earlier releases of Oracle Database, the MAXTRANS parameter limited the number of transaction entries that could concurrently use data in a data block. This parameter has been deprecated.
oracle僵死Process m000 died,J000 died
今天无意执行了一个脚本,后来发现kill 了j000和m000的进程,oracle被僵死在那里,j000是job的守护进程,m000是MMON进程启动的从属平行进程,都是轻量级但不容忽视!
Oracle Outline的使用
总体就是说Oracle Outline是用来保持SQL执行计划(execution plan)的一个工具。我们可以保存一个时间点的执行计划,用于数据改变或系统环境改变而限制cbo,rbo强行执行原保存的执行计划,注意的是,这个执行计划现在适用随着数据的变化明天不一定是最好的。
Clustering_Factor(索引的集群因子)对执行计划影响
今天 在一个oracle高级调优的例子,提到Cluster_Factor的概念,觉的很有意思,在这分享一下,CLUSTER_FACTOR对Oracle执行计划会产生重要影响。这个值越高,说明索引的使用效率将会越差….
oracle 删除not null非空约束
system@ORCL> create table testnull(id int not null,name varchar2(10) not null);
Table created.
ORA-32004: obsolete and/or deprecated parameter(s) specified
SQL> startup mount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
ORA-00201: control file version 10.2.0.3.0 incompatible with ORACLE version…
alter database mount
*
ERROR at line 1:
ORA-00201: control file version 10.2.0.3.0 incompatible with ORACLE version 10.2.0.1.0
oracle 同样的sql生产库比测试库执行慢(案例)
昨天开发的让我从生产库中同步一个库到测试机,刚好手头有这周一的exp备份,imp了一份,但是今天早上开发打电话找我说情况有点不对头,同一个SQL在生产库上与测试库的执行时间差很多,测试库2秒,生产库要1分钟多 …
ERROR 1267 (HY000): Illegal mix of collations (gbk_chines
mysql> select count(*) from signon_class where class_type=’面授’;
ERROR 1267 (HY000): Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’
测一把ORACLE 11G Flashback Data Archive
SQL> create flashback archive arch_area tablespace flasharch quota 9m retention 1 year;
闪回档案已创建。
SQL> create table testfbk(id int) flashback archive arch_area;
Troubleshooting Wait event “enq:TX – row lock contention”
A TX lock is acquired when a transaction initiates its first change and is held until the transaction does a COMMIT or ROLLBACK. It is used mainly as a queuing mechanism so that other sessions can wait for the transaction to complete. The lock name (ID1 and ID2) of the TX lock reflect the transaction ID of the active transaction.