Food for thoughts Rac One a first Step to explore


Some months ago I have implemented an Active Passive Solution on Oracle 11gr2 for on one of the customers.  Basically this was almost reliving old days where  tools like HP MC Service Guard (using packages where one or more database and listener configurations are stored)  or  Veritas Clusterware  (where and Agent controls the status of the resources being a database and or a listener). They would  monitor  the health of the Database/Listener,  would stop and start the Database/ Listener. With the technology at hand at that point and time ( implemented Grid Infra with ASM and Rdbms )  it was not   having all the required   setups to implement anything else.  Now we are 9 months further in time,  standards have been adapted and we have latest Oracle version at hand ( being so it is time for a fresh start. Besides that recently I have been asked to  implement the Active Passive solution on more environments (since it does cover  part off HA and it controls the monitoring  of the Database/ Instance  by HP-Openview).

Continue reading

Some Like it DBCA others prefer manual JVM Installs


For a couple of databases  I had to  install the Java Virtual Machine after the Database had been created. First attempt was  using the DBCA  gui  to get that done so i started it and  made the obvious choices  to work with A Rac database , to configure the database options  and selected the  Database I wanted to work with ( in the list only databases showing no instances).  DBCA was not so nice to me this time, telling me: “service name or Instance name not specified”. Hmm  well since i knew i can do without GUI  anyhow i decided to take the manual route and leave DBCA  be  for the moment. So lets saddle up and do it the old  – still – going strong  command line way .

My environment is a Linux 5 enterprise edition, my Oracle version is My Database is a two Instance Rac Database.

Manual Installation:

In order to  install the JVM  i decided it would be best to have the database  in an exclusive way so after contacting customer  and getting his okay  my first step was to shut down the Rac database. I had two screens open  one to tail the alertlog and in  the other in the Linux Prompt i had :

srvctl stop database -d MYDB

Alert log showed that the database was coming down smoothly so it was time to set up a script to get things working:

— Start of Installation the JVM manually.
— Important note this will only work this way if there is no JVM or part of JVM present in the database
— Investigate MOS if you suspect a former wrong installation  or partly installation before proceeding

spool InstallJvm.lst;
set echo on
-- connecting as sysdba cause this is required for this install 
-- and mount the database.
connect / as sysdba
startup mount

-- set_system_trig_enabled to false and open the database
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;

-- 28= 'JAVA SOURCE', 29= 'JAVA CLASS', 
select obj#, name 
from obj$ 
where type#=28 
or type#=29 
or type#=30 
or namespace=32;

select count(*), object_type 
from all_objects 
where object_type like '%JAVA%' 
group by object_type;

select count(*), object_type 
from all_objects 
where object_type 
like '%JAVA%' 
group by object_type;

select count(*), object_type 
from all_objects 
where object_type 
like '%JAVA%' 
group by object_type;

select count(*), object_type 
from all_objects 
where object_type like '%JAVA%' 
group by object_type;

select count(*), object_type 
from all_objects 
where object_type like '%JAVA%' 
group by object_type;

shutdown immediate
set echo off
spool off
starting the database again via the cluster:
srvctl start database -d MYDB

##  Time to go and check Health of JVM in Oracle : 
select comp_name, version, status 
from dba_registry;

COMP_NAME                                    VERSION         STATUS 
-------------------------------------------- --------------- ----------- 
Oracle Expression Filter                 VALID 
Oracle Application Express              VALID 
Oracle XML Database                      VALID 
Oracle Database Catalog Views            VALID 
Oracle Database Packages and Types       VALID 
JServer JAVA Virtual Machine             VALID 
Oracle XDK                               VALID 
Oracle Database Java Packages            VALID 

##More proof: 
select owner, status, count(*) 
from all_objects 
where object_type like '%JAVA%' 
group by owner, status;   

OWNER                STATUS  COUNT(*)
-------------------- ------- ---------- 
SYS                    VALID    21580 --> In 11GR2 approx. # of objects.
EXFSYS                 VALID       48 

select role from dba_roles where role like '%JAVA%'; 

6 rows selected.  -->  in 11GR2 # of roles.

select owner,status, count(status) 
from dba_objects 
group by owner,status 
order by 1,2; 

OWNER                          STATUS  COUNT(STATUS) 
------------------------------ ------- ------------- 
APEX_040100                    VALID            3341 
APPQOSSYS                      VALID               5 
DBSNMP                         VALID              55 
ERUNBK11                       VALID               5 
EXFSYS                         VALID             191 
FLOWS_FILES                    VALID              13 
ORACLE_OCM                     VALID               8 
OUTLN                          VALID              10 
PUBLIC                         VALID           24187 
SYS                            VALID           31674 
SYSTEM                         VALID             563 
XDB                            VALID            1658 

## If needed consider utlrp to see if recompile is helpful.  


As always Happy reading. Mathijs