Home Contact Sitemap

PL IT Consulting

Oracle Software Expert - Pat Lehane

PROFILE - Pat Lehane

During my career, I have functioned as an Oracle DBA, IT Architect, DBA Group Manager, Oracle 11i Applications DBA and as Oracle Applications Server DBA. My expertise spans from Oracle Database versions 7 to 11g.

 


Troubleshooting Oracle Streams / CDC

Note: Always where possible use the CDC API’s (dbms_cdc_publish) and not the streams API’s to stop/start/trouble shoot Oracle CDC (Change Data Capture)

Stop & Start CDC from stage database:
sqlplus  cdc_stg_pub/cdc_stg_pub

begin
dbms_cdc_publish.alter_change_set(
change_set_name => ‘WFWH_PRD_TO_PRD_SET1′,
enable_capture => ‘Y’) ;
end;

begin
dbms_cdc_publish.alter_hotlog_change_source(
change_source_name => ‘WFWH_PRD_TO_PRD_SRC1’,
enable_source => ‘Y’) ;
end;
Switch archive logs on source database to start propagation.

Check Apply:
Run this from source and stage:
select * from dba_apply_error;
Increase Apply Parallelism:
DBMS_APPLY_ADM.Set_parameter(‘applyName’,’parallelism’,’4’);
Check source for archive log needed to restart CDC / Streams:
set serveroutput on
DECLARE lScn number := 0;
alog varchar2(1000);
begin select min(required_checkpoint_scn)into lScn from dba_capture ; DBMS_OUTPUT.ENABLE(2000);
dbms_output.put_line(’Capture will restart from SCN ‘ || lScn ||’ in the following file:’);
for cr in (select name, first_time from DBA_REGISTERED_ARCHIVED_LOG where lScn between first_scn and next_scn order by thread#) loop dbms_output.put_line(cr.name||’ (’||cr.first_time||’)');
end loop;
end;
Stop / Start propagation (source):
exec DBMS_PROPAGATION_ADM.stop_propagation(’CDC$P_WFWH_PRD_UAT_SET1′);
exec DBMS_PROPAGATION_ADM.start_propagation(’CDC$P_WFWH_PRD_TO_PRD_SET1′);

Stop / Start Capture:
EXEC DBMS_CAPTURE_ADM.STOP_CAPTURE(capture_name => ‘CDC$C_WFWH_PRD_TO_PRD_SRC1′);
EXEC DBMS_CAPTURE_ADM.START_CAPTURE(capture_name => ‘CDC$C_WFWH_PRD_TO_PRD_SRC1′);

How to Enable Capture tracing on SOURCE site:
1. Stop the capture
2. alter system set events ‘26700 trace name context forever, level 6′;
exec dbms_capture_adm.set_parameter(’yourcapturename’,'trace_level’,'127′);
Start capture
— set trace off after 30 minutes:
3. To turn off capture tracing:
exec dbms_capture_adm.set_parameter(’yourcapturename’,'trace_level’,null);
alter system set events ‘26700 trace name context off’;
Restart capture

How to Enable Propagation tracing on SOURCE site:
1. Stop/Disable Propagation
2. alter system set job_queue_processes=0;
alter system set events ‘ 24040 trace name context forever,level 10′;
alter system set job_queue_processes=10;
3. Start propagation
4. To disable the Propagation tracing
alter system set events ‘ 24040 trace name context off’;
Restart propagation

Run a healthcheck on both source and target:

Metalink: Note.273674.1 Streams Configuration Report and Health Check Script

 

 


Install Oracle Applcation Server 10.1.2.3 on Red Hat Linux Enterprise Edition

oas

Oracle Application Server is never a straight forward install with many pre-reqs and show stoppers along the way. This is a full install guide with screen shots of the infrastructure, OID, portal, discoverer and a 10.2.0.4 database install

To download full arcticle clik on this link!

To download environment diagram click here!

 

 

List Oracle background processes (once database is no-mount state)

img SELECT * FROM v$bgprocess WHERE PADDR <> '00';

 

 

 

 

PMON - The Process Monitor (PMON) is responsible for performing recovery if a user process fails and rolls back the uncommitted transactions.

 Database Writer

DBWn - The Database Writer (DBWn) is responsible for writing the changed blocks or dirty blocks in the database.

 Archiver

ARC0 - The Archiver (ARC0) is responsible for writing the Online redo log files into the archive log destination.

 Log writer

LGWR - The Log Writer (LGWR) is responsible for writing data from redo log buffers to the online redo log files.

 Checkpoint process

CKPT - The checkpoint process (CKPT) is responsible for synchronizing the buffer cache with the data file. It updates all datafile headers and the control files.

 System Monitor

SMON - The System Monitor process (SMON) is responsible for instance recovery.

 Recoverer

RECO - The Re-coverer Process (RECO) is responsible for performing recovery of in-doubt transactions that often occur in distributed transactions.

 

Upgrade Oracle Database 11.1.0.6 to 11.1.0.7 Patch Set 6890831

img If upgrading from Oracle9i directly to Release 11.1.0.7, see OracleMetaLink Doc ID: 568125.1
and go to section: “Actions for the DSTv4 update in the 11.1.0.7 patchset.”
Turn off crontabs, OEM and CDC (Change Data Capture)
Shutdown all Oracle databases running from 11.1.0.6 Oracle Home including listener
Upgrade the Oracle Home software with 11.1.0.7 patchset
Upgrade init.ora requirements:
“shared_pool_size” needs to be increased to at least 448 MB
“java_pool_size” needs to be increased to at least 128 MB
“pga_aggregate_target” needs to be increased to at least 24 MB
Start up database ###
startup upgrade;
spool invalid_dbname_pre.log
select * from dba_objects where status =’INVALID’
select count(*) from dba_objects where status =’INVALID’
spool off
spool dbname_utlu111i.log
$ORACLE_HOME/rdbms/admin/@utlu111i.sql; –This runs a pre check on the target database before
upgrading.
spool off
Check for any errors / warnings
spool upgrade_dbname.log
$ORACLE_HOME/rdbms/admin/catupgrd.sql
spool off
Open database in read write mode:
startup;
spool spool utlrp_dbname.log
$ORACLE_HOME/rdbms/admin/utlrp.sql — This recompiles the database objects
spool off.

For full article email: lehane@pitconsulting.com

Useful RAC Oracle Database

RAC Tables:
  • gv$instance
  • v$active_instances
    • gv$session & gv$process
    • TAF

select instance_name, host_name, archiver, thread#, status from gv$instance;
select * from v$active_instances;

A:

SELECT NVL(s.username, '(oracle)') AS username,
s.inst_id,
s.osuser,
s.sid,
s.serial#,
p.spid,
s.lockwait,
s.status,
s.module,
s.machine,
s.program,
TO_CHAR(s.logon_Time,'DD-MON-YYYY HH24:MI:SS') AS logon_time
FROM gv$session s,
gv$process p
WHERE s.paddr = p.addr
AND s.inst_id = p.inst_id
ORDER BY s.username, s.osuser;

B:

select
username,
sid,
serial#,
failover_type,
failover_method,
failed_over
from
gv$session
where
username not in ('SYS','SYSTEM',
'PERFSTAT')
and
failed_over = 'YES';