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

sqlplus ORA-01012: not logged on

Connected.
ERROR:
ORA-01012: not logged on

oracle 同样的sql生产库比测试库执行慢(案例)

昨天开发的让我从生产库中同步一个库到测试机,刚好手头有这周一的exp备份,imp了一份,但是今天早上开发打电话找我说情况有点不对头,同一个SQL在生产库上与测试库的执行时间差很多,测试库2秒,生产库要1分钟多 …

测一把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.

ORA-04068: existing state of packages has been discarded

ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04065: not executed, altered or dropped stored procedure “ANBOB.P_INSERT”

oracle 数据库、用户默认数据表空间分配

SQL> alter database default tablespace test;

Database altered.

EXP-00008: 遇到 ORACLE 错误 904

EXP-00008: 遇到 ORACLE 错误 904
ORA-00904: “MAXSIZE”: invalid identifier

oracle wrap 工具加密sql源代码

oracle 提供了wrap 工具加密你的sql 源代码,现在很编程都把业务逻辑写进了数据库,一些核心的代码不想被公开,比如使用传统的方法创建procedure,源代码是明文保存在oracle数据字典里面的

ORA-28056 Writing audit records to Windows Event Log failed

今天 有人提起了这个异常,未能将审计记录写入Windows 事件日志,这是WINDOWS平台的一个通病,如果开启了审计,如果应用软件再有频繁操作,一会儿功夫可能就会写满日志最大容量。

SP2-0749: Cannot resolve circular path of synonym “DBA_ROLLBACK_SEGS”

sys@ORCL> DESC DBA_ROLLBACK_SEGS;
SP2-0749: Cannot resolve circular path of synonym “DBA_ROLLBACK_SEGS”

oracle timesten内存数据库

早就听说内存数据库,不今天听网友说起发现oracle早就有了这样的产品,Oracle Berkeley DB 和 Times Ten.前者是只支持嵌入式内存数据,后者是独立的内存优化数据库。

oracle 9i dbca 报错invalid entrysize(expected xxx but got xxx) 解决方法

今天装oracle 9.2, DBCA用模板建库时提示invalid entrysize( expected ,,其实模板建库就是一个rman 恢复的过程,不知道这是哪块内存区设小了,google了一下发现很多同样的经历

x$ v_$ v$ gv$ view or synonym

gv$ 视图基于基表(x$)创建,v$视图又基于gv$视图创建, v_$ view 基于 v$ 视图创建,v$同义词又是基于v_$视图创建,呵呵是不是有点乱….

function-index error exeplan!(函数索引需要重建)

The index can only be enabled if the signature of the function is same as before (i.e when it was created). If the signature of the functions changes then the index needs to be revalidated by using the rebuild option:
ALTER INDEX REBUILD;

oracle function specify deterministic

Specify DETERMINISTIC to indicate that the function returns the same result value whenever it is called with the same values for its arguments.

ORA-02070: 数据库 不支持此上下文中的

SQL> insert into test@rhel243(sid)
2 select instance_number from v$instance;
select instance_number from v$instance
*
第 2 行出现错误:
ORA-02070: 数据库 不支持此上下文中的

oracle grant update a column on table(给一列授权update)

oracle 10 允许 基于表中某一列单独授权 update 权限

anbob@ORCL> conn system
Enter password:

sqlplus environment $SQLPATH login.sql

常用sqlplus 每次可能都要set pagesize \set linesize \set serveroutput很麻烦,sqlplus 允许每次启动都是会查找一个login.sql的文件自动格式化这些变量,从当前目录查找,也可以指定SQLPATH变量批定login.sql存放路径,这样从哪个目录进sqlplus都可以找到。

oracle profile 登录失败次数

SQL> create profile log5 limit FAILED_LOGIN_ATTEMPTS 5;

Profile created.