Showing posts with label enterprise. Show all posts
Showing posts with label enterprise. Show all posts

Thursday, September 8, 2016

Plugging a SE2 non-CDB as an EE PDB Using File Copying and Remote Link

This post list two methods for plugging a non-CDB on standard edition 2 (SE2) as a pluggable database on enterprise edition (EE) CDB. One is using a XML description file which also includes copying the data files to (if EE database reside in another server). Other method is using a remote link. Reverse of this process, that is EE plugged into SE2 is not possible according to 1631260.1. This is because SE2 has less options than EE. But as long as the options in the SE2 are a subset of EE, moving from SE2 to EE is possible (2020172.1). Current options on the SE2 are
SQL> select comp_id,comp_name,status,version from dba_registry;

COMP_ID    COMP_NAME                                STATUS   VERSION
---------- ---------------------------------------- -------- ----------
CONTEXT    Oracle Text                              VALID    12.1.0.2.0
OWM        Oracle Workspace Manager                 VALID    12.1.0.2.0
XDB        Oracle XML Database                      VALID    12.1.0.2.0
CATALOG    Oracle Database Catalog Views            VALID    12.1.0.2.0
CATPROC    Oracle Database Packages and Types       VALID    12.1.0.2.0
Options on the EE are
SQL> select comp_id,comp_name,status,version from dba_registry;

COMP_ID    COMP_NAME                                STATUS     VERSION
---------- ---------------------------------------- ---------- ---------------
DV         Oracle Database Vault                    VALID      12.1.0.2.0
APEX       Oracle Application Express               VALID      4.2.5.00.08
OLS        Oracle Label Security                    VALID      12.1.0.2.0
SDO        Spatial                                  VALID      12.1.0.2.0
ORDIM      Oracle Multimedia                        VALID      12.1.0.2.0
CONTEXT    Oracle Text                              VALID      12.1.0.2.0
OWM        Oracle Workspace Manager                 VALID      12.1.0.2.0
XDB        Oracle XML Database                      VALID      12.1.0.2.0
CATALOG    Oracle Database Catalog Views            VALID      12.1.0.2.0
CATPROC    Oracle Database Packages and Types       VALID      12.1.0.2.0
JAVAVM     JServer JAVA Virtual Machine             VALID      12.1.0.2.0
XML        Oracle XDK                               VALID      12.1.0.2.0
CATJAVA    Oracle Database Java Packages            VALID      12.1.0.2.0
APS        OLAP Analytic Workspace                  VALID      12.1.0.2.0
XOQ        Oracle OLAP API                          VALID      12.1.0.2.0
RAC        Oracle Real Application Clusters         OPTION OFF 12.1.0.2.0
Both SE2 and EE has been patched to the same level.

Method 1. File Copying
Start the SE2 in read only mode, create the non-CDB descriptor file and shutdown.
SQL> startup mount exclusive;
SQL> alter database open read only;
SQL> exec dbms_pdb.describe(pdb_descr_file=>'/home/oracle/backup/se2_noncdb_desc.xml');
SQL> shutdown immediate;
Copy the descriptor file the data files to the location where EE CDB resides
scp -C se2_noncdb_desc.xml  192.168.0.99:/home/oracle/backup/

cd /data/oradata/STD12C1/datafile/
scp -C * 192.168.0.99:/home/oracle/backup/

o1_mf_sysaux_byjg3ypy_.dbf                         100%  550MB  25.0MB/s   00:22
o1_mf_system_byjg3q5k_.dbf                         100%  700MB  25.0MB/s   00:28
...
On the EE CDB run a compatibility check against the descriptor file
set serveroutput on
declare
    compa boolean;
    begin
    compa := dbms_pdb.CHECK_PLUG_COMPATIBILITY(pdb_descr_file=>'/home/oracle/backup/se2_noncdb_desc.xml');
 if compa = true then
      dbms_output.put_line('compatible');
 else
    dbms_output.put_line('no compatible');
 end if;
end;
/
no compatible
As seen from the output the compatibility fails. Look in the PDB_PLUG_IN_VIOLATIONS and if the cause for warnings are due to missing options then the incompatibility is ignore-able (2020172.1).
SQL> select name,cause,status,type,action from PDB_PLUG_IN_VIOLATIONS where name='STDPDB' AND STATUS <> 'RESOLVED';

NAME     CAUSE      STATUS    TYPE      ACTION
-------- ---------- --------- --------- ------------------------------------------------------------
STDPDB   OPTION     PENDING   WARNING   Fix the database option in the PDB or the CDB
STDPDB   OPTION     PENDING   WARNING   Fix the database option in the PDB or the CDB
STDPDB   APEX       PENDING   WARNING   Please contact Oracle Support.

SQL> select status,message from PDB_PLUG_IN_VIOLATIONS where name='STDPDB' AND STATUS <> 'RESOLVED';

STATUS    MESSAGE
--------- ----------------------------------------------------------------------------------------------------
PENDING   Database option APS mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option CATJAVA mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option DV mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option JAVAVM mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option OLS mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option ORDIM mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option SDO mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option XML mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   Database option XOQ mismatch: PDB installed version NULL. CDB installed version 12.1.0.2.0.
PENDING   APEX mismatch: PDB installed version NULL CDB installed version 4.2.5.00.08
Plug the SE2 non-CDB using the descriptor file
SQL> create pluggable database se2pdb as clone using '/home/oracle/backup/se2_noncdb_desc.xml' 
source_file_name_convert=('/data/oradata/STD12C1/datafile','/home/oracle/backup') move;

Pluggable database created.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ONEPDB                         READ WRITE NO
         4 TWOPDB                         READ WRITE NO
         5 SE2PDB                         MOUNTED
Chane to the PDB container and run noncdb_to_pdb.sql script
SQL> ALTER SESSION SET CONTAINER=se2pdb;
SQL> show con_name;

CON_NAME
------------------------------
SE2PDB

SQL> @?/rdbms/admin/noncdb_to_pdb.sql
When the script completes open the PDB
SQL> alter pluggable database open;

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         5 SE2PDB                         READ WRITE NO
PDB opens without any restriction and is ready to use. EE CDB was setup using OMF, as such the plugged SE2 DB's datafile and tempfile will be created in a OMF structure with a new GUID.
SQL> select name from v$tempfile;

NAME
----------------------------------------------------------------------------------------------------
/opt/app/oracle/oradata/CGCDB/3B61A02E318577C4E0536300A8C051DC/datafile/o1_mf_temp_cwg1lqd0_.dbf

1 row selected.

SQL> select name from v$datafile;

NAME
----------------------------------------------------------------------------------------------------
/opt/app/oracle/oradata/CGCDB/datafile/o1_mf_undotbs1_cvchzywd_.dbf
/opt/app/oracle/oradata/CGCDB/3B61A02E318577C4E0536300A8C051DC/datafile/o1_mf_system_cwg1lqcv_.dbf
/opt/app/oracle/oradata/CGCDB/3B61A02E318577C4E0536300A8C051DC/datafile/o1_mf_sysaux_cwg1lqcz_.dbf
/opt/app/oracle/oradata/CGCDB/3B61A02E318577C4E0536300A8C051DC/datafile/o1_mf_users_cwg1lqd0_.dbf
/opt/app/oracle/oradata/CGCDB/3B61A02E318577C4E0536300A8C051DC/datafile/o1_mf_tools_cwg1lqd1_.dbf
The files associated with the undo and temp tablespaces on the non-CDB will not be used in the plugged in PDB.

Method 2. Remote Link
In this method a remote link created from the EE CDB to SE2 non-CDB and used to create the PDB.
stdtns =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.66)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = std12c1)
    )
  )

SQL> create database link std_link connect to system identified by system using 'STDTNS';
Database link created.
Validate the link by running a query against the remote SE2 DB
SQL> select instance_name from v$instance@std_link;

INSTANCE_NAME
----------------
std12c1
As OMF is used no other steps are needed to create the PDB. Put the source non-CDB in to read only mode and then run the create PDB statement
SQL>  create pluggable database stdpdb from std12c1@std_link;
Pluggable database created.

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ONEPDB                         READ WRITE NO
         4 TWOPDB                         READ WRITE NO
         5 STDPDB                         MOUNTED
Change to the newly created PDB, run the noncdb_to_pdb script and finally open the PDB
SQL> ALTER SESSION SET CONTAINER=stdpdb;

SQL> show con_name;

CON_NAME
------------------------------
STDPDB

SQL> @?/rdbms/admin/noncdb_to_pdb.sql

SQL> alter pluggable database open;

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ONEPDB                         READ WRITE NO
         4 TWOPDB                         READ WRITE NO
         5 STDPDB                         READ WRITE NO
Similar to method 1 and plugging violation due to missing options are ignore-able.
Unlike the method 1, in method 2 the undo tablespace within the PDB will be offline.
SQL> select tablespace_name,status from dba_tablespaces order by 2,1;

TABLESPACE_NAME                STATUS
------------------------------ ---------
UNDOTBS1                       OFFLINE
This is due to the fact that both non-CDB and CDB where it's plugged having the same name for undo tablespace and undo tablespaces are not local to PDB but common to entire CDB. Unfortunately it's not possible to drop this within the PDB (2067414.1). However querying data files within the PDB shows the CDB's undo tablespace's data file
SQL> select name from v$datafile;

NAME
----------------------------------------------------------------------------------------------------
/opt/app/oracle/oradata/CGCDB/datafile/o1_mf_undotbs1_cvchzywd_.dbf
/opt/app/oracle/oradata/CGCDB/3BEEE6493046715CE0536300A8C0B4F0/datafile/o1_mf_system_cx0l5krb_.dbf
/opt/app/oracle/oradata/CGCDB/3BEEE6493046715CE0536300A8C0B4F0/datafile/o1_mf_sysaux_cx0l5krf_.dbf
Useful Metlink Notes
"OPTION WARNING Database option mismatch: PDB installed version NULL" in PDB_PLUG_IN_VIOLATIONS [ID 2020172.1]
Unplug an Enterprise Edition PDB and Plug into a Standard Edition CDB says not compatible when using DBMS_PDB.CHECK_PLUG_COMPATIBILITY [ID 1631260.1]

Related Post
Move a PDB Between Servers

Thursday, August 15, 2013

Converting 11gR2 RAC from Standard Edition to Enterprise Edition

The existing system is a 11gR2 (11.2.0.3.7) Standard Edition (SE) RAC with role separation on RHEL 6. The blog post lists the steps for converting the SE RAC to Enterprise Edition (EE) RAC. The SE home is dbhome_1 and EE home is dbhome_2.
1.Take a full backup of the database as precaution in case have to revert back to the standard edition setup again.
2. Since the database home will be updated in the OCR take a backup of the OCR and also take copies of backup files created automatically from all cluster nodes.
[root@rhel6m1 grid]# ocrconfig -manualbackup
rhel6m2     2013/08/14 14:57:27     /opt/app/11.2.0/grid/cdata/rhel6m-cluster/backup_20130814_145727.ocr
3. Get the status of registry components, so validity of these components could be compared before and after the conversion. There are no invalid components before the conversion.
SQL> select comp_id,comp_name,version,status,schema from dba_registry;

COMP_ID  COMP_NAME                                VERSION                        STATUS SCHEMA
-------- ---------------------------------------- ------------------------------ ------ ------
XDB      Oracle XML Database                      11.2.0.3.0                     VALID  XDB
OWM      Oracle Workspace Manager                 11.2.0.3.0                     VALID  WMSYS
EXF      Oracle Expression Filter                 11.2.0.3.0                     VALID  EXFSYS
RUL      Oracle Rules Manager                     11.2.0.3.0                     VALID  EXFSYS
CATALOG  Oracle Database Catalog Views            11.2.0.3.0                     VALID  SYS
CATPROC  Oracle Database Packages and Types       11.2.0.3.0                     VALID  SYS
JAVAVM   JServer JAVA Virtual Machine             11.2.0.3.0                     VALID  SYS
XML      Oracle XDK                               11.2.0.3.0                     VALID  SYS
CATJAVA  Oracle Database Java Packages            11.2.0.3.0                     VALID  SYS
RAC      Oracle Real Application Clusters         11.2.0.3.0                     VALID  SYS

10 rows selected.
4. Find out the patch levels on SE Oracle Home and GI Home. Once the EE is installed and before moving the DB to EE home it must be patched to the same level as the SE Home and not to a higher level than the GI home. The current patches on SE home are
[oracle@rhel6m1 ~]$ /opt/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory -local | grep Patch
Oracle Interim Patch Installer version 11.2.0.3.4
OPatch version    : 11.2.0.3.4
Patch  16619892     : applied on Wed Jul 31 13:43:23 BST 2013
Unique Patch ID:  16346737
Patch description:  "Database Patch Set Update : 11.2.0.3.7 (16619892)"
Sub-patch  16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"
Sub-patch  14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
Sub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Patch  16619898     : applied on Wed Jul 31 13:42:07 BST 2013
Unique Patch ID:  16376391
Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.7 (16742216)"
OPatch succeeded.
Patches on GI home are
[grid@rhel6m1 ~]$ /opt/app/11.2.0/grid/OPatch/opatch lsinventory -local | grep Patch
Oracle Interim Patch Installer version 11.2.0.3.4
OPatch version    : 11.2.0.3.4
Patch  16619892     : applied on Wed Jul 31 13:54:30 BST 2013
Unique Patch ID:  16346737
Patch description:  "Database Patch Set Update : 11.2.0.3.7 (16619892)"
Sub-patch  16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"
Sub-patch  14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
Sub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Patch  16619898     : applied on Wed Jul 31 13:52:27 BST 2013
Unique Patch ID:  16376391
Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.7 (16742216)"
OPatch succeeded.
5. Install the EE across the cluster.
Select install software only option.
Select all the nodes where SE was installed
Select Enterprise Edition
Give the EE home a new location (dbhome_2 where as SE is dbhome_1)
Summary Page

6. Copy init file, password file and sqlnet.ora file (if used for COST) to appropriate location in the new EE home.
[oracle@rhel6m2 ~]$ cd /opt/app/oracle/product/11.2.0/dbhome_2/dbs
[oracle@rhel6m2 dbs]$  cp /opt/app/oracle/product/11.2.0/dbhome_1/dbs/orapwstd11g22 .
[oracle@rhel6m2 dbs]$  cp /opt/app/oracle/product/11.2.0/dbhome_1/dbs/initstd11g22.ora .

[oracle@rhel6m2 ~]$ cd /opt/app/oracle/product/11.2.0/dbhome_2/network/admin
[oracle@rhel6m2 dbs]$  cp /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora .
Make sure this is done on all the nodes.




7. Patch the newly installed EE home (refer Case 2.1 section of the metalink note 1494646.1). Use GI_Home to run the opatch auto to avoid the following
Invoking utility "saveconfigurationsnapshot"
 UtilSession failed: This utility only be supported for GI home. Please specify the Oracle Home to the Grid Infrastructure (GI) Home "/opt/app/11.2.0/grid" by option -oh or set it in ORACLE_HOME environment variable
Following could be seen when patch is successfully applied.
/opt/app/11.2.0/grid/OPatch/opatch auto `pwd` -oh /opt/app/oracle/product/11.2.0/dbhome_2 -ocmrf ocm.rsp
 
 Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
patch /usr/local/patches/16619898/custom/server/16619898  apply successful for home  /opt/app/oracle/product/11.2.0/dbhome_2
patch /usr/local/patches/16619892  apply successful for home  /opt/app/oracle/product/11.2.0/dbhome_2
Compare the patch applied on EE home is same as SE home checked earlier on step 4
[oracle@rhel6m1 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory -local -oh /opt/app/oracle/product/11.2.0/dbhome_2 | grep Patch
Oracle Interim Patch Installer version 11.2.0.3.4
OPatch version    : 11.2.0.3.4
Patch  16619892     : applied on Thu Aug 15 10:34:09 BST 2013
Unique Patch ID:  16346737
Patch description:  "Database Patch Set Update : 11.2.0.3.7 (16619892)"
Sub-patch  16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"
Sub-patch  14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
Sub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Patch  16619898     : applied on Thu Aug 15 10:27:19 BST 2013
Unique Patch ID:  16376391
Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.7 (16742216)"
OPatch succeeded.
8. Verify the oracle executable in the EE home has the correct permissions. The oracle executable permission in the SE home were
oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle asmadmin 220193582 Jul 31 13:44 oracle
-rwsr-s--x. 1 oracle asmadmin 220113336 Apr 23 17:37 oracleO
while the newly installed EE had the wrong group ownership.
[oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle oinstall 232617534 Aug 15 10:35 oracle
-rwsr-s--x. 1 oracle oinstall 232399041 Aug 14 15:45 oracleO
Having this wrong group permission could result in following error when starting the database with the EE home (output from alert log)
SUCCESS: diskgroup DATA was mounted
NOTE: dependency between database std11g2 and diskgroup resource ora.DATA.dg is established
Errors in file /opt/app/oracle/diag/rdbms/std11g2/std11g21/trace/std11g21_ora_24840.trc  (incident=67209):
ORA-00600: internal error code, arguments: [kfioTranslateIO03], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /opt/app/oracle/diag/rdbms/std11g2/std11g21/incident/incdir_67209/std11g21_ora_24840_i67209.trc
Use ADRCI or Support Workbench to package the incident.
ERROR: unrecoverable error ORA-600 raised in ASM I/O path; terminating process 24840
To fix the issue set correct ownerships on the oracle executable.
[grid@rhel6m1 ~]$ $GI_HOME/bin/setasmgidwrap o=/opt/app/oracle/product/11.2.0/dbhome_2/bin/oracle
[grid@rhel6m1 ~]$ $GI_HOME/bin/setasmgidwrap o=/opt/app/oracle/product/11.2.0/dbhome_2/bin/oracleO

[oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle asmadmin 232617534 Aug 15 10:35 oracle
-rwsr-s--x. 1 oracle asmadmin 232399041 Aug 14 15:45 oracleO
More on kfioTranslateIO03 is available on the metalink note ORA-00600 [kfioTranslateIO03] [17090] (Doc ID 1336846.1)
9. Stop all but one instance.
[oracle@rhel6m1 ~]$ srvctl stop instance -d std11g2 -i std11g22
10. Set cluster_database=false to start the database in exclusive mode in the next start up.
SQL> alter system set cluster_database=FALSE scope=spfile sid='*';
System altered.
Once the change is done stop the remaining instance as well.
11. Change the oracle home associated with the database in the OCR.
[oracle@rhel6m1 ~]$ srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1 <--- SE Home

[oracle@rhel6m1 ~]$ srvctl modify database -d std11g2 -o /opt/app/oracle/product/11.2.0/dbhome_2

[oracle@rhel6m1 ~]$ srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_2  <--- EE Home
12. Change environment variables (eg. ORACLE_HOME, PATH values) to point to EE home and start the database in exclusive mode. Make sure sqlplus used is from EE home.
[oracle@rhel6m1 ~]$ which sqlplus
/opt/app/oracle/product/11.2.0/dbhome_2/bin/sqlplus

[oracle@rhel6m1 ~]$ sqlplus / as sysdba
SQL> startup
SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
SQL> @?/rdbms/admin/utlrp
Monitor the alert log for any start up issues. Verify there are no object with errors or issues while compiling during the utrl execute.
SQL> select COUNT(DISTINCT(obj#)) "OBJECTS WITH ERRORS" from utl_recomp_errors;

OBJECTS WITH ERRORS
-------------------
                  0
1 row selected.

SQL> select COUNT(*) "ERRORS DURING RECOMPILATION" from utl_recomp_errors;

ERRORS DURING RECOMPILATION
---------------------------
                          0
1 row selected.
Also verify the registry component status
SQL> select comp_id,comp_name,version,status,schema from dba_registry;

COMP_ID    COMP_NAME                                VERSION                        STATUS     SCHEMA
---------- ---------------------------------------- ------------------------------ ---------- --------
XDB        Oracle XML Database                      11.2.0.3.0                     VALID      XDB
OWM        Oracle Workspace Manager                 11.2.0.3.0                     VALID      WMSYS
EXF        Oracle Expression Filter                 11.2.0.3.0                     VALID      EXFSYS
RUL        Oracle Rules Manager                     11.2.0.3.0                     VALID      EXFSYS
CATALOG    Oracle Database Catalog Views            11.2.0.3.0                     VALID      SYS
CATPROC    Oracle Database Packages and Types       11.2.0.3.0                     VALID      SYS
JAVAVM     JServer JAVA Virtual Machine             11.2.0.3.0                     VALID      SYS
XML        Oracle XDK                               11.2.0.3.0                     VALID      SYS
CATJAVA    Oracle Database Java Packages            11.2.0.3.0                     VALID      SYS
RAC        Oracle Real Application Clusters         11.2.0.3.0                     VALID      SYS
Fix any issues that exists.
13. Set cluster_database to true and shutdown the instance.
SQL> alter system set cluster_database=true scope=spfile sid='*'; 
SQL> shutdown immediate;
Start all the instance using srvctl. Make sure using the srvctl from EE home
[oracle@rhel6m1 ~]$ which srvctl
/opt/app/oracle/product/11.2.0/dbhome_2/bin/srvctl

[oracle@rhel6m1 ~]$ srvctl start database -d std11g2
Once the db is started /etc/oratab will be upated with the new oracle home
std11g2:/opt/app/oracle/product/11.2.0/dbhome_2:N               # line added by Agent
14. Remove standard edition specific settings or configuration that are no longer needed. For example drop any triggers used for enabling use of stored outlines or scheduling of statspack snapshots.
15. If diagnostic and tuning pack license are available make sure it's set
SQL> show parameter control
control_management_pack_access       string      DIAGNOSTIC+TUNING
Also verify that AWR snapshots are taken each hour.
16. Use an EE option to verify EE is being used by the database. Easiest way is to create a bitmap index which only available with EE.
SQL> create bitmap index aidx on x(a);
Index created.
If it is on SE following error message will be shown
SQL> create bitmap index aidx on x(a);
create bitmap index aidx on x(a)
*
ERROR at line 1:
ORA-00439: feature not enabled: Bit-mapped indexes
17. Finally remove the old SE homes either using deinstall tool or detaching from inventory and deleting
$ORACLE_HOME/oui/bin/runInstaller -detachHome ORACLE_HOME=SE HOME
rm -rf SE HOME
Useful metalink notes
How to Convert Database from Standard to Enterprise Edition ? [117048.1]
Converting An Enterprise Edition Database To Standard Edition [139642.1]
How to Convert a RAC database from Standard Edition (SE) to Enterprise Edition (EE)? [451981.1]

Sunday, June 22, 2008

Converting from Standard to Enterprise Edition

1. Install enterprise edition on a separate home
2. create pfile of the existing database and move to enterprise home
3. move the password file to enterprise home or create new password file
4. backup the database.
5. switch paths, sid, and other oracle home related properties to enterprise home
6. startup the database
7. run catalog, catproc and utlrp scripts
8. de-install the standard software

Database version must be same. (ie. if standard is on 10.2.0.3 enterprise should also be on 10.2.0.3

if versions are different then replace steps 6 and 7 with

6. startup the database in upgrade/migrate mode.
7. run catupgrd.sql script of the current patch set level

more on metalink Note:117048.1

The only way to properly convert from an Enterprise Edition back to a Standard Edition is through an Export/Import operation. This way you will get rid of all Enterprise Edition specific Data Dictionary objects, as the SYS schema objects are not exported. The Standard Edition EXP utility is preferred to be used to export the data.

After the Import in the Standard Edition database, you only need to drop all user schemas related to Enterprise Edition features, such as the MDSYS account (used with Oracle Spatial).

more on metalink Note:139642.1