Monday, July 29, 2013

Upgrade Oracle Database to 11.2.0.3 with a Physical Standby Database in place


1, On Primary database run preupgrade check:
SQL>@/u01/app/oracle/product/11.2.0.3/db_1/rdbms/admin/utlu112i.sql;

2, On Standby database, copy following file from 11.2.0.2 home to 11.2.0.3 home on all nodes

$cp /u01/app/oracle/product/11.2.0.2/db_1/dbs/orapwRAC1 /u01/app/oracle/product/11.2.0.2/db_1/dbs/
$cp /u01/app/oracle/product/11.2.0.2/db_1/dbs/initRAC1.ora /u01/app/oracle/product/11.2.0.2/db_1/dbs/ 
$cp /u01/app/oracle/product/11.2.0.2/db_1/network/admin/tnsnames.ora /u01/app/oracle/product/11.2.0.2/db_1/ntwork/admin

3, Disable data guard broker:

DGMGRL> disable configuration;

4, Stop broker on both Primary and standby:

SQL> alter system set dg_broker_start=false scope=Both;

5, Stop primary database

6, Stop standby database

7, Mount standby database in new 11.2.0.3 home and start redo apply

SQL> startup mount
SQL> alter database recover managed standby database using current logfile disconnect from session;


8, Edit /etc/oratab to point to new oracle home

9, Run DBUA to upgarde primary database.

10, Start broker on both Primary and standby:

SQL> alter system set dg_broker_start=true scope=Both;

11, Enable data guard broker:

DGMGRL> enable configuration;

12, Enable clusterware configuration for standby database

$ srvctl config database -d RACDR
PRCD-1027 : Failed to retrieve database RACDR
PRCD-1229 : An attempt to access configuration of database WLOANDR was rejected because its version 11.2.0.2.0 differs from the program version 11.2.0.3.0. Instead run the program from /u01/app/oracle/product/11.2.0.2/db_2.

Run the following command
srvctl upgrade database -d RACDR -o /u01/app/oracle/product/11.2.0.3/db_2

Friday, July 12, 2013

impdp failed with ORA-39002 ORA-39070 ORA-39070 ORA-06512 ORA-29283


Problem description:


$ impdp system/*****@RACDB schemas=TEST directory=DP_TEST_DIR dumpfile=TEST_%U.dmp

Import: Release 11.2.0.3.0 - Production on Fri Jul 12 14:59:24 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation


Cause:

impdp is connect to RAC database, but DP_TEST_DIR is point to directory on node1, 

Solution:

connect node1 for impdp:

impdp system/*****@RACDB1 schemas=TEST directory=DP_TEST_DIR dumpfile=TEST_%U.dmp

Wednesday, July 10, 2013

Install 11.2.0.3 ACFS on redhat linux 6

On redhat linux 6 ACFS is not supported, Here are the manual steps to enable ACFS functionality after GI installation:

1. After installation of the Grid Home, ensure the appropriate patch or PSU for the ACFS platform support is installed.

2. Run “/bin/acfsdriverstate supported” to ensure the patch is correctly installed. The result should be “True”.

3. Run “/bin/acfsdriverstate installed” to ensure that ACFS is correctly installed. If the result is “False”, run “/bin/acfsroot install” as root.

4. Run “/bin/acfsroot enable” to enable the ACFS resources again.

Tuesday, July 2, 2013

Upgrade to Oracle Grid Infrastructure 12c

Here are the steps to upgrade Grid Infrastucture from 11.2.0.3 to 12.1.0.1 on Redhat linux 5
1. Unset Oracle Environment Variables

$ unset ORACLE_BASE
$ unset ORACLE_HOME
$ unset ORACLE_SID


2. Using CVU to Validate Readiness for Oracle Clusterware Upgrades

navigate to the staging area for the upgrade, where the runcluvfy.sh command is located:
$ runcluvfy.sh stage -pre crsinst -upgrade -n ractest1-lnx,ractest2-lnx -rolling -src_crshome /u01/app/grid/11.2.0.3 -dest_crshome /u01/app/grid/12.1.0.1 -dest_version 12.1.0.1.0 -fixup -verbose 


Run fixup as root on all nodes:
$ /tmp/CVU_12.1.0.1.0_oracle/runfixup.sh 

3. Performing Rolling Upgrade of Oracle Grid Infrastructure

Start the installer, and select the option to upgrade an existing Oracle Clusterware and Oracle ASM installation

Run rootupgrade.sh as root on all nodes:
$ /u01/app/grid/12.1.0.1/rootupgrade.sh


4. Verification

$ crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.1.0.1.0]