Pages

Friday, April 18, 2008

RMAN: UPGRADE CATALOG command

While registering a new two nodes Oracle RAC installation to my recovery catalog I encountered the following error:





[oracle@blade05 ~]$ rman target sys/my_pwd catalog rman/cat@CATDB

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Apr 18 10:32:46 2008

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

connected to target database: DWHDB (DBID=3585749232)
connected to recovery catalog database
PL/SQL package RMAN.DBMS_RCVCAT version 10.02.00.00 in RCVCAT database is not current
PL/SQL package RMAN.DBMS_RCVMAN version 10.02.00.00 in RCVCAT database is not current


It means I'm using a different version of rman between the RAC installation and the recovery catalog, indeed the RAC installation is at 10.2.0.4 while recovery catalog is at 10.2.01 version.
If you use a version of the recovery catalog that is older than that required by the RMAN client, then you must upgrade it using UPGRADE CATALOG command;
I'm upgrading from a client using 10.2.0.4 software version, while at the same time my recovery catalog is serving also other database using older or the same version. That's not a problem: it's important that recovery catalog is at least at the same version of your newest database client version.

So while I'm connected from RAC installation I need to issue the UPGRADE CATALOG command:
RMAN> upgrade catalog;

recovery catalog owner is RMAN
enter UPGRADE CATALOG command again to confirm catalog upgrade

RMAN> upgrade catalog;

recovery catalog upgraded to version 10.02.00.04
DBMS_RCVMAN package upgraded to version 10.02.00.00
DBMS_RCVCAT package upgraded to version 10.02.00.00

RMAN>

That's all.

Friday, April 11, 2008

Patching Oracle RAC 10.2.0.1 on ASM with 10.2.0.4 Patch Set 3 for Linux x86

Using your oracle user, download and unzip the file p6810189_10204_Linux-x86.zip.







First of all, before applying the 10.2.0.4 patchset to the Oracle database you should verify if the DSTv4 (USA 2007) update included in the 10.2.0.4 patchset has implications on your database. Following the NoteId 553812.1 provided by Metalink the goal is to see if you have stored information that is affected and if you are already using a DST version higher then DSTv4 and what then to do.


Because I'm patching from a lower 10.2.0.X release to 10.2.0.4 I hav to execute the following query to check the current version of the Oracle time zone definitions:
SQL> SELECT version FROM v$timezone_file;

Becuse my current timezone version is lower then 4, I need to execute this other query to check if I'm storing *user* TZ (TSTZ and TSLTZ) data:
SQL> select c.owner || '.' || c.table_name || '(' || c.column_name || ') -' || c.data_type || ' ' col
from dba_tab_cols c, dba_objects o
where c.data_type like '%TIME ZONE'
and c.owner=o.owner
and c.table_name = o.object_name
and o.object_type = 'TABLE'
order by col
My output shows there is nothing outside the Data Dictionary (= other then SYS objects).


The following queries
SQL> SELECT object_name FROM dba_objects WHERE object_id IN (SELECT obj# FROM scheduler$_window);
SQL> SELECT object_name FROM dba_objects WHERE object_id IN (SELECT obj# FROM scheduler$_job);
show I have only 6 jobs defined and I have also no user TZ (TSTZ and TSLTZ) data, so there is no action to take for the Oracle time zone definitions, and I can simply upgrade from 10.2.0.1 to 10.2.0.4.


Now I have to stop one node because I need to patch first the clusterware software and it can be done using rolling updates.
Run the following commands from the first node of your RAC installation:
emctl stop dbconsole
isqlplusctl stop
srvctl stop service -d DWHDB -s DWHDB_TAF -i DWHDB1
srvctl stop instance -d DWHDB -i DWHDB1 -o immediate
srvctl stop asm -n bl3306
srvctl stop nodeapps -n bl3306


Go into the directory Disk1 and run ./runInstaller &


A Welcome screen appears.


Specify the home details for the clusterware home.


Click next on the cluster nodes screen.


It checks for product-specific prerequisites.


Click Install


And the Clusterware patching is starting.



Before click the EXIT button and complete the installation,login as root on the first node and execute the following command as suggested:




Run
/u01/app/oracle/product/10.2.0/crs_1/crsctl stop crs
/u01/app/oracle/product/10.2.0/crs_1/install/root102.sh


They stop and start the crs services on the first node.
Execute the same command on every nodes, I ru them only on my second node:
/u01/app/oracle/product/10.2.0/crs_1/crsctl stop crs
/u01/app/oracle/product/10.2.0/crs_1/install/root102.sh


Then execute as oracle user from one node:
crsctl query crs activeversion


Execute as oracle user from second node:
crsctl query crs activeversion


The clusterware software has been updated.

Click EXIT and then YES from the OUI interface.


Now execute the following command to completely stop the database (this patchset doesn't support rolling updates) from your first node:
emctl stop dbconsole
isqlplusctl stop
srvctl stop service -d database DWHDB -s DWHDB_TAF -i DWHDB1
srvctl stop database -d DWHDB -o immediate
srvctl stop asm -n bl3306
srvctl stop nodeapps -n bl3306


Execute the following command to completely stop the asm instance from your second node:
emctl stop dbconsole
isqlplusctl stop
srvctl stop asm -n bl3305
srvctl stop nodeapps -n bl3305


As oracle user run again the runInstaller


Click NEXT on Welcome screen.


Choose the Oracle home.


Click NEXT on cluster installation mode screen.


Click NEXT on prerequisite checks screen.


Enable and register your Oracle Configuration Manager.


Accept the license agreement


and test your registration


Click INSTALL on summary screen.


The installation is proceeding.


When asked execute as root user the following command on your first node
/u01/app/oracle/product/10.2.0/db_1/root.sh


and then again from your second node.


Clic EXIT on End of Installation screen



and the YES


Only from your first node, login as oracle user and execute:
srvctl start asm -n bl3306
srvctl start listener -n bl3306


Then run dbua


Click NEXT on Welcome screen.


Select Upgrade a Database and click NEXT.


Select your database and click NEXT, providing a user with sysdba privileges.


The upgrade of the database starts.


Choose the degree of parallelism to recompile any invalid objects, turn off archiving and click NEXT.


Specify your Flash Recovery Area and click NEXT.


Click FINISH on Summary screen.


Your database is now 10.2.0.4 patched.