Wednesday, May 26, 2010

Configure OBIEE Scheduler

1) create database tables
cd /opt/oracle/product/10gOBI/OracleBI/server/Schema
sqlplus @
SQL> @SAJOBS.Oracle.sql


2) JOB MANAGER Config? This is not needed in order for Scheduler to function


3) run schconfig
cd /opt/oracle/product/10gOBI/OracleBI/setup/
source sa-init.sh
schconfig


4) cryptotool
cd /opt/oracle/product/10gOBI/OracleBI/setup
source sysenvinit.sh

cd /opt/oracle/product/10gOBI/OracleBI/web/bin

see page 175 of config install guide
cryptotools credstore -add -infile /opt/oracle/product/10gOBI/OracleBIData/web/config/credentialstore.xml


5) add to instanceconfig.xml










6) restart presentation services

Sunday, April 25, 2010

Network Backup Solutions

Network Backup Solution - www.topbits.com/network-backup.html

Network backup is any backup system where the data to be backed up traverses the network to reach the backup media.  Network backup typically requires a client-server software architecture. The backup server resides on a centralized server and the backup clients reside on every system to be backed up.  Advanced network backup systems can manage backup media which are also connected to the backup server via a network.  Network backup systems are much more scalable and manageable than local backup systems where tape drives are attached to each computer system.  Because network backup systems can backup so many computers, they normally utilize tape autochangers to give them greater storage capacity.

Free network backup software includes Amanda, Bacula, and BackupPC.  Commercial network backup software includes HP OpenView Storage Data Protector, Veritas NetBackup, and EMC Legato Networker.

Friday, April 23, 2010

RMAN Tablespace Point in Time Recovery or TSPITR

One detail that seems to get over looked when performing TSPITR on a "large" database is that the auxiliary instance is a duplicate of the all UNDO tablespaces, the SYSTEM tablespace and the TEMP tablespace.  So if these are gigabytes in size, your auxiliary database will need lots of available diskspace and not to mention the hours it will take to build these structures.

Retrieve Java source from its binary class

Java can be stored in an Oracle database without the source and only the binary data.  Retrieving the source from a java class may not be as straight forward as you may think but it is possible with these few steps outlined below.

As you can see below the java class has no source.

 


Create table with BLOB column
truncate table lob_class;
select * from lob_class;
commit;
drop table lob_class;
CREATE TABLE lob_class
   (  lob_id      NUMBER(3),
      java_clip   BLOB DEFAULT empty_blob(),
      java_clob   CLOB DEFAULT NULL);


Copy binary source to BLOB column
set serveroutput on
declare
blob1 BLOB;
  temp_blob   BLOB;
  temp_clob   CLOB;
  dest_offset NUMBER  := 1;
  src_offset  NUMBER  := 1;
  amount      INTEGER := dbms_lob.lobmaxsize;
  blob_csid   NUMBER  := dbms_lob.default_csid;
  lang_ctx    INTEGER := dbms_lob.default_lang_ctx;
  warning     INTEGER;
begin
dbms_lob.createtemporary(blob1,true, dbms_lob.session);
dbms_java.export_class('com/budco/csc/feed/DataLoader',blob1);
insert into lob_class (lob_id, java_clip) values (1,blob1);
dbms_lob.freetemporary(blob1);
end;
/
 

Copy binary BLOB column to OS file
Decompile source file with open source java decompiler
DECLARE
   clob_locator BLOB;
   charbuf      VARCHAR2(20);
   read_offset  INTEGER;
   read_amount  INTEGER;
  
vblob BLOB;
vstart NUMBER := 1;
bytelen NUMBER := 32000;
len NUMBER;
my_vr RAW(32000);
x NUMBER;

l_output utl_file.file_type;
  
BEGIN
l_output := utl_file.fopen('DPUMP_EXP_DIR',

                           'blob_csc.class','wb', 32760);
vstart := 1;
bytelen := 32000;

SELECT dbms_lob.getlength(java_clip)
INTO len
FROM lob_class
WHERE lob_id = 1;

x := len;

SELECT java_clip
INTO vblob
FROM lob_class
WHERE lob_id = 1;

-- single write if small enough
IF len < 32760 THEN
utl_file.put_raw(l_output,vblob);
utl_file.fflush(l_output);
ELSE -- write in pieces
vstart := 1;
WHILE vstart < len and bytelen > 0
LOOP
   dbms_lob.read(vblob,bytelen,vstart,my_vr);
   utl_file.put_raw(l_output,my_vr);
   utl_file.fflush(l_output);
   vstart := vstart + bytelen;
   x := x - bytelen;
   IF x < 32000 THEN
      bytelen := x;
   END IF;
utl_file.fclose(l_output);
end loop;
END IF;
END;
/

Thursday, April 22, 2010

Private and Public Clouds

Public cloud computing still has some obvious drawbacks like security control.  The majority of IT management intend to keep their clouds private while maintaining control over security concerns, such as regulatory compliance, and legal and contractual issues.  The key concept to cloud computing is virtualization and Oracle VM software is a good place to start.

Wednesday, April 21, 2010

Automatic Storage Management

ASM Disk Stats
set lines 200
col unbalanced for a10
col name for a7
col "allo size" for 9,999,999
select
  name
, group_number
, block_size
, allocation_unit_size "allo size"
, state,total_mb
, free_mb
, usable_file_mb
, offline_disks
, unbalanced
from v$asm_diskgroup_stat;

Scheduler: Find Jobs

Find enabled and/or running scheduler jobs
col owner for a8
set lines 200
col next_run_date for a45
col repeat_interval for a65
col LAST_START_DATE for a55
col start_date for a55
select owner, job_name
, repeat_interval
--, start_date
--, substr(last_run_duration,11,30) last_run_dur
, next_run_date
--, last_start_date
-- select owner, job_name, repeat_interval, next_run_date, LAST_START_DATE
-- select owner, job_name, next_run_date
--, last_start_date
, enabled
--,job_priority
from dba_scheduler_jobs
-- where enabled = 'TRUE'
where state = 'RUNNING'
-- and next_run_date < sysdate
-- and next_run_date not like '%AMERICA%'
-- where owner in ('ECOMDEV','ECOMLIVE','ECOMSTG')
-- where owner in (select username from dba_users 
                    where profile = 'DA_UNLIMITED')
-- and job_name in ('FULL_DATABASE_STATS','STALE_DATABASE_STATS') 
-- and next_run_date not like '%EASTER%' 
and next_run_date not like '%AMERICA%'
-- and job_name = 'GRANT_MISSING_GRANTS'
order by 5,1,2;
/* begin todea */ /* end todea */