Uncategorized

How to solve ORA-04021: timeout occurred while waiting to lock object

Compile an object can give the following error select s.sid, s.serial#, p.spid, s.username, s.osuser, s.program, s.terminal, s.module, s.action , p.tracefile , s.type , s.logon_time , s.state , s.wait_time, s.seconds_in_wait, s.service_name from v$session s, v$process p where s.paddr = p.addr ; Quire the process to find the session that still running select a.object, a.type, b.sid,b.serial#,s.inst_id, b.username, b.osuser, b.program, s.status, s.sql_exec_start from v$access a, v$session b, gv$session s where a.sid = b.sid and a.owner = DECODE(UPPER(‘&1’), ‘ALL’, a.object, upper(‘&1’)) and a.object = DECODE(UPPER(‘&2’), ‘ALL’, a.object, upper(‘&2’)) and b.sid = s.sid and b.serial# = s.serial# AND s.status = ‘ACTIVE’ order by a.object , Read More

Create Sequence-Oracle Database 12c

Database version : from Oracle Database 12cR1 Create sequence with session or global option When a sequence number is generated, the sequence is incremented, independent of the transaction committing or rolling back. SESSION option makes opportunity to create sequence that can used in association with global temporary table then its visibility is just for session. The following options CACHE, NOCACHE, ORDER, or NOORDER are ignored when SESSION is declared. 1) statement SQL> CREATE GLOBAL TEMPORARY TABLE glb_tmp_table (a number); Table created. SQL> CREATE SEQUENCE sq_sess SESSION; Sequence created. 2) Script execution SQL> INSERT INTO glb_tmp_table VALUES (sq_sess.NEXTVAL); 1 row created. Read More

ORACLE: GoldenGate vs DataGuard

Oracle MAA (Maximum Availability Architecture is Oracle’s best practices blueprint based on proven Oracle high availability technologies, expert recommendations and customer experiences. The goal of MAA is to achieve optimal high availability for Oracle customers at the lowest cost and complexity. RAC, DataGuard, Flashback, ASM, RMAN, GoldenGate are tools that are part of MAA architecture. The configuration of Oracle GoldenGate / Data Guard has the purpose of synchronizing data between two or more systems . The basic features of the two products may look similar but takes GoldenGate uses replication while dataguard not. Oracle Data Guard and GoldenGate involving at Read More