ORA-04089: cannot create triggers on objects owned by SYS

今天做实验,忘记切换用户,在sys下建立触发器时发现了ORA-04089,不能建立trigger在sys的对象上

SQL> conn / as sysdba
Connected.

64位linux安装ORACLE10G报i386/libawt.so: libXp.so.6: cannot open shared object file

昨天在给一台新机器装oracle,系统是centos 5.2 x64,数据库 库是oracle 10g x64,按装官方文档把包也检查了一下,但在.runrunInstaller时,报错Exception in thread “main” java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-12-21_10-40-21PM/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file

一种select产生redo的情况

SQL> select count(*) from zwz.testredo;

COUNT(*)
———-
52840

Execution Plan
———————————————————-
Plan hash value: 1457698251

———————————————————————–
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
———————————————————————–
| 0 | SELECT STATEMENT | | 1 | 158 (1)| 00:00:02 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| TESTREDO | 68430 | 158 (1)| 00:00:02 |
———————————————————————–

Note
—–
– dynamic sampling used for this statement

Statistics
———————————————————-
0 recursive calls
0 db block gets
12787 consistent gets
0 physical reads
4780 redo size

How to add primary key on existing data of table(ORA-02437)(给已存在数据表增加主键)

SQL> alter table testcons add constraint pk_id primary key(id) enable novalidate;
alter table testcons add constraint pk_id primary key(id) enable novalidate
*
ERROR at line 1:
ORA-02437: cannot validate (ANBOB.PK_ID) – primary key violated

procedure调用DDL需显示授权

存储过程中执行DDL与DML有很大的区别,比如你在存储过程中创建表,虽然你授于了建表的角色给它,即便是DBA,在调用时也是会提示ORA-01031: insufficient privileges,显然是权限问题,记住如果在存储过程中调用DDL要显示授权,通过ROLE传授的权限是被忽略的。下面做一个实验证明

SQL> conn test/test

,

未知导出(exp)用户的DMP文件导入(imp)方法及EXP-00091异常原因

[oracle@orazhang ~]$ exp test/test file=test.dbf

Export: Release 10.2.0.1.0 – Production on 星期三 4月 13 17:19:24 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user TEST

rman crosscheck时RMAN-00571 ORA-19554解决

RMAN> crosscheck backupset;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=118 devtype=DISK
released channel: ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of crosscheck command at 04/12/2011 13:07:31
ORA-19554: error allocating device, device type: SBT_TAPE, device name:

non-oracle OS user login sqlplus error lisbsqlplus.so!

今天想模拟一下操作系统验证ORACLE登录,发现新建的用户,登录ORACLE SQLPLUS会提示:sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

在网上查了一下,发现老Fenng 也遇到过,原来是个BUG
….

ORA-01548: active rollback segment ‘_SYSSMU1$’ found

SQL> drop user icme cascade;
drop user icme cascade
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2