20 Haziran 2012 Çarşamba

Oracle database trigger order


Oracle Database fires multiple triggers in an unspecified, random order, if more than one trigger of the same type exists for a given statement; that is, triggers of the same type for the same statement are not guaranteed to fire in any specific order.

Execution steps of trigger.
http://docs.oracle.com/cd/B28359_01/server.111/b28318/triggers.htm#CNCPT418


 DBA_TRIGGER_ORDERING description
http://docs.oracle.com/cd/B28359_01/server.111/b28320/statviews_2107.htm#REFRN20581

sample:

create or replace trigger trigger_01
before insert on test
for each row
follows trigger_02
....


create or replace trigger trigger_02
before insert on test
for each row




15 Haziran 2012 Cuma

sqlplus ORA-01031: insufficient privileges


You want to connect intance to start.(oracle 11g)

but there is an error.

like


[oracle@oratest01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jun 23 02:00:05 2009

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

ERROR:
ORA-01031: insufficient privileges


1-Check groups in linux.(if dba group doesn't exist firstly create it)

more /etc/group
.
....

oinstall:x:500:
dba:x:501:oracle


2-Check your oracle user groups

more /etc/passwd
.
....
oracle:x:500:500::/home/oracle:/bin/bash



[root@oratest01 ~]# id oracle
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)




12 Haziran 2012 Salı

RMAN-20032: checkpoint change# too low



If you use catalog for backup


RMAN> resync database;
RMAN-20032: checkpoint change# too low

If database returned from cold backup resync can't be succesful.

solution

connect target /
connect catalog user@catdb

unregister database;
register database;



Veritas Volume Manager


Useful command samples for Veritas Volume Manager.

http://www.hyborian.demon.co.uk/notes/vx_cli.html



11 Haziran 2012 Pazartesi

ORA-22858: invalid alteration of datatype (convert varchar2 to clob)


When you convert a field from varchar2 to clob
raise an error ORA-22858: invalid alteration of datatype


SQL> create table vty_ra1 (a varchar2(10));



SQL> alter table vty_ra1 modify a clob;



ORA-22858: invalid alteration of datatype



workaround:

alter table vty_ra1 modify a long;

alter table vty_ra1 modify a clob;